Documentation
¶
Index ¶
- func NewError(text string) error
- type Auth
- type Client
- func (c *Client) CreateCloudAccount(ctx context.Context, teamID, accessKeyID, secretAccessKey, cloudName string) (*CloudAccount, error)
- func (c *Client) CreateComposite(ctx context.Context, gitURL, name, teamID, gitKeyID string) (*Composite, error)
- func (c *Client) CreateGitKey(ctx context.Context, teamID, keyMaterial, name string) (*GitKey, error)
- func (c *Client) CreatePlan(ctx context.Context, planConfigContent []byte, planID string, ...) (*Plan, error)
- func (c *Client) CreateTeam(ctx context.Context, teamName, teamDescription string) (*Team, error)
- func (c *Client) CreateToken(ctx context.Context, name, description string) (*Token, error)
- func (c *Client) DeleteCloudAccountByID(ctx context.Context, teamID, cloudID string) error
- func (c *Client) DeleteCompositeByID(ctx context.Context, teamID, compositeID string) error
- func (c *Client) DeleteGitKeyByID(ctx context.Context, teamID, gitKeyID string) error
- func (c *Client) DeletePlanByID(ctx context.Context, teamID, compositeID, planID string) error
- func (c *Client) DeleteTokenByID(ctx context.Context, tokenID string) error
- func (c *Client) DisablePlan(ctx context.Context, teamID, compositeID, planID string) (*Plan, error)
- func (c *Client) Do(ctx context.Context, method, path string, body io.Reader, obj interface{}) error
- func (c *Client) EnablePlan(ctx context.Context, teamID, compositeID, planID string) (*Plan, error)
- func (c *Client) GetCloudAccountByID(ctx context.Context, teamID, cloudID string) (*CloudAccount, error)
- func (c *Client) GetCloudAccounts(ctx context.Context, teamID string) ([]*CloudAccount, error)
- func (c *Client) GetCompositeByID(ctx context.Context, teamID, compositeID string) (*Composite, error)
- func (c *Client) GetComposites(ctx context.Context, teamID string) ([]*Composite, error)
- func (c *Client) GetGitKeyByID(ctx context.Context, teamID, gitKeyID string) (*GitKey, error)
- func (c *Client) GetGitKeys(ctx context.Context, teamID string) ([]*GitKey, error)
- func (c *Client) GetPanelInfo(ctx context.Context, teamID, compositeID, planID string) (*Panel, error)
- func (c *Client) GetPlanByID(ctx context.Context, teamID, compositeID, planID string) (*Plan, error)
- func (c *Client) GetPlans(ctx context.Context, teamID, compositeID string) ([]*Plan, error)
- func (c *Client) GetTeamByID(ctx context.Context, teamID string) (*Team, error)
- func (c *Client) GetTeams(ctx context.Context) ([]*Team, error)
- func (c *Client) GetTokenByID(ctx context.Context, tokenID string) (*Token, error)
- func (c *Client) GetTokens(ctx context.Context) ([]*Token, error)
- func (c *Client) GetUser(ctx context.Context) (*User, error)
- func (c *Client) InitPlan(ctx context.Context, ...) (*PlanConfig, error)
- func (c *Client) RunNowPlanByID(ctx context.Context, teamID, compositeID, planID string, block bool) (*Plan, error)
- type CloudAccount
- type Composite
- type GitKey
- type Interceptor
- type Link
- type Option
- type Panel
- type Plan
- type PlanAttribute
- type PlanConfig
- type Team
- type Token
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client struct
func MakeClient ¶
MakeClient make client
func (*Client) CreateCloudAccount ¶
func (c *Client) CreateCloudAccount(ctx context.Context, teamID, accessKeyID, secretAccessKey, cloudName string) (*CloudAccount, error)
CreateCloudAccount method to create a cloud object
func (*Client) CreateComposite ¶
func (c *Client) CreateComposite(ctx context.Context, gitURL, name, teamID, gitKeyID string) (*Composite, error)
CreateComposite method to create a composite object
func (*Client) CreateGitKey ¶
func (c *Client) CreateGitKey(ctx context.Context, teamID, keyMaterial, name string) (*GitKey, error)
CreateGitKey method to create a gitKey object
func (*Client) CreatePlan ¶ added in v0.0.3
func (c *Client) CreatePlan(ctx context.Context, planConfigContent []byte, planID string, planConfigID string) (*Plan, error)
CreatePlan Create plan
func (*Client) CreateTeam ¶ added in v0.0.7
CreateTeam method to create a new team
func (*Client) CreateToken ¶
CreateToken method to create a token object
func (*Client) DeleteCloudAccountByID ¶
DeleteCloudAccountByID method to delete cloud object
func (*Client) DeleteCompositeByID ¶ added in v0.0.7
DeleteCompositeByID method to delete composite info object
func (*Client) DeleteGitKeyByID ¶
DeleteGitKeyByID method to delete gitKey object
func (*Client) DeletePlanByID ¶
DeletePlanByID method to delete cloud object
func (*Client) DeleteTokenByID ¶
DeleteTokenByID method to delete token object
func (*Client) DisablePlan ¶
func (c *Client) DisablePlan(ctx context.Context, teamID, compositeID, planID string) (*Plan, error)
DisablePlan method to disable a plan object
func (*Client) Do ¶
func (c *Client) Do(ctx context.Context, method, path string, body io.Reader, obj interface{}) error
Do performs an HTTP request with a given context - the response will be decoded into obj.
func (*Client) EnablePlan ¶
EnablePlan method to enable a plan object
func (*Client) GetCloudAccountByID ¶
func (c *Client) GetCloudAccountByID(ctx context.Context, teamID, cloudID string) (*CloudAccount, error)
GetCloudAccountByID method getting cloud account by user ID
func (*Client) GetCloudAccounts ¶
GetCloudAccounts method for cloud command
func (*Client) GetCompositeByID ¶
func (c *Client) GetCompositeByID(ctx context.Context, teamID, compositeID string) (*Composite, error)
GetCompositeByID method to get composite info object
func (*Client) GetComposites ¶
GetComposites method to get composite info array object
func (*Client) GetGitKeyByID ¶
GetGitKeyByID method for gitKey command
func (*Client) GetGitKeys ¶
GetGitKeys method for gitKey command
func (*Client) GetPanelInfo ¶ added in v0.0.3
func (c *Client) GetPanelInfo(ctx context.Context, teamID, compositeID, planID string) (*Panel, error)
GetPanelInfo get panel info
func (*Client) GetPlanByID ¶
func (c *Client) GetPlanByID(ctx context.Context, teamID, compositeID, planID string) (*Plan, error)
GetPlanByID method to get plan info object
func (*Client) GetTeamByID ¶
GetTeamByID method to get Team info object by team ID
func (*Client) GetTokenByID ¶
GetTokenByID method for token command
type CloudAccount ¶
type CloudAccount struct {
TeamID string `json:"teamId"`
Name string `json:"name"`
RoleID string `json:"roleId"`
RoleName string `json:"roleName"`
Links []Link `json:"links"`
ID string `json:"id"`
}
CloudAccount struct for api payload
type Composite ¶
type Composite struct {
Name string `json:"name"`
GitURL string `json:"gitUrl"`
HasCustomDashboard bool `json:"hasCustomDashboard"`
CreatedAt time.Time `json:"createdAt"`
GitKeyID string `json:"gitKeyId"`
TeamID string `json:"teamId"`
ID string `json:"id"`
Links []Link `json:"links"`
}
Composite struct for api payload
type GitKey ¶
type GitKey struct {
TeamID string `json:"teamId"`
Name string `json:"name"`
Sha256Fingerprint string `json:"sha256fingerprint"`
Md5Fingerprint string `json:"md5fingerprint"`
Links []Link `json:"links"`
ID string `json:"id"`
}
GitKey struct for api payload
type Interceptor ¶
Interceptor is a generic request interceptor, useful for modifying or canceling the request.
type Link ¶
type Link struct {
Ref string `json:"ref"`
Method string `json:"method"`
Href string `json:"href"`
}
Link struct
type Option ¶
type Option func(*clientOptions)
Option type
func WithInterceptor ¶
func WithInterceptor(ci Interceptor) Option
WithInterceptor returns a ClientOption for adding an interceptor to a Client.
type Panel ¶ added in v0.0.3
type Panel struct {
RunID string `json:"runId"`
ResourcesArray interface{} `json:"resourcesArray"`
NumberOfResources int `json:"numberOfResources"`
PlanRefreshIntervalInHours float32 `json:"planRefreshIntervalInHours"`
LastExecutionTime interface{} `json:"lastExecutionTime"`
EngineState string `json:"engineState"`
EngineStatus string `json:"engineStatus"`
IsEnabled bool `json:"isEnabled"`
}
Panel panel struct
type Plan ¶
type Plan struct {
EngineRunInfos struct {
EngineState string `json:"engineState"`
EngineStatus string `json:"engineStatus"`
RunID string `json:"runId"`
CreatedAt time.Time `json:"createdAt"`
NumberOfResources int `json:"numberOfResources"`
EngineStateMessage struct {
ResourceError string `json:"resource_error"`
ErrorType string `json:"error_type"`
ErrorMessage string `json:"error_message"`
} `json:"engineStateMessage"`
} `json:"engineRunInfos"`
DefaultPanelRepo string `json:"defaultPanelRepo"`
DefaultPanelDirectory string `json:"defaultPanelDirectory"`
DefaultPanelBranch string `json:"defaultPanelBranch"`
Name string `json:"name"`
CloudAccountID string `json:"cloudAccountId"`
IamUserAccessKeyID string `json:"iamUserAccessKeyId"`
IamUserID string `json:"iamUserId"`
IamUserSecretAccessKey string `json:"iamUserSecretAccessKey"`
SnsSubscriptionArn string `json:"snsSubscriptionArn"`
SqsArn string `json:"sqsArn"`
SqsURL string `json:"sqsUrl"`
TopicArn string `json:"topicArn"`
EnginePrefix string `json:"enginePrefix"`
IsSynchronizing bool `json:"isSynchronizing"`
IsDraft bool `json:"isDraft"`
DefaultRegion string `json:"defaultRegion"`
RefreshInterval int `json:"refreshInterval"`
RunCounter int `json:"runCounter"`
Revision string `json:"revision"`
Branch string `json:"branch"`
Enabled bool `json:"enabled"`
Links []Link `json:"links"`
ID string `json:"id"`
IntervalInMinutes int `json:"intervalInMinutes"`
}
Plan struct object
type PlanAttribute ¶ added in v0.0.3
type PlanAttribute struct {
Namespace string `json:"namespace"`
Default interface{} `json:"default"`
Description string `json:"description"`
Required bool `json:"required"`
Type string `json:"type"`
Class string `json:"class"`
Value interface{} `json:"value"`
}
PlanAttribute struct object
type PlanConfig ¶
type PlanConfig struct {
GitRevision string `json:"gitRevision"`
GitBranch string `json:"gitBranch"`
TeamID string `json:"teamId"`
Links []Link `json:"links"`
Variables map[string]PlanAttribute `json:"variables"`
PlanID string `json:"planId"`
ID string `json:"id"`
}
PlanConfig struct object
type Team ¶
type Team struct {
TeamName string `json:"teamName"`
OwnerID string `json:"ownerId"`
TeamIcon string `json:"teamIcon"`
TeamDescription interface{} `json:"teamDescription"`
Default bool `json:"default"`
Links []Link `json:"links"`
ID string `json:"id"`
}
Team struct for api payload
type Token ¶
type Token struct {
Name string `json:"name"`
Description string `json:"description"`
CreationDate time.Time `json:"creationDate"`
Links []Link `json:"links"`
ID string `json:"id"`
}
Token struct
type User ¶
type User struct {
Username string `json:"username"`
Email string `json:"email"`
GravatarIconURL string `json:"gravatarIconUrl"`
CreatedAt time.Time `json:"createdAt"`
DefaultTeamID string `json:"defaultTeamId"`
Links []Link `json:"links"`
ID string `json:"id"`
}
User struct for api payload