Documentation ¶
Index ¶
- Constants
- type Application
- type Client
- func (c *Client) AddAPIDefinitionToPackage(packageID string, input graphql.APIDefinitionInput) (*graphql.APIDefinitionExt, error)
- func (c *Client) AddAPIPackage(appId string, input graphql.PackageCreateInput) (graphql.PackageExt, error)
- func (c *Client) AddEventAPIToPackage(packageId string, input graphql.EventDefinitionInput) (*graphql.EventAPIDefinitionExt, error)
- func (c *Client) CleanupTestsScenario() error
- func (c *Client) CreateApplication(input graphql.ApplicationRegisterInput) (Application, error)
- func (c *Client) DeleteAPIDefinition(id string) (string, error)
- func (c *Client) DeleteAPIPackage(id string) (string, error)
- func (c *Client) DeleteApplication(id string) (string, error)
- func (c *Client) DeleteEventAPI(id string) (string, error)
- func (c *Client) GetOneTimeTokenForApplication(applicationId string) (graphql.TokenWithURL, error)
- func (c *Client) GetRuntime(runtimeId string) (Runtime, error)
- func (c *Client) SetDirectorToken(directorToken string)
- func (c *Client) SetupTestsScenario() error
- func (c *Client) UpdateAPIDefinition(apiId string, input graphql.APIDefinitionInput) (*graphql.APIDefinitionExt, error)
- func (c *Client) UpdateAPIPackage(id string, input graphql.PackageUpdateInput) (graphql.PackageExt, error)
- func (c *Client) UpdateApplication(applicationId string, input graphql.ApplicationUpdateInput) (Application, error)
- func (c *Client) UpdateEventAPI(apiId string, input graphql.EventDefinitionInput) (*graphql.EventAPIDefinitionExt, error)
- type IdResponse
- type Runtime
- type ScenarioLabelDefinition
- type ScenariosItems
- type ScenariosSchema
Constants ¶
View Source
const ( TenantHeader = "Tenant" ScenariosLabelName = "scenarios" AuthorizationHeader = "Authorization" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { ID string `json:"id"` Name string `json:"name"` Description *string `json:"description"` Labels map[string]interface{} `json:"labels"` Packages *graphql.PackagePageExt `json:"packages"` }
func (Application) GetContext ¶
func (a Application) GetContext() string
GetContext is a helper function that returns Application ID and Name in well formatted string (for logging)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewCompassClient ¶
func (*Client) AddAPIDefinitionToPackage ¶
func (c *Client) AddAPIDefinitionToPackage(packageID string, input graphql.APIDefinitionInput) (*graphql.APIDefinitionExt, error)
func (*Client) AddAPIPackage ¶
func (c *Client) AddAPIPackage(appId string, input graphql.PackageCreateInput) (graphql.PackageExt, error)
func (*Client) AddEventAPIToPackage ¶
func (c *Client) AddEventAPIToPackage(packageId string, input graphql.EventDefinitionInput) (*graphql.EventAPIDefinitionExt, error)
func (*Client) CleanupTestsScenario ¶
func (*Client) CreateApplication ¶
func (c *Client) CreateApplication(input graphql.ApplicationRegisterInput) (Application, error)
func (*Client) DeleteAPIDefinition ¶
func (*Client) GetOneTimeTokenForApplication ¶
func (c *Client) GetOneTimeTokenForApplication(applicationId string) (graphql.TokenWithURL, error)
func (*Client) SetDirectorToken ¶
func (*Client) SetupTestsScenario ¶
func (*Client) UpdateAPIDefinition ¶
func (c *Client) UpdateAPIDefinition(apiId string, input graphql.APIDefinitionInput) (*graphql.APIDefinitionExt, error)
func (*Client) UpdateAPIPackage ¶
func (c *Client) UpdateAPIPackage(id string, input graphql.PackageUpdateInput) (graphql.PackageExt, error)
func (*Client) UpdateApplication ¶
func (c *Client) UpdateApplication(applicationId string, input graphql.ApplicationUpdateInput) (Application, error)
func (*Client) UpdateEventAPI ¶
func (c *Client) UpdateEventAPI(apiId string, input graphql.EventDefinitionInput) (*graphql.EventAPIDefinitionExt, error)
type IdResponse ¶
type IdResponse struct {
Id string `json:"id"`
}
type ScenarioLabelDefinition ¶
type ScenarioLabelDefinition struct { Key string `json:"key"` Schema *graphql.JSONSchema `json:"schema"` }
type ScenariosItems ¶
type ScenariosSchema ¶
type ScenariosSchema struct { Type string `json:"type"` MinItems int `json:"minItems"` UniqueItems bool `json:"uniqueItems"` Items ScenariosItems `json:"items"` }
func ToScenarioSchema ¶
func ToScenarioSchema(scenarioLabelDefinition ScenarioLabelDefinition) (ScenariosSchema, error)
func (*ScenariosSchema) AddScenario ¶
func (ss *ScenariosSchema) AddScenario(value string)
func (*ScenariosSchema) RemoveScenario ¶
func (ss *ScenariosSchema) RemoveScenario(value string)
func (*ScenariosSchema) ToLabelDefinitionInput ¶
func (ss *ScenariosSchema) ToLabelDefinitionInput(key string) (graphql.LabelDefinitionInput, error)
Click to show internal directories.
Click to hide internal directories.