Documentation
¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type BasicAuth
- type Configuration
- type DataListing
- type DefaultApiService
- func (a *DefaultApiService) GetFeedGroupData(ctx _context.Context, feed string, group string, ...) (DataListing, *_nethttp.Response, error)
- func (a *DefaultApiService) GetTask(ctx _context.Context, taskId string) (Task, *_nethttp.Response, error)
- func (a *DefaultApiService) GetTasks(ctx _context.Context, localVarOptionals *GetTasksOpts) ([]Task, *_nethttp.Response, error)
- func (a *DefaultApiService) HealthCheck(ctx _context.Context) (*_nethttp.Response, error)
- func (a *DefaultApiService) ListFeedGroups(ctx _context.Context, feed string) (GroupListing, *_nethttp.Response, error)
- func (a *DefaultApiService) ListFeeds(ctx _context.Context) (FeedListing, *_nethttp.Response, error)
- func (a *DefaultApiService) Ping(ctx _context.Context) (*_nethttp.Response, error)
- func (a *DefaultApiService) VersionCheck(ctx _context.Context) (ServiceVersion, *_nethttp.Response, error)
- type Feed
- type FeedListing
- type GenericOpenAPIError
- type GetFeedGroupDataOpts
- type GetTasksOpts
- type Group
- type GroupListing
- type ServerConfiguration
- type ServerVariable
- type ServiceVersion
- type ServiceVersionApi
- type ServiceVersionDb
- type ServiceVersionEngine
- type ServiceVersionService
- type Task
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 Anchore Enterprise Feeds API v0.0.1 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 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 DataListing ¶
type DataListing struct { Data []map[string]interface{} `json:"data,omitempty"` // The token to include in subsequent requests to get the rest of the data. If empty, this response includes all data. NextToken string `json:"next_token,omitempty"` }
DataListing A collection of data items and a 'next_token' for getting the next set of results
type DefaultApiService ¶
type DefaultApiService service
DefaultApiService DefaultApi service
func (*DefaultApiService) GetFeedGroupData ¶
func (a *DefaultApiService) GetFeedGroupData(ctx _context.Context, feed string, group string, localVarOptionals *GetFeedGroupDataOpts) (DataListing, *_nethttp.Response, error)
GetFeedGroupData Method for GetFeedGroupData
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param feed
- @param group
- @param optional nil or *GetFeedGroupDataOpts - Optional Parameters:
- @param "Since" (optional.String) -
- @param "NextToken" (optional.String) -
@return DataListing
func (*DefaultApiService) GetTask ¶
func (a *DefaultApiService) GetTask(ctx _context.Context, taskId string) (Task, *_nethttp.Response, error)
GetTask Method for GetTask
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param taskId
@return Task
func (*DefaultApiService) GetTasks ¶
func (a *DefaultApiService) GetTasks(ctx _context.Context, localVarOptionals *GetTasksOpts) ([]Task, *_nethttp.Response, error)
GetTasks Method for GetTasks
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param optional nil or *GetTasksOpts - Optional Parameters:
- @param "Filter" (optional.String) -
- @param "Details" (optional.String) -
@return []Task
func (*DefaultApiService) HealthCheck ¶
HealthCheck Method for HealthCheck Health check, returns 200 and no body if service is running
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
func (*DefaultApiService) ListFeedGroups ¶
func (a *DefaultApiService) ListFeedGroups(ctx _context.Context, feed string) (GroupListing, *_nethttp.Response, error)
ListFeedGroups Method for ListFeedGroups
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param feed
@return GroupListing
func (*DefaultApiService) ListFeeds ¶
func (a *DefaultApiService) ListFeeds(ctx _context.Context) (FeedListing, *_nethttp.Response, error)
ListFeeds Method for ListFeeds
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return FeedListing
func (*DefaultApiService) Ping ¶
Ping Method for Ping Simple status check
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
func (*DefaultApiService) VersionCheck ¶
func (a *DefaultApiService) VersionCheck(ctx _context.Context) (ServiceVersion, *_nethttp.Response, error)
VersionCheck Method for VersionCheck Returns the version object for the service, including db schema version info
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ServiceVersion
type Feed ¶
type Feed struct { // Name of the feed. Name string `json:"name,omitempty"` // The level of user allowed to access this feed's groups. // TODO: missing TYPE int AccessTier int `json:"access_tier,omitempty"` // What the feed data is and means. Description string `json:"description,omitempty"` }
Feed A source of data from the anchore service composed of groups each with its own data series
type FeedListing ¶
type FeedListing struct { Feeds []Feed `json:"feeds,omitempty"` // The token to include in subsequent requests to get the rest of the data. If empty, this response includes all data. NextToken string `json:"next_token,omitempty"` }
FeedListing A collection of feed items and a 'next_token' for getting the next set of results
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 GetFeedGroupDataOpts ¶
GetFeedGroupDataOpts Optional parameters for the method 'GetFeedGroupData'
type GetTasksOpts ¶
GetTasksOpts Optional parameters for the method 'GetTasks'
type Group ¶
type Group struct { // Name of the feed group. Name string `json:"name,omitempty"` // The level of user allowed to access this group's data. // TODO: missing TYPE int AccessTier int `json:"access_tier,omitempty"` // What the group data is and means. Description string `json:"description,omitempty"` }
Group Group of data within a feed
type GroupListing ¶
type GroupListing struct { Groups []Group `json:"groups,omitempty"` // The token to include in subsequent requests to get the rest of the data. If empty, this response includes all data. NextToken string `json:"next_token,omitempty"` }
GroupListing A collection of feed items and a 'next_token' for getting the next set of results
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
type ServiceVersion ¶
type ServiceVersion struct { Service ServiceVersionService `json:"service,omitempty"` Api ServiceVersionApi `json:"api,omitempty"` Db ServiceVersionDb `json:"db,omitempty"` Engine ServiceVersionEngine `json:"engine,omitempty"` }
ServiceVersion Version information for a service
type ServiceVersionApi ¶
type ServiceVersionApi struct { // Semantic version of the api Version string `json:"version,omitempty"` }
ServiceVersionApi Api Version string
type ServiceVersionDb ¶
type ServiceVersionDb struct { // Semantic version of the db schema SchemaVersion string `json:"schema_version,omitempty"` }
ServiceVersionDb struct for ServiceVersionDb
type ServiceVersionEngine ¶
type ServiceVersionEngine struct { // Version of the installed engine library Version string `json:"version,omitempty"` // Version of the installed engine db schema Db string `json:"db,omitempty"` }
ServiceVersionEngine struct for ServiceVersionEngine
type ServiceVersionService ¶
type ServiceVersionService struct { // Semantic Version string of the service implementation Version string `json:"version,omitempty"` }
ServiceVersionService struct for ServiceVersionService
type Task ¶
type Task struct { TaskId int32 `json:"task_id,omitempty"` TaskType string `json:"task_type,omitempty"` FeedId string `json:"feed_id,omitempty"` DriverId string `json:"driver_id,omitempty"` Status string `json:"status,omitempty"` Result map[string]interface{} `json:"result,omitempty"` StartTime string `json:"start_time,omitempty"` EndTime string `json:"end_time,omitempty"` StartedBy string `json:"started_by,omitempty"` ParentTaskId int32 `json:"parent_task_id,omitempty"` SubTasks []Task `json:"sub_tasks,omitempty"` }
Task A unit of work triggered either by the system or the user
Source Files
¶
- api_default.go
- client.go
- configuration.go
- model_data_listing.go
- model_feed.go
- model_feed_listing.go
- model_group.go
- model_group_listing.go
- model_service_version.go
- model_service_version_api.go
- model_service_version_db.go
- model_service_version_engine.go
- model_service_version_service.go
- model_task.go
- response.go