Documentation ¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type AlternativePathFormat
- type BasicAuth
- type Configuration
- type ErrorResponse
- type ModelError
- type ObjectUrl
- type Output
- type Store
- type StoreBody
- type StoreBodyProviderSpecificSettings
- type StoresApiService
- func (a *StoresApiService) CreateStore(ctx context.Context, storeBody StoreBody) (Store, *http.Response, error)
- func (a *StoresApiService) CreateStoreClientLink(ctx context.Context, storeId string, serviceName string, serviceId string) (*http.Response, error)
- func (a *StoresApiService) CreateWatchRule(ctx context.Context, watchRuleBody WatchRule) (WatchRule, *http.Response, error)
- func (a *StoresApiService) DeleteStore(ctx context.Context, id string) (*http.Response, error)
- func (a *StoresApiService) DeleteStoreClientLink(ctx context.Context, storeId string, serviceName string, serviceId string) (*http.Response, error)
- func (a *StoresApiService) DeleteWatchRule(ctx context.Context, id string) (*http.Response, error)
- func (a *StoresApiService) GetObjectUrl(ctx context.Context, id string, path string, expiresIn string) (ObjectUrl, *http.Response, error)
- func (a *StoresApiService) GetStore(ctx context.Context, id string) (Store, *http.Response, error)
- func (a *StoresApiService) GetStoreIdsForClient(ctx context.Context, serviceName string, serviceId string) ([]string, *http.Response, error)
- func (a *StoresApiService) GetStores(ctx context.Context, localVarOptionals map[string]interface{}) ([]Store, *http.Response, error)
- func (a *StoresApiService) GetWatchRule(ctx context.Context, id string) (WatchRule, *http.Response, error)
- func (a *StoresApiService) GetWatchRules(ctx context.Context, localVarOptionals map[string]interface{}) ([]WatchRule, *http.Response, error)
- func (a *StoresApiService) SyncWatchRule(ctx context.Context, id string) (*http.Response, error)
- func (a *StoresApiService) UpdateStore(ctx context.Context, id string, storeBody StoreBody) (Store, *http.Response, error)
- func (a *StoresApiService) UpdateWatchRule(ctx context.Context, id string, watchRuleBody WatchRule) (WatchRule, *http.Response, error)
- func (a *StoresApiService) ValidateBucket(ctx context.Context, validateBucketBody ValidateBucketBody) (ValidateBucketResponse, *http.Response, error)
- type ValidateBucketBody
- type ValidateBucketResponse
- type WatchRule
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes a 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 { // API Services StoresApi *StoresApiService // contains filtered or unexported fields }
APIClient manages communication with the API 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 ¶
Change base path to allow switching to mocks
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 swagger 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:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type AlternativePathFormat ¶
type AlternativePathFormat struct {
Formats []string `json:"formats,omitempty"`
}
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"` HTTPClient *http.Client }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type ErrorResponse ¶
type ErrorResponse struct {
Errors []ModelError `json:"errors,omitempty"`
}
type ModelError ¶
type Store ¶
type Store struct { Id string `json:"id,omitempty"` Name string `json:"name,omitempty"` Provider string `json:"provider,omitempty"` AccountId string `json:"account_id,omitempty"` BucketName string `json:"bucket_name,omitempty"` InputStore bool `json:"input_store,omitempty"` WatchInterval int32 `json:"watch_interval,omitempty"` Region string `json:"region,omitempty"` PrivateAccess bool `json:"private_access,omitempty"` AccessKey string `json:"access_key,omitempty"` SecretKey string `json:"secret_key,omitempty"` BaseUploadUrl string `json:"base_upload_url,omitempty"` ProviderSpecificSettings *StoreBodyProviderSpecificSettings `json:"provider_specific_settings,omitempty"` }
type StoreBody ¶
type StoreBody struct { Name string `json:"name"` Provider string `json:"provider"` BucketName string `json:"bucket_name"` Region string `json:"region"` PrivateAccess bool `json:"private_access,omitempty"` AccessKey string `json:"access_key"` SecretKey string `json:"secret_key"` ProviderSpecificSettings *StoreBodyProviderSpecificSettings `json:"provider_specific_settings,omitempty"` }
type StoreBodyProviderSpecificSettings ¶
type StoreBodyProviderSpecificSettings struct { Host string `json:"host,omitempty"` Port string `json:"port,omitempty"` CacheControl string `json:"cache_control,omitempty"` Metadata string `json:"metadata,omitempty"` FaspPort string `json:"fasp_port,omitempty"` SshPort string `json:"ssh_port,omitempty"` MaxRate string `json:"max_rate,omitempty"` MinRate string `json:"min_rate,omitempty"` Policy string `json:"policy,omitempty"` }
type StoresApiService ¶
type StoresApiService service
func (*StoresApiService) CreateStore ¶
func (a *StoresApiService) CreateStore(ctx context.Context, storeBody StoreBody) (Store, *http.Response, error)
StoresApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param storeBody @return Store
func (*StoresApiService) CreateStoreClientLink ¶
func (a *StoresApiService) CreateStoreClientLink(ctx context.Context, storeId string, serviceName string, serviceId string) (*http.Response, error)
StoresApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param storeId an id of a store @param serviceName a name of a client service @param serviceId a service id of a resource that queries for its stores @return
func (*StoresApiService) CreateWatchRule ¶
func (a *StoresApiService) CreateWatchRule(ctx context.Context, watchRuleBody WatchRule) (WatchRule, *http.Response, error)
StoresApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param watchRuleBody @return WatchRule
func (*StoresApiService) DeleteStore ¶
StoresApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param id an id of a store @return
func (*StoresApiService) DeleteStoreClientLink ¶
func (a *StoresApiService) DeleteStoreClientLink(ctx context.Context, storeId string, serviceName string, serviceId string) (*http.Response, error)
StoresApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param storeId an id of a store @param serviceName a name of a client service @param serviceId a service id of a resource that queries for its stores @return
func (*StoresApiService) DeleteWatchRule ¶
StoresApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param id an id of a resource @return
func (*StoresApiService) GetObjectUrl ¶
func (a *StoresApiService) GetObjectUrl(ctx context.Context, id string, path string, expiresIn string) (ObjectUrl, *http.Response, error)
StoresApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param id an id of a store @param path an path to a file @param expiresIn expiration time in seconds @return ObjectUrl
func (*StoresApiService) GetStore ¶
StoresApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param id an id of a store @return Store
func (*StoresApiService) GetStoreIdsForClient ¶
func (a *StoresApiService) GetStoreIdsForClient(ctx context.Context, serviceName string, serviceId string) ([]string, *http.Response, error)
StoresApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param serviceName a name of a client service @param serviceId a service id of a resource that queries for its stores @return []string
func (*StoresApiService) GetStores ¶
func (a *StoresApiService) GetStores(ctx context.Context, localVarOptionals map[string]interface{}) ([]Store, *http.Response, error)
StoresApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param optional (nil or map[string]interface{}) with one or more of:
@param "bucketName" (string) filter stores by bucket_name @param "provider" (string) filter stores by storage provider
@return []Store
func (*StoresApiService) GetWatchRule ¶
func (a *StoresApiService) GetWatchRule(ctx context.Context, id string) (WatchRule, *http.Response, error)
StoresApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param id an id of a watch rule @return WatchRule
func (*StoresApiService) GetWatchRules ¶
func (a *StoresApiService) GetWatchRules(ctx context.Context, localVarOptionals map[string]interface{}) ([]WatchRule, *http.Response, error)
StoresApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param optional (nil or map[string]interface{}) with one or more of:
@param "serviceId" (string) filter watch rules by service_id @param "storeId" (string) filter watch rules by store_id
@return []WatchRule
func (*StoresApiService) SyncWatchRule ¶
StoresApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param id an id of a watch rule @return
func (*StoresApiService) UpdateStore ¶
func (a *StoresApiService) UpdateStore(ctx context.Context, id string, storeBody StoreBody) (Store, *http.Response, error)
StoresApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param id an id of a store @param storeBody @return Store
func (*StoresApiService) UpdateWatchRule ¶
func (a *StoresApiService) UpdateWatchRule(ctx context.Context, id string, watchRuleBody WatchRule) (WatchRule, *http.Response, error)
StoresApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param id an id of a watch rule @param watchRuleBody @return WatchRule
func (*StoresApiService) ValidateBucket ¶
func (a *StoresApiService) ValidateBucket(ctx context.Context, validateBucketBody ValidateBucketBody) (ValidateBucketResponse, *http.Response, error)
StoresApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param validateBucketBody @return ValidateBucketResponse
type ValidateBucketBody ¶
type ValidateBucketResponse ¶
type ValidateBucketResponse struct {
Status string `json:"status,omitempty"`
}
type WatchRule ¶
type WatchRule struct { Id string `json:"id,omitempty"` StoreId string `json:"store_id,omitempty"` ServiceId string `json:"service_id,omitempty"` ServiceName string `json:"service_name,omitempty"` Filters *interface{} `json:"filters,omitempty"` SyncScheduledAt time.Time `json:"sync_scheduled_at,omitempty"` Synced bool `json:"synced,omitempty"` Enabled bool `json:"enabled,omitempty"` }