Documentation ¶
Index ¶
- Constants
- func NewApplicationDeploymentRef(name string) *applicationDeploymentRef
- type APIClientMock
- type ApiClient
- func (api *ApiClient) Delete(deletePayload *DeletePayload) (*DeleteResults, error)
- func (api *ApiClient) DeleteVault(vaultName string) error
- func (api *ApiClient) Deploy(deployPayload *DeployPayload) (*DeployResults, error)
- func (api *ApiClient) Do(method string, endpoint string, payload []byte) (*BooberResponse, error)
- func (api *ApiClient) DoWithHeader(method string, endpoint string, header map[string]string, payload []byte) (*ResponseBundle, error)
- func (api *ApiClient) Exists(existsPayload *ExistsPayload) (*ExistsResults, error)
- func (api *ApiClient) GetApplyResult(deployId string) (string, error)
- func (api *ApiClient) GetAuroraConfig() (*auroraconfig.AuroraConfig, error)
- func (api *ApiClient) GetAuroraConfigFile(fileName string) (*auroraconfig.AuroraConfigFile, string, error)
- func (api *ApiClient) GetAuroraConfigNames() (*auroraconfig.AuroraConfigNames, error)
- func (api *ApiClient) GetAuroraDeploySpec(applications []string, defaults bool) ([]deploymentspec.DeploymentSpec, error)
- func (api *ApiClient) GetAuroraDeploySpecFormatted(environment, application string, defaults bool) (string, error)
- func (api *ApiClient) GetClientConfig() (*ClientConfig, error)
- func (api *ApiClient) GetFileNames() (auroraconfig.FileNames, error)
- func (api *ApiClient) GetSecretFile(vault, secret string) (string, string, error)
- func (api *ApiClient) GetVault(vaultName string) (*AuroraSecretVault, error)
- func (api *ApiClient) GetVaults() ([]*AuroraVaultInfo, error)
- func (api *ApiClient) PutAuroraConfig(endpoint string, payload []byte) (string, error)
- func (api *ApiClient) PutAuroraConfigFile(file *auroraconfig.AuroraConfigFile, eTag string) error
- func (api *ApiClient) RunGraphQl(graphQlRequest string, response interface{}) error
- func (api *ApiClient) RunGraphQlMutation(graphQlRequest *graphql.Request, response interface{}) error
- func (api *ApiClient) SaveVault(vault AuroraSecretVault) error
- func (api *ApiClient) UpdateSecretFile(vault, secret, eTag string, content []byte) error
- func (api *ApiClient) ValidateAuroraConfig(ac *auroraconfig.AuroraConfig, fullValidation bool) (string, error)
- func (api *ApiClient) ValidateRemoteAuroraConfig(fullValidation bool) (string, error)
- type ApplicationDeploymentClient
- type ApplicationDeploymentClientMock
- func (api *ApplicationDeploymentClientMock) Delete(deletePayload *DeletePayload) (*DeleteResults, error)
- func (api *ApplicationDeploymentClientMock) Deploy(deployPayload *DeployPayload) (*DeployResults, error)
- func (api *ApplicationDeploymentClientMock) Exists(existsPayload *ExistsPayload) (*ExistsResults, error)
- func (api *ApplicationDeploymentClientMock) GetApplyResult(deployID string) (string, error)
- type ApplicationRef
- type AuroraConfigClient
- type AuroraConfigClientMock
- func (api *AuroraConfigClientMock) GetAuroraConfig() (*auroraconfig.AuroraConfig, error)
- func (api *AuroraConfigClientMock) GetAuroraConfigFile(fileName string) (*auroraconfig.AuroraConfigFile, string, error)
- func (api *AuroraConfigClientMock) GetAuroraConfigNames() (*auroraconfig.AuroraConfigNames, error)
- func (api *AuroraConfigClientMock) GetFileNames() (auroraconfig.FileNames, error)
- func (api *AuroraConfigClientMock) PutAuroraConfig(endpoint string, payload []byte) (string, error)
- func (api *AuroraConfigClientMock) PutAuroraConfigFile(file *auroraconfig.AuroraConfigFile, eTag string) error
- func (api *AuroraConfigClientMock) ValidateAuroraConfig(ac *auroraconfig.AuroraConfig, fullValidation bool) (string, error)
- type AuroraSecretVault
- type AuroraVaultInfo
- type BooberResponse
- type ClientConfig
- type DeletePayload
- type DeleteResult
- type DeleteResults
- type DeployPayload
- type DeployResult
- type DeployResults
- type DeploySpecClient
- type DeploySpecClientMock
- type Doer
- type ErrorResponse
- type ExistsPayload
- type ExistsResult
- type ExistsResults
- type ResponseBundle
- type Secrets
- type VaultFileResource
Constants ¶
const ( BooberApiVersion = "/v1" ErrAccessDenied = "Access Denied" ErrfTokenHasExpired = "Token has expired for (%s). Please login: ao login <affiliation>" )
Variables ¶
This section is empty.
Functions ¶
func NewApplicationDeploymentRef ¶
func NewApplicationDeploymentRef(name string) *applicationDeploymentRef
Types ¶
type APIClientMock ¶
APIClientMock is a base mock type
func (*APIClientMock) Do ¶
func (api *APIClientMock) Do(method string, endpoint string, payload []byte) (*BooberResponse, error)
Do default mock implementation
func (*APIClientMock) DoWithHeader ¶
func (api *APIClientMock) DoWithHeader(method string, endpoint string, header map[string]string, payload []byte) (*ResponseBundle, error)
DoWithHeader default mock implementation
type ApiClient ¶
type ApiClient struct { Host string GoboHost string Token string Affiliation string RefName string }
func NewApiClient ¶
func NewApiClientDefaultRef ¶
func (*ApiClient) Delete ¶
func (api *ApiClient) Delete(deletePayload *DeletePayload) (*DeleteResults, error)
func (*ApiClient) DeleteVault ¶
func (*ApiClient) Deploy ¶
func (api *ApiClient) Deploy(deployPayload *DeployPayload) (*DeployResults, error)
func (*ApiClient) DoWithHeader ¶
func (*ApiClient) Exists ¶
func (api *ApiClient) Exists(existsPayload *ExistsPayload) (*ExistsResults, error)
func (*ApiClient) GetApplyResult ¶
func (*ApiClient) GetAuroraConfig ¶
func (api *ApiClient) GetAuroraConfig() (*auroraconfig.AuroraConfig, error)
func (*ApiClient) GetAuroraConfigFile ¶
func (api *ApiClient) GetAuroraConfigFile(fileName string) (*auroraconfig.AuroraConfigFile, string, error)
func (*ApiClient) GetAuroraConfigNames ¶ added in v1.2.3
func (api *ApiClient) GetAuroraConfigNames() (*auroraconfig.AuroraConfigNames, error)
func (*ApiClient) GetAuroraDeploySpec ¶
func (api *ApiClient) GetAuroraDeploySpec(applications []string, defaults bool) ([]deploymentspec.DeploymentSpec, error)
func (*ApiClient) GetAuroraDeploySpecFormatted ¶
func (*ApiClient) GetClientConfig ¶
func (api *ApiClient) GetClientConfig() (*ClientConfig, error)
func (*ApiClient) GetFileNames ¶
func (api *ApiClient) GetFileNames() (auroraconfig.FileNames, error)
func (*ApiClient) GetSecretFile ¶
func (*ApiClient) GetVault ¶
func (api *ApiClient) GetVault(vaultName string) (*AuroraSecretVault, error)
func (*ApiClient) GetVaults ¶
func (api *ApiClient) GetVaults() ([]*AuroraVaultInfo, error)
func (*ApiClient) PutAuroraConfig ¶
func (*ApiClient) PutAuroraConfigFile ¶
func (api *ApiClient) PutAuroraConfigFile(file *auroraconfig.AuroraConfigFile, eTag string) error
func (*ApiClient) RunGraphQl ¶
func (*ApiClient) RunGraphQlMutation ¶
func (*ApiClient) SaveVault ¶
func (api *ApiClient) SaveVault(vault AuroraSecretVault) error
func (*ApiClient) UpdateSecretFile ¶
func (*ApiClient) ValidateAuroraConfig ¶
func (api *ApiClient) ValidateAuroraConfig(ac *auroraconfig.AuroraConfig, fullValidation bool) (string, error)
type ApplicationDeploymentClient ¶
type ApplicationDeploymentClient interface { Doer Deploy(deployPayload *DeployPayload) (*DeployResults, error) Delete(deletePayload *DeletePayload) (*DeleteResults, error) Exists(existPayload *ExistsPayload) (*ExistsResults, error) GetApplyResult(deployId string) (string, error) }
type ApplicationDeploymentClientMock ¶
type ApplicationDeploymentClientMock struct {
APIClientMock
}
ApplicationDeploymentClientMock is a base mock type
func NewApplicationDeploymentClientMock ¶
func NewApplicationDeploymentClientMock() *ApplicationDeploymentClientMock
NewApplicationDeploymentClientMock creates a new ApplicationDeploymentClientMock
func (*ApplicationDeploymentClientMock) Delete ¶
func (api *ApplicationDeploymentClientMock) Delete(deletePayload *DeletePayload) (*DeleteResults, error)
Delete default mock implementation
func (*ApplicationDeploymentClientMock) Deploy ¶
func (api *ApplicationDeploymentClientMock) Deploy(deployPayload *DeployPayload) (*DeployResults, error)
Deploy default mock implementation
func (*ApplicationDeploymentClientMock) Exists ¶
func (api *ApplicationDeploymentClientMock) Exists(existsPayload *ExistsPayload) (*ExistsResults, error)
Exists default mock implementation
func (*ApplicationDeploymentClientMock) GetApplyResult ¶
func (api *ApplicationDeploymentClientMock) GetApplyResult(deployID string) (string, error)
GetApplyResult default mock implementation
type ApplicationRef ¶
func NewApplicationRef ¶
func NewApplicationRef(namespace, name string) *ApplicationRef
type AuroraConfigClient ¶
type AuroraConfigClient interface { Doer GetFileNames() (auroraconfig.FileNames, error) GetAuroraConfig() (*auroraconfig.AuroraConfig, error) GetAuroraConfigNames() (*auroraconfig.AuroraConfigNames, error) PutAuroraConfig(endpoint string, payload []byte) (string, error) ValidateAuroraConfig(ac *auroraconfig.AuroraConfig, fullValidation bool) (string, error) GetAuroraConfigFile(fileName string) (*auroraconfig.AuroraConfigFile, string, error) PutAuroraConfigFile(file *auroraconfig.AuroraConfigFile, eTag string) error }
type AuroraConfigClientMock ¶
type AuroraConfigClientMock struct { APIClientMock // contains filtered or unexported fields }
AuroraConfigClientMock is a base mock type
func NewAuroraConfigClientMock ¶
func NewAuroraConfigClientMock(fileNames auroraconfig.FileNames) *AuroraConfigClientMock
NewAuroraConfigClientMock returns a new AurorConfigClientMock
func (*AuroraConfigClientMock) GetAuroraConfig ¶
func (api *AuroraConfigClientMock) GetAuroraConfig() (*auroraconfig.AuroraConfig, error)
GetAuroraConfig default mock implementation
func (*AuroraConfigClientMock) GetAuroraConfigFile ¶
func (api *AuroraConfigClientMock) GetAuroraConfigFile(fileName string) (*auroraconfig.AuroraConfigFile, string, error)
GetAuroraConfigFile default mock implementation
func (*AuroraConfigClientMock) GetAuroraConfigNames ¶
func (api *AuroraConfigClientMock) GetAuroraConfigNames() (*auroraconfig.AuroraConfigNames, error)
GetAuroraConfigNames default mock implementation
func (*AuroraConfigClientMock) GetFileNames ¶
func (api *AuroraConfigClientMock) GetFileNames() (auroraconfig.FileNames, error)
GetFileNames default mock implementation
func (*AuroraConfigClientMock) PutAuroraConfig ¶
func (api *AuroraConfigClientMock) PutAuroraConfig(endpoint string, payload []byte) (string, error)
PutAuroraConfig default mock implementation
func (*AuroraConfigClientMock) PutAuroraConfigFile ¶
func (api *AuroraConfigClientMock) PutAuroraConfigFile(file *auroraconfig.AuroraConfigFile, eTag string) error
PutAuroraConfigFile default mock implementation
func (*AuroraConfigClientMock) ValidateAuroraConfig ¶
func (api *AuroraConfigClientMock) ValidateAuroraConfig(ac *auroraconfig.AuroraConfig, fullValidation bool) (string, error)
ValidateAuroraConfig default mock implementation
type AuroraSecretVault ¶
type AuroraSecretVault struct { Name string `json:"name"` Permissions []string `json:"permissions"` Secrets Secrets `json:"secrets"` }
TODO: rename to request
func NewAuroraSecretVault ¶
func NewAuroraSecretVault(name string) *AuroraSecretVault
type AuroraVaultInfo ¶
type AuroraVaultInfo struct { Name string `json:"name"` Permissions []string `json:"permissions"` Secrets Secrets `json:"secrets"` HasAccess bool `json:"hasAccess"` }
TODO: rename to response
type BooberResponse ¶
type BooberResponse struct { Success bool `json:"success"` Message string `json:"message"` Items json.RawMessage `json:"items"` Count int `json:"count"` }
func (*BooberResponse) Error ¶
func (res *BooberResponse) Error() error
func (*BooberResponse) ParseFirstItem ¶
func (res *BooberResponse) ParseFirstItem(data interface{}) error
func (*BooberResponse) ParseItems ¶
func (res *BooberResponse) ParseItems(data interface{}) error
type ClientConfig ¶
type DeletePayload ¶
type DeletePayload struct {
ApplicationRefs []ApplicationRef `json:"applicationRefs"`
}
func NewDeletePayload ¶
func NewDeletePayload(applicationRefs []ApplicationRef) *DeletePayload
type DeleteResult ¶
type DeleteResult struct { ApplicationRef ApplicationRef `json:"applicationRef"` Success bool `json:"success"` Reason string `json:"reason"` }
type DeleteResults ¶
type DeleteResults struct { Message string Success bool Results []DeleteResult }
type DeployPayload ¶
type DeployPayload struct { ApplicationDeploymentRefs []applicationDeploymentRef `json:"applicationDeploymentRefs"` Overrides map[string]string `json:"overrides"` Deploy bool `json:"deploy"` }
func NewDeployPayload ¶
func NewDeployPayload(applications []string, overrides map[string]string) *DeployPayload
type DeployResult ¶
type DeployResult struct { DeployId string `json:"deployId"` DeploymentSpec deploymentspec.DeploymentSpec `json:"deploymentSpec"` Success bool `json:"success"` Ignored bool `json:"ignored"` Reason string `json:"reason"` Warnings []string `json:"warnings"` }
type DeployResults ¶
type DeployResults struct { Message string Success bool Results []DeployResult }
type DeploySpecClient ¶
type DeploySpecClient interface { Doer GetAuroraDeploySpec(applications []string, defaults bool) ([]deploymentspec.DeploymentSpec, error) GetAuroraDeploySpecFormatted(environment, application string, defaults bool) (string, error) }
type DeploySpecClientMock ¶
type DeploySpecClientMock struct { APIClientMock // contains filtered or unexported fields }
DeploySpecClientMock is a base mock type
func NewDeploySpecClientMock ¶
func NewDeploySpecClientMock(deploySpecs []deploymentspec.DeploymentSpec) *DeploySpecClientMock
NewDeploySpecClientMock creates a new DeploySpecClientMock
func (*DeploySpecClientMock) GetAuroraDeploySpec ¶
func (api *DeploySpecClientMock) GetAuroraDeploySpec(applications []string, defaults bool) ([]deploymentspec.DeploymentSpec, error)
GetAuroraDeploySpec default mock implementation
func (*DeploySpecClientMock) GetAuroraDeploySpecFormatted ¶
func (api *DeploySpecClientMock) GetAuroraDeploySpecFormatted(environment, application string, defaults bool) (string, error)
GetAuroraDeploySpecFormatted default mock implementation
type ErrorResponse ¶
type ErrorResponse struct { ContainsError bool GenericErrors []string IllegalFieldErrors []string MissingFieldErrors []string InvalidFieldErrors []string // contains filtered or unexported fields }
func (*ErrorResponse) String ¶
func (e *ErrorResponse) String() string
type ExistsPayload ¶
type ExistsPayload struct {
ApplicationDeploymentRefs []applicationDeploymentRef `json:"adr"`
}
func NewExistsPayload ¶
func NewExistsPayload(applications []string) *ExistsPayload
type ExistsResult ¶
type ExistsResult struct { ApplicationRef ApplicationRef `json:"applicationRef"` Exists bool `json:"exists"` Success bool `json:"success"` Message string `json:"message"` }
type ExistsResults ¶
type ExistsResults struct { Message string Success bool Results []ExistsResult }
type ResponseBundle ¶
type ResponseBundle struct { BooberResponse *BooberResponse HttpResponse *http.Response }
type Secrets ¶
func (Secrets) RemoveSecret ¶
type VaultFileResource ¶
type VaultFileResource struct {
Contents string `json:"contents"`
}