# README
Go API client for openapi
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Overview
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 2.0.0
- Package version: 1.0.0
- Generator version: 7.9.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://attio.com/help
Installation
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import openapi "github.com/stripedapps/attio-go-sdk"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Configuration of Server URL
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
Select Server Configuration
For using other server than the one defined on index 0 set context value openapi.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1)
Templated Server URL
Templated server URL is formatted using default variables from configuration or from context value openapi.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
URLs Configuration per Operation
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identified by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using openapi.ContextOperationServerIndices
and openapi.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
Documentation for API Endpoints
All URIs are relative to https://api.attio.com
Class | Method | HTTP request | Description |
---|---|---|---|
AttributesAPI | V2TargetIdentifierAttributesAttributeGet | Get /v2/{target}/{identifier}/attributes/{attribute} | Get an attribute |
AttributesAPI | V2TargetIdentifierAttributesAttributeOptionsGet | Get /v2/{target}/{identifier}/attributes/{attribute}/options | List select options |
AttributesAPI | V2TargetIdentifierAttributesAttributeOptionsOptionPatch | Patch /v2/{target}/{identifier}/attributes/{attribute}/options/{option} | Update a select option |
AttributesAPI | V2TargetIdentifierAttributesAttributeOptionsPost | Post /v2/{target}/{identifier}/attributes/{attribute}/options | Create a select option |
AttributesAPI | V2TargetIdentifierAttributesAttributePatch | Patch /v2/{target}/{identifier}/attributes/{attribute} | Update an attribute |
AttributesAPI | V2TargetIdentifierAttributesAttributeStatusesGet | Get /v2/{target}/{identifier}/attributes/{attribute}/statuses | List statuses |
AttributesAPI | V2TargetIdentifierAttributesAttributeStatusesPost | Post /v2/{target}/{identifier}/attributes/{attribute}/statuses | Create a status |
AttributesAPI | V2TargetIdentifierAttributesAttributeStatusesStatusPatch | Patch /v2/{target}/{identifier}/attributes/{attribute}/statuses/{status} | Update a status |
AttributesAPI | V2TargetIdentifierAttributesGet | Get /v2/{target}/{identifier}/attributes | List attributes |
AttributesAPI | V2TargetIdentifierAttributesPost | Post /v2/{target}/{identifier}/attributes | Create an attribute |
CommentsAPI | V2CommentsCommentIdDelete | Delete /v2/comments/{comment_id} | Delete a comment |
CommentsAPI | V2CommentsCommentIdGet | Get /v2/comments/{comment_id} | Get a comment |
CommentsAPI | V2CommentsPost | Post /v2/comments | Create a comment |
EntriesAPI | V2ListsListEntriesEntryIdAttributesAttributeValuesGet | Get /v2/lists/{list}/entries/{entry_id}/attributes/{attribute}/values | List attribute values for a list entry |
EntriesAPI | V2ListsListEntriesEntryIdDelete | Delete /v2/lists/{list}/entries/{entry_id} | Delete a list entry |
EntriesAPI | V2ListsListEntriesEntryIdGet | Get /v2/lists/{list}/entries/{entry_id} | Get a list entry |
EntriesAPI | V2ListsListEntriesEntryIdPatch | Patch /v2/lists/{list}/entries/{entry_id} | Update a list entry (append multiselect values) |
EntriesAPI | V2ListsListEntriesEntryIdPut | Put /v2/lists/{list}/entries/{entry_id} | Update a list entry (overwrite multiselect values) |
EntriesAPI | V2ListsListEntriesPost | Post /v2/lists/{list}/entries | Create an entry (add record to list) |
EntriesAPI | V2ListsListEntriesPut | Put /v2/lists/{list}/entries | Assert a list entry by parent |
EntriesAPI | V2ListsListEntriesQueryPost | Post /v2/lists/{list}/entries/query | List entries |
ListsAPI | V2ListsGet | Get /v2/lists | List all lists |
ListsAPI | V2ListsListGet | Get /v2/lists/{list} | Get a list |
ListsAPI | V2ListsListPatch | Patch /v2/lists/{list} | Update a list |
ListsAPI | V2ListsPost | Post /v2/lists | Create a list |
MetaAPI | V2SelfGet | Get /v2/self | Identify |
NotesAPI | V2NotesGet | Get /v2/notes | List notes |
NotesAPI | V2NotesNoteIdDelete | Delete /v2/notes/{note_id} | Delete a note |
NotesAPI | V2NotesNoteIdGet | Get /v2/notes/{note_id} | Get a note |
NotesAPI | V2NotesPost | Post /v2/notes | Create a note |
ObjectsAPI | V2ObjectsGet | Get /v2/objects | List objects |
ObjectsAPI | V2ObjectsObjectGet | Get /v2/objects/{object} | Get an object |
ObjectsAPI | V2ObjectsObjectPatch | Patch /v2/objects/{object} | Update an object |
ObjectsAPI | V2ObjectsPost | Post /v2/objects | Create an object |
RecordsAPI | V2ObjectsObjectRecordsPost | Post /v2/objects/{object}/records | Create a record |
RecordsAPI | V2ObjectsObjectRecordsPut | Put /v2/objects/{object}/records | Assert a record |
RecordsAPI | V2ObjectsObjectRecordsQueryPost | Post /v2/objects/{object}/records/query | List records |
RecordsAPI | V2ObjectsObjectRecordsRecordIdAttributesAttributeValuesGet | Get /v2/objects/{object}/records/{record_id}/attributes/{attribute}/values | List record attribute values |
RecordsAPI | V2ObjectsObjectRecordsRecordIdDelete | Delete /v2/objects/{object}/records/{record_id} | Delete a record |
RecordsAPI | V2ObjectsObjectRecordsRecordIdEntriesGet | Get /v2/objects/{object}/records/{record_id}/entries | List record entries |
RecordsAPI | V2ObjectsObjectRecordsRecordIdGet | Get /v2/objects/{object}/records/{record_id} | Get a record |
RecordsAPI | V2ObjectsObjectRecordsRecordIdPatch | Patch /v2/objects/{object}/records/{record_id} | Update a record |
TasksAPI | V2TasksGet | Get /v2/tasks | List tasks |
TasksAPI | V2TasksPost | Post /v2/tasks | Create a task |
TasksAPI | V2TasksTaskIdDelete | Delete /v2/tasks/{task_id} | Delete a task |
TasksAPI | V2TasksTaskIdGet | Get /v2/tasks/{task_id} | Get a task |
TasksAPI | V2TasksTaskIdPatch | Patch /v2/tasks/{task_id} | Update a task |
ThreadsAPI | V2ThreadsGet | Get /v2/threads | List threads |
ThreadsAPI | V2ThreadsThreadIdGet | Get /v2/threads/{thread_id} | Get a thread |
WebhooksAPI | V2WebhooksGet | Get /v2/webhooks | List webhooks |
WebhooksAPI | V2WebhooksPost | Post /v2/webhooks | Create a webhook |
WebhooksAPI | V2WebhooksWebhookIdDelete | Delete /v2/webhooks/{webhook_id} | Delete a webhook |
WebhooksAPI | V2WebhooksWebhookIdGet | Get /v2/webhooks/{webhook_id} | Get a webhook |
WebhooksAPI | V2WebhooksWebhookIdPatch | Patch /v2/webhooks/{webhook_id} | Update a webhook |
WorkspaceMembersAPI | V2WorkspaceMembersGet | Get /v2/workspace_members | List workspace members |
WorkspaceMembersAPI | V2WorkspaceMembersWorkspaceMemberIdGet | Get /v2/workspace_members/{workspace_member_id} | Get a workspace member |
Documentation For Models
- Attribute
- AttributeConfig
- AttributeConfigCurrency
- AttributeConfigRecordReference
- AttributeDefaultValue
- AttributeDefaultValueAnyOf
- AttributeDefaultValueAnyOf1
- AttributeDefaultValueAnyOfTemplate
- AttributeId
- AttributeRelationship
- Comment
- CommentAuthor
- CommentEntry
- CommentId
- CommentRecord
- CommentResolvedBy
- InputValue
- InputValueAnyOf
- InputValueAnyOf1
- InputValueAnyOf10
- InputValueAnyOf11
- InputValueAnyOf12
- InputValueAnyOf13
- InputValueAnyOf14
- InputValueAnyOf15
- InputValueAnyOf2
- InputValueAnyOf3
- InputValueAnyOf4
- InputValueAnyOf5
- InputValueAnyOf6
- InputValueAnyOf7
- InputValueAnyOf8
- InputValueAnyOf9
- List
- ListCreatedByActor
- ListId
- Note
- NoteCreatedByActor
- NoteId
- Object
- ObjectId
- OutputValue
- OutputValueAnyOf
- OutputValueAnyOf1
- OutputValueAnyOf10
- OutputValueAnyOf11
- OutputValueAnyOf12
- OutputValueAnyOf13
- OutputValueAnyOf14
- OutputValueAnyOf15
- OutputValueAnyOf16
- OutputValueAnyOf17
- OutputValueAnyOf18
- OutputValueAnyOf2
- OutputValueAnyOf3
- OutputValueAnyOf4
- OutputValueAnyOf5
- OutputValueAnyOf6
- OutputValueAnyOf7
- OutputValueAnyOf8
- OutputValueAnyOf9
- SelectOption
- SelectOptionId
- Status
- StatusId
- Task
- TaskAssigneesInner
- TaskCreatedByActor
- TaskId
- TaskLinkedRecordsInner
- Thread
- ThreadId
- V2CommentsCommentIdDelete404Response
- V2CommentsCommentIdGet404Response
- V2CommentsPost200Response
- V2CommentsPost400Response
- V2CommentsPostRequest
- V2CommentsPostRequestData
- V2CommentsPostRequestDataAnyOf
- V2CommentsPostRequestDataAnyOf1
- V2CommentsPostRequestDataAnyOf1Record
- V2CommentsPostRequestDataAnyOf2
- V2CommentsPostRequestDataAnyOf2Entry
- V2CommentsPostRequestDataAnyOfAuthor
- V2ListsGet200Response
- V2ListsListEntriesEntryIdPut400Response
- V2ListsListEntriesEntryIdPutRequest
- V2ListsListEntriesEntryIdPutRequestData
- V2ListsListEntriesPost400Response
- V2ListsListEntriesPost404Response
- V2ListsListEntriesPut200Response
- V2ListsListEntriesPut400Response
- V2ListsListEntriesPut404Response
- V2ListsListEntriesPutRequest
- V2ListsListEntriesPutRequestData
- V2ListsListEntriesQueryPost200Response
- V2ListsListEntriesQueryPost200ResponseDataInner
- V2ListsListEntriesQueryPost200ResponseDataInnerId
- V2ListsListGet404Response
- V2ListsListPatchRequest
- V2ListsListPatchRequestData
- V2ListsPost200Response
- V2ListsPost400Response
- V2ListsPost403Response
- V2ListsPost404Response
- V2ListsPostRequest
- V2ListsPostRequestData
- V2ListsPostRequestDataWorkspaceMemberAccessInner
- V2NotesGet200Response
- V2NotesNoteIdGet404Response
- V2NotesPost200Response
- V2NotesPostRequest
- V2NotesPostRequestData
- V2ObjectsGet200Response
- V2ObjectsObjectGet404Response
- V2ObjectsObjectPatch400Response
- V2ObjectsObjectPatch409Response
- V2ObjectsObjectPatchRequest
- V2ObjectsObjectPatchRequestData
- V2ObjectsObjectRecordsPost400Response
- V2ObjectsObjectRecordsPostRequest
- V2ObjectsObjectRecordsPostRequestData
- V2ObjectsObjectRecordsPut200Response
- V2ObjectsObjectRecordsPut200ResponseData
- V2ObjectsObjectRecordsPut200ResponseDataValuesValueInner
- V2ObjectsObjectRecordsPut200ResponseDataValuesValueInnerOneOf
- V2ObjectsObjectRecordsPut400Response
- V2ObjectsObjectRecordsPutRequest
- V2ObjectsObjectRecordsPutRequestData
- V2ObjectsObjectRecordsQueryPost200Response
- V2ObjectsObjectRecordsQueryPost200ResponseDataInner
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerId
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInner
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOf
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOf1
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOf10
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOf11
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOf12
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOf13
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOf14
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOf15
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOf16
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOf2
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOf3
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOf4
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOf5
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOf6
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOf7
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOf8
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOf9
- V2ObjectsObjectRecordsQueryPost200ResponseDataInnerValuesValueInnerOneOfCreatedByActor
- V2ObjectsObjectRecordsQueryPost400Response
- V2ObjectsObjectRecordsQueryPost404Response
- V2ObjectsObjectRecordsQueryPostRequest
- V2ObjectsObjectRecordsQueryPostRequestSortsInner
- V2ObjectsObjectRecordsQueryPostRequestSortsInnerAnyOf
- V2ObjectsObjectRecordsQueryPostRequestSortsInnerAnyOf1
- V2ObjectsObjectRecordsQueryPostRequestSortsInnerAnyOf1PathInnerInner
- V2ObjectsObjectRecordsRecordIdAttributesAttributeValuesGet200Response
- V2ObjectsObjectRecordsRecordIdAttributesAttributeValuesGet400Response
- V2ObjectsObjectRecordsRecordIdEntriesGet200Response
- V2ObjectsObjectRecordsRecordIdEntriesGet200ResponseDataInner
- V2ObjectsObjectRecordsRecordIdGet404Response
- V2ObjectsObjectRecordsRecordIdPatch400Response
- V2ObjectsPost200Response
- V2ObjectsPost409Response
- V2ObjectsPostRequest
- V2ObjectsPostRequestData
- V2SelfGet200Response
- V2SelfGet200ResponseAnyOf
- V2SelfGet200ResponseAnyOf1
- V2TargetIdentifierAttributesAttributeGet404Response
- V2TargetIdentifierAttributesAttributeOptionsGet200Response
- V2TargetIdentifierAttributesAttributeOptionsOptionPatch400Response
- V2TargetIdentifierAttributesAttributeOptionsOptionPatchRequest
- V2TargetIdentifierAttributesAttributeOptionsOptionPatchRequestData
- V2TargetIdentifierAttributesAttributeOptionsPost200Response
- V2TargetIdentifierAttributesAttributeOptionsPost400Response
- V2TargetIdentifierAttributesAttributeOptionsPost409Response
- V2TargetIdentifierAttributesAttributeOptionsPostRequest
- V2TargetIdentifierAttributesAttributeOptionsPostRequestData
- V2TargetIdentifierAttributesAttributePatch400Response
- V2TargetIdentifierAttributesAttributePatchRequest
- V2TargetIdentifierAttributesAttributePatchRequestData
- V2TargetIdentifierAttributesAttributePatchRequestDataConfig
- V2TargetIdentifierAttributesAttributePatchRequestDataDefaultValue
- V2TargetIdentifierAttributesAttributeStatusesGet200Response
- V2TargetIdentifierAttributesAttributeStatusesPost200Response
- V2TargetIdentifierAttributesAttributeStatusesPost400Response
- V2TargetIdentifierAttributesAttributeStatusesPost409Response
- V2TargetIdentifierAttributesAttributeStatusesPostRequest
- V2TargetIdentifierAttributesAttributeStatusesPostRequestData
- V2TargetIdentifierAttributesAttributeStatusesStatusPatch400Response
- V2TargetIdentifierAttributesAttributeStatusesStatusPatchRequest
- V2TargetIdentifierAttributesAttributeStatusesStatusPatchRequestData
- V2TargetIdentifierAttributesGet200Response
- V2TargetIdentifierAttributesPost200Response
- V2TargetIdentifierAttributesPost400Response
- V2TargetIdentifierAttributesPost404Response
- V2TargetIdentifierAttributesPost409Response
- V2TargetIdentifierAttributesPostRequest
- V2TargetIdentifierAttributesPostRequestData
- V2TargetIdentifierAttributesPostRequestDataConfig
- V2TargetIdentifierAttributesPostRequestDataConfigCurrency
- V2TargetIdentifierAttributesPostRequestDataConfigRecordReference
- V2TargetIdentifierAttributesPostRequestDataDefaultValue
- V2TargetIdentifierAttributesPostRequestDataDefaultValueOneOf
- V2TargetIdentifierAttributesPostRequestDataDefaultValueOneOf1
- V2TargetIdentifierAttributesPostRequestDataDefaultValueOneOfTemplate
- V2TasksGet200Response
- V2TasksPost200Response
- V2TasksPost400Response
- V2TasksPostRequest
- V2TasksPostRequestData
- V2TasksPostRequestDataAssigneesInner
- V2TasksPostRequestDataAssigneesInnerAnyOf
- V2TasksPostRequestDataAssigneesInnerAnyOf1
- V2TasksPostRequestDataLinkedRecordsInner
- V2TasksPostRequestDataLinkedRecordsInnerAnyOf
- V2TasksPostRequestDataLinkedRecordsInnerAnyOf1
- V2TasksPostRequestDataLinkedRecordsInnerAnyOf1SlugOrIdOfMatchingAttributeInner
- V2TasksPostRequestDataLinkedRecordsInnerAnyOf1SlugOrIdOfMatchingAttributeInnerAnyOf
- V2TasksPostRequestDataLinkedRecordsInnerAnyOf1SlugOrIdOfMatchingAttributeInnerAnyOf1
- V2TasksPostRequestDataLinkedRecordsInnerAnyOf1SlugOrIdOfMatchingAttributeInnerAnyOf2
- V2TasksPostRequestDataLinkedRecordsInnerAnyOf1SlugOrIdOfMatchingAttributeInnerAnyOf3
- V2TasksPostRequestDataLinkedRecordsInnerAnyOf1SlugOrIdOfMatchingAttributeInnerAnyOf4
- V2TasksTaskIdGet404Response
- V2TasksTaskIdPatch404Response
- V2TasksTaskIdPatchRequest
- V2TasksTaskIdPatchRequestData
- V2TasksTaskIdPatchRequestDataAssigneesInner
- V2TasksTaskIdPatchRequestDataAssigneesInnerAnyOf
- V2TasksTaskIdPatchRequestDataLinkedRecordsInner
- V2TasksTaskIdPatchRequestDataLinkedRecordsInnerAnyOf
- V2ThreadsGet200Response
- V2ThreadsThreadIdGet200Response
- V2ThreadsThreadIdGet404Response
- V2WebhooksGet200Response
- V2WebhooksGet200ResponseDataInner
- V2WebhooksGet200ResponseDataInnerId
- V2WebhooksGet200ResponseDataInnerSubscriptionsInner
- V2WebhooksGet200ResponseDataInnerSubscriptionsInnerFilter
- V2WebhooksGet200ResponseDataInnerSubscriptionsInnerFilterAnyOf
- V2WebhooksGet200ResponseDataInnerSubscriptionsInnerFilterAnyOf1
- V2WebhooksGet200ResponseDataInnerSubscriptionsInnerFilterAnyOfOrInner
- V2WebhooksGet200ResponseDataInnerSubscriptionsInnerFilterAnyOfOrInnerAnyOf
- V2WebhooksGet200ResponseDataInnerSubscriptionsInnerFilterAnyOfOrInnerAnyOf1
- V2WebhooksPost200Response
- V2WebhooksPost200ResponseData
- V2WebhooksPost400Response
- V2WebhooksPostRequest
- V2WebhooksPostRequestData
- V2WebhooksWebhookIdDelete404Response
- V2WebhooksWebhookIdGet200Response
- V2WebhooksWebhookIdGet404Response
- V2WebhooksWebhookIdPatchRequest
- V2WebhooksWebhookIdPatchRequestData
- V2WorkspaceMembersGet200Response
- V2WorkspaceMembersWorkspaceMemberIdGet200Response
- V2WorkspaceMembersWorkspaceMemberIdGet404Response
- WorkspaceMember
- WorkspaceMemberId
Documentation For Authorization
Authentication schemes defined for the API:
oauth2
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://app.attio.com/authorize
- Scopes:
- user_management:read: View workspace members.
- user_management:read-write: View workspace members.
- record_permission:read: View, and optionally write, records.
- record_permission:read-write: View, and optionally write, records.
- object_configuration:read: View, and optionally write, the configuration and attributes of objects.
- object_configuration:read-write: View, and optionally write, the configuration and attributes of objects.
- list_entry:read: View, and optionally write, the entries in a list.
- list_entry:read-write: View, and optionally write, the entries in a list.
- list_configuration:read: View, and optionally write, the configuration and attributes of lists.
- list_configuration:read-write: View, and optionally write, the configuration and attributes of lists.
- public_collection:read: View, and optionally write, both the settings and information within public collections.
- public_collection:read-write: View, and optionally write, both the settings and information within public collections.
- private_collection:read: View, and optionally modify, both the settings and information of all collections within the workspace, regardless of their access settings.
- private_collection:read-write: View, and optionally modify, both the settings and information of all collections within the workspace, regardless of their access settings.
- comment:read: View comments (and threads), and optionally write comments.
- comment:read-write: View comments (and threads), and optionally write comments.
- task:read: View, and optionally write, tasks.
- task:read-write: View, and optionally write, tasks.
- note:read: View, and optionally write, notes.
- note:read-write: View, and optionally write, notes.
- webhook:read: View, and optionally manage, webhooks.
- webhook:read-write: View, and optionally manage, webhooks.
Example
auth := context.WithValue(context.Background(), openapi.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
import "golang.org/x/oauth2"
/* Perform OAuth2 round trip request and obtain a token */
tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, openapi.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)
Documentation for Utility Methods
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime