Documentation ¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type AddFileOpts
- type BasicAuth
- type Configuration
- type DefaultApiService
- func (a *DefaultApiService) AddFile(ctx _context.Context, localVarOptionals *AddFileOpts) (File, *_nethttp.Response, error)
- func (a *DefaultApiService) DeleteFile(ctx _context.Context, id string) (*_nethttp.Response, error)
- func (a *DefaultApiService) FindFileById(ctx _context.Context, id string) (*os.File, *_nethttp.Response, error)
- func (a *DefaultApiService) FindFiles(ctx _context.Context, localVarOptionals *FindFilesOpts) ([]File, *_nethttp.Response, error)
- type Error
- type File
- type FindFilesOpts
- type GenericOpenAPIError
- type InlineObject
- type ServerConfiguration
- type ServerVariable
- type UnauthorizedError
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { DefaultApi *DefaultApiService // contains filtered or unexported fields }
APIClient manages communication with the Ant Investor Files API v1.0.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
ChangeBasePath changes base path to allow switching to mocks
func (*APIClient) GetConfig ¶
func (c *APIClient) GetConfig() *Configuration
Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
APIResponse stores the API response returned by the server.
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
NewAPIResponse returns a new APIResonse object.
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
type AddFileOpts ¶
AddFileOpts Optional parameters for the method 'AddFile'
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` Debug bool `json:"debug,omitempty"` Servers []ServerConfiguration HTTPClient *http.Client }
Configuration stores the configuration of the API client
func NewConfiguration ¶
func NewConfiguration() *Configuration
NewConfiguration returns a new Configuration object
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
AddDefaultHeader adds a new HTTP header to the default header in the request
type DefaultApiService ¶
type DefaultApiService service
DefaultApiService DefaultApi service
func (*DefaultApiService) AddFile ¶
func (a *DefaultApiService) AddFile(ctx _context.Context, localVarOptionals *AddFileOpts) (File, *_nethttp.Response, error)
AddFile Method for AddFile Stores a new file. Duplicates are going to be ignored if the hash of the file and meta data both match an existing file
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param optional nil or *AddFileOpts - Optional Parameters:
- @param "InlineObject" (optional.Interface of InlineObject) -
@return File
func (*DefaultApiService) DeleteFile ¶
DeleteFile Method for DeleteFile deletes a single file based on the ID supplied
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id ID of file to delete
func (*DefaultApiService) FindFileById ¶
func (a *DefaultApiService) FindFileById(ctx _context.Context, id string) (*os.File, *_nethttp.Response, error)
FindFileById Method for FindFileById Returns a file based on supplied ID
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id ID of file to fetch
@return *os.File
func (*DefaultApiService) FindFiles ¶
func (a *DefaultApiService) FindFiles(ctx _context.Context, localVarOptionals *FindFilesOpts) ([]File, *_nethttp.Response, error)
FindFiles Method for FindFiles Returns all files from the system that the user has access to
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param optional nil or *FindFilesOpts - Optional Parameters:
- @param "SubscriptionId" (optional.String) - filters the files by the subscription by
- @param "GroupId" (optional.String) - filters the files by the grouping id
- @param "Limit" (optional.Int32) - maximum number of results to return
@return []File
type File ¶
type File struct { Id string `json:"id,omitempty"` GroupId string `json:"group_id,omitempty"` SubscriptionId string `json:"subscription_id,omitempty"` Public bool `json:"public,omitempty"` Name string `json:"name"` Url string `json:"url,omitempty"` }
File struct for File
type FindFilesOpts ¶
type FindFilesOpts struct { SubscriptionId optional.String GroupId optional.String Limit optional.Int32 }
FindFilesOpts Optional parameters for the method 'FindFiles'
type GenericOpenAPIError ¶
type GenericOpenAPIError struct {
// contains filtered or unexported fields
}
GenericOpenAPIError Provides access to the body, error and model on returned errors.
func (GenericOpenAPIError) Body ¶
func (e GenericOpenAPIError) Body() []byte
Body returns the raw bytes of the response
func (GenericOpenAPIError) Error ¶
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an error.
func (GenericOpenAPIError) Model ¶
func (e GenericOpenAPIError) Model() interface{}
Model returns the unpacked model of the error
type InlineObject ¶
type InlineObject struct { GroupId string `json:"group_id,omitempty"` SubscriptionId string `json:"subscription_id,omitempty"` Public bool `json:"public,omitempty"` Name string `json:"name,omitempty"` FileObject *os.File `json:"fileObject,omitempty"` }
InlineObject struct for InlineObject
type ServerConfiguration ¶
type ServerConfiguration struct { Url string Description string Variables map[string]ServerVariable }
ServerConfiguration stores the information about a server
type ServerVariable ¶
ServerVariable stores the information about a server variable