Documentation
¶
Index ¶
- func DecodeGraphQLResponseInto(body []byte, target interface{}) error
- func DecodeResponseInto(body []byte, target interface{}) error
- func EncodeToJSON(object interface{}) ([]byte, error)
- func FindInSlice(slice []string, val string) bool
- func GetAccountAdminsDiff(desiredAdmins []string, existingAdmins []string) (adminsToAdd []string, adminsToDelete []string)
- func GetUsersDiff(desiredUsers []string, existingUsers []TeamUser) (usersToAdd []string, usersToDelete []string)
- func ToQS(qs map[string]string) string
- func UriEncodeEvent(event string) string
- type Account
- type AccountDetails
- type Active
- type ApiKey
- type ApiKeyScopeSnapshot
- type ApiKeySubject
- type Build
- type BuildStepConfig
- type CFCRState
- type Client
- func (client *Client) ActivateUser(userId string) (*User, error)
- func (client *Client) AddAccountToIDP(accountId, idpId string) error
- func (client *Client) AddNewUserToAccount(accountId, userName, userEmail string) (*User, error)
- func (client *Client) AddPendingUser(user *NewUser) (*User, error)
- func (client *Client) AddUserToTeam(teamID, userID string) error
- func (client *Client) AddUserToTeamByAdmin(userID string, accountID string, team string) error
- func (client *Client) CreateAbacRule(gitopsAbacRule *GitopsAbacRule) (*GitopsAbacRule, error)
- func (client *Client) CreateAccount(account *Account) (*Account, error)
- func (client *Client) CreateApiKey(userID string, accountId string, apiKey *ApiKey) (string, error)
- func (client *Client) CreateContext(context *Context) (*Context, error)
- func (client *Client) CreateHermesTriggerByEventAndPipeline(event string, pipeline string) error
- func (client *Client) CreateHermesTriggerEvent(event *HermesTriggerEvent) (string, error)
- func (client *Client) CreatePermission(permission *Permission) (*Permission, error)
- func (client *Client) CreatePipeline(pipeline *Pipeline) (*Pipeline, error)
- func (client *Client) CreateProject(project *Project) (*Project, error)
- func (client *Client) CreateRegistry(registry *Registry) (*Registry, error)
- func (client *Client) CreateStepTypes(stepTypes *StepTypes) (*StepTypes, error)
- func (client *Client) CreateTeam(team *Team) (*NewTeam, error)
- func (client *Client) DeleteAPIKey(keyID string) error
- func (client *Client) DeleteAbacRule(id string) (*GitopsAbacRule, error)
- func (client *Client) DeleteAccount(id string) error
- func (client *Client) DeleteContext(name string) error
- func (client *Client) DeleteHermesTriggerByEventAndPipeline(event string, pipeline string) error
- func (client *Client) DeletePermission(id string) error
- func (client *Client) DeletePipeline(name string) error
- func (client *Client) DeleteProject(id string) error
- func (client *Client) DeleteRegistry(name string) error
- func (client *Client) DeleteStepTypes(name string) error
- func (client *Client) DeleteTeam(id string) error
- func (client *Client) DeleteUser(userName string) error
- func (client *Client) DeleteUserAsAccountAdmin(accountId, userId string) error
- func (client *Client) DeleteUserFromAccount(accountId, userId string) error
- func (client *Client) DeleteUserFromTeam(teamID, userID string) error
- func (client *Client) GenerateToken(xToken string, apiKey *ApiKey) (string, error)
- func (client *Client) GetAPIKey(keyID string) (*ApiKey, error)
- func (client *Client) GetAbacRuleByID(id string) (*GitopsAbacRule, error)
- func (client *Client) GetAbacRulesList(entityType string) ([]GitopsAbacRule, error)
- func (client *Client) GetAccountByID(id string) (*Account, error)
- func (client *Client) GetAccountByName(name string) (*Account, error)
- func (client *Client) GetAccountIDPs() (*[]IDP, error)
- func (client *Client) GetAccountsList(accountsId []string) (*[]Account, error)
- func (client *Client) GetAllAccounts() (*[]Account, error)
- func (client *Client) GetAllUsers() (*[]User, error)
- func (client *Client) GetApiKeysList() ([]ApiKey, error)
- func (client *Client) GetContext(name string) (*Context, error)
- func (client *Client) GetCurrentAccount() (*CurrentAccount, error)
- func (client *Client) GetHermesTriggerByEventAndPipeline(event string, pipeline string) (*HermesTrigger, error)
- func (client *Client) GetHermesTriggerEvent(event string) (*HermesTriggerEvent, error)
- func (client *Client) GetIDPs() (*[]IDP, error)
- func (client *Client) GetIdpByID(idpID string) (*IDP, error)
- func (client *Client) GetIdpByName(idpName string) (*IDP, error)
- func (client *Client) GetPermissionByID(id string) (*Permission, error)
- func (client *Client) GetPermissionList(teamID, action, resource string) ([]Permission, error)
- func (client *Client) GetPipeline(name string) (*Pipeline, error)
- func (client *Client) GetPipelines() (*[]Pipeline, error)
- func (client *Client) GetProjectByID(id string) (*Project, error)
- func (client *Client) GetProjectByName(name string) (*Project, error)
- func (client *Client) GetRegistry(identifier string) (*Registry, error)
- func (client *Client) GetStepTypes(identifier string) (*StepTypes, error)
- func (client *Client) GetStepTypesVersions(name string) ([]string, error)
- func (client *Client) GetTeamByID(id string) (*Team, error)
- func (client *Client) GetTeamByName(name string) (*Team, error)
- func (client *Client) GetTeamList() ([]Team, error)
- func (client *Client) GetUserByID(userId string) (*User, error)
- func (client *Client) GetXAccessToken(userID string, accountId string) (string, error)
- func (client *Client) RenameTeam(teamID, name string) error
- func (client *Client) RequestAPI(opt *RequestOptions) ([]byte, error)
- func (client *Client) RequestApiXAccessToken(opt *RequestOptions) ([]byte, error)
- func (client *Client) SendGqlRequest(request GraphQLRequest) ([]byte, error)
- func (client *Client) SetUserAsAccountAdmin(accountId, userId string) error
- func (client *Client) SynchronizeClientWithGroup(name, ssoType string, notifications bool) error
- func (client *Client) UpdateAPIKey(key *ApiKey) error
- func (client *Client) UpdateAccount(account *Account) (*Account, error)
- func (client *Client) UpdateContext(context *Context) (*Context, error)
- func (client *Client) UpdatePipeline(pipeline *Pipeline) (*Pipeline, error)
- func (client *Client) UpdateProject(project *Project) error
- func (client *Client) UpdateRegistry(registry *Registry) (*Registry, error)
- func (client *Client) UpdateStepTypes(stepTypes *StepTypes) (*StepTypes, error)
- func (client *Client) UpdateUserAccounts(userId string, accounts []Account) error
- type CodefreshObject
- type Collaborators
- type Context
- type ContextErrorResponse
- type ContextMetadata
- type ContextSpec
- type Credentials
- type CronTrigger
- type CurrentAccount
- type CurrentAccountUser
- type DataRetention
- type DockerRegistry
- type EntityAbacAttribute
- type ErrorResponse
- type EventData
- type Exist
- type GitopsAbacRule
- type GitopsAbacRuleResponse
- type GitopsAbacRulesListResponse
- type GraphQLRequest
- type HermesTrigger
- type HermesTriggerEvent
- type Hooks
- type IDP
- type ImageViewConfig
- type Integration
- type Labels
- type Limits
- type Login
- type Metadata
- type NewPermission
- type NewTeam
- type NewUser
- type NotificationEvent
- type PaymentPlan
- type Permission
- type Personal
- type Pipeline
- type Pipelines
- type Project
- type Registry
- type RequestOptions
- type RuntimeEnvironment
- type ShortProfile
- type Spec
- type SpecStepTypes
- type SpecTemplate
- type Stages
- type StepTypes
- type StepTypesVersion
- type StepTypesVersions
- type Steps
- type Suspension
- type Team
- type TeamUser
- type TokenResponse
- type Trigger
- type TriggerOptions
- type User
- type UserAccounts
- type Variable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeGraphQLResponseInto ¶ added in v0.5.0
func DecodeResponseInto ¶
DecodeResponseInto json Unmarshall
func FindInSlice ¶
func GetAccountAdminsDiff ¶
func GetUsersDiff ¶
func UriEncodeEvent ¶
Types ¶
type Account ¶
type Account struct {
Suspension *Suspension `json:"suspension,omitempty"`
Integrations *Integration `json:"integrations,omitempty"`
Build *Build `json:"build,omitempty"`
PaymentPlan *PaymentPlan `json:"paymentPlan,omitempty"`
ImageViewConfig *ImageViewConfig `json:"imageViewConfig,omitempty"`
BuildStepConfig *BuildStepConfig `json:"buildStepConfig,omitempty"`
CFCRState *CFCRState `json:"CFCRState,omitempty"`
AllowedDomains []interface{} `json:"allowedDomains,omitempty"`
Admins []string `json:"admins,omitempty"`
Environment int `json:"environment,omitempty"`
DedicatedInfrastructure bool `json:"dedicatedInfrastructure,omitempty"`
CanUsePrivateRepos bool `json:"canUsePrivateRepos,omitempty"`
SupportPlan string `json:"supportPlan,omitempty"`
IncreasedAttention bool `json:"increasedAttention,omitempty"`
LocalUserPasswordIDPEnabled bool `json:"localUserPasswordIDPEnabled,omitempty"`
CodefreshEnv string `json:"codefreshEnv,omitempty"`
ID string `json:"_id,omitempty"`
BadgeToken string `json:"badgeToken,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
Name string `json:"name,omitempty"`
RuntimeEnvironment string `json:"runtimeEnvironment,omitempty"`
CfcrRepositoryPath string `json:"cfcrRepositoryPath,omitempty"`
Notifications []NotificationEvent `json:"notifications,omitempty"`
RepoPermission string `json:"repoPermission,omitempty"`
Limits *Limits `json:"limits,omitempty"`
Features map[string]bool `json:"features,omitempty"`
}
func ToSlimAccount ¶
func ToSlimAccounts ¶
func (*Account) SetFeatures ¶
Decodes a TypeMap of map[string]interface{} into map[string]bool for account features
type AccountDetails ¶
type AccountDetails struct {
AccountDetails Account `json:"accountDetails"`
}
type ApiKey ¶
type ApiKey struct {
Subject ApiKeySubject `json:"subject,omitempty"`
ID string `json:"_id,omitempty"`
Name string `json:"name"`
Scopes []string `json:"scopes,omitempty"`
TokenPrefix string `json:"tokenPrefix,omitempty"`
ScopeSnapshot ApiKeyScopeSnapshot `json:"scopeSnapshot,omitempty"`
Created string `json:"created,omitempty"`
}
type ApiKeyScopeSnapshot ¶
type ApiKeySubject ¶
type BuildStepConfig ¶
type Client ¶
type Client struct {
Token string
TokenHeader string
Host string
HostV2 string
Client *http.Client
}
Client token, host, htpp.Client
func NewClient ¶
NewClient returns a new client configured to communicate on a server with the given hostname and to send an Authorization Header with the value of token
func (*Client) AddAccountToIDP ¶
add account to idp
func (*Client) AddNewUserToAccount ¶
func (*Client) AddUserToTeam ¶
func (*Client) AddUserToTeamByAdmin ¶
AddUserToTeamByAdmin - adds user to team with swich account
func (*Client) CreateAbacRule ¶ added in v0.5.0
func (client *Client) CreateAbacRule(gitopsAbacRule *GitopsAbacRule) (*GitopsAbacRule, error)
func (*Client) CreateAccount ¶
func (*Client) CreateApiKey ¶
CreateApiKey - creates api key for account by switch to the user and call /api/auth/keys
func (*Client) CreateContext ¶
func (*Client) CreateHermesTriggerByEventAndPipeline ¶
func (*Client) CreateHermesTriggerEvent ¶
func (client *Client) CreateHermesTriggerEvent(event *HermesTriggerEvent) (string, error)
func (*Client) CreatePermission ¶
func (client *Client) CreatePermission(permission *Permission) (*Permission, error)
func (*Client) CreatePipeline ¶
func (*Client) CreateProject ¶
CreateProject POST project
func (*Client) CreateRegistry ¶
func (*Client) CreateStepTypes ¶
func (*Client) CreateTeam ¶
CreateTeam POST team
func (*Client) DeleteAPIKey ¶
func (*Client) DeleteAbacRule ¶ added in v0.5.0
func (client *Client) DeleteAbacRule(id string) (*GitopsAbacRule, error)
func (*Client) DeleteAccount ¶
func (*Client) DeleteContext ¶
func (*Client) DeleteHermesTriggerByEventAndPipeline ¶
func (*Client) DeletePermission ¶
func (*Client) DeletePipeline ¶
func (*Client) DeleteProject ¶
DeleteProject DELETE
func (*Client) DeleteRegistry ¶
func (*Client) DeleteStepTypes ¶
func (*Client) DeleteUser ¶
func (*Client) DeleteUserAsAccountAdmin ¶
func (*Client) DeleteUserFromAccount ¶
func (*Client) DeleteUserFromTeam ¶
func (*Client) GenerateToken ¶
func (*Client) GetAbacRuleByID ¶ added in v0.5.0
func (client *Client) GetAbacRuleByID(id string) (*GitopsAbacRule, error)
GetAbacRuleByID -
func (*Client) GetAbacRulesList ¶ added in v0.5.0
func (client *Client) GetAbacRulesList(entityType string) ([]GitopsAbacRule, error)
func (*Client) GetAccountByName ¶
GetAccountByName - returns account
func (*Client) GetAccountIDPs ¶
get account idps
func (*Client) GetAccountsList ¶
func (*Client) GetAllAccounts ¶
func (*Client) GetAllUsers ¶
func (*Client) GetApiKeysList ¶
func (*Client) GetCurrentAccount ¶
func (client *Client) GetCurrentAccount() (*CurrentAccount, error)
GetCurrentAccount -
func (*Client) GetHermesTriggerByEventAndPipeline ¶
func (client *Client) GetHermesTriggerByEventAndPipeline(event string, pipeline string) (*HermesTrigger, error)
func (*Client) GetHermesTriggerEvent ¶
func (client *Client) GetHermesTriggerEvent(event string) (*HermesTriggerEvent, error)
func (*Client) GetIdpByName ¶
get idp id by idp name
func (*Client) GetPermissionByID ¶
func (client *Client) GetPermissionByID(id string) (*Permission, error)
GetPermissionByID -
func (*Client) GetPermissionList ¶
func (client *Client) GetPermissionList(teamID, action, resource string) ([]Permission, error)
func (*Client) GetPipelines ¶ added in v0.4.0
func (*Client) GetProjectByID ¶
GetProjectByID get project object by id
func (*Client) GetProjectByName ¶
GetProjectByName get project object by name
func (*Client) GetRegistry ¶
GetRegistry identifier is ObjectId or name
func (*Client) GetStepTypes ¶
func (*Client) GetStepTypesVersions ¶
func (*Client) GetTeamList ¶
func (*Client) GetXAccessToken ¶
GetXAccessToken
func (*Client) RenameTeam ¶
func (*Client) RequestAPI ¶
func (client *Client) RequestAPI(opt *RequestOptions) ([]byte, error)
RequestAPI http request to Codefresh API
func (*Client) RequestApiXAccessToken ¶
func (client *Client) RequestApiXAccessToken(opt *RequestOptions) ([]byte, error)
func (*Client) SendGqlRequest ¶ added in v0.5.0
func (client *Client) SendGqlRequest(request GraphQLRequest) ([]byte, error)
func (*Client) SetUserAsAccountAdmin ¶
func (*Client) SynchronizeClientWithGroup ¶
func (*Client) UpdateAPIKey ¶
func (*Client) UpdateAccount ¶
func (*Client) UpdateContext ¶
func (*Client) UpdatePipeline ¶
func (*Client) UpdateProject ¶
UpdateProject PATCH project
func (*Client) UpdateRegistry ¶
func (*Client) UpdateStepTypes ¶
type CodefreshObject ¶
type CodefreshObject interface {
GetID() string
}
CodefreshObject codefresh interface
type Collaborators ¶
type Context ¶
type Context struct {
Metadata ContextMetadata `json:"metadata,omitempty"`
Spec ContextSpec `json:"spec,omitempty"`
Version string `json:"version,omitempty"`
}
type ContextErrorResponse ¶
type ContextMetadata ¶
type ContextMetadata struct {
Name string `json:"name,omitempty"`
}
type ContextSpec ¶
type Credentials ¶
type Credentials struct {
Permissions []string `json:"permissions,omitempty"`
}
type CronTrigger ¶ added in v0.6.0
type CronTrigger struct {
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Expression string `json:"expression,omitempty"`
Message string `json:"message,omitempty"`
GitTriggerId string `json:"gitTriggerId,omitempty"`
Branch string `json:"branch,omitempty"`
Disabled bool `json:"disabled,omitempty"`
Options *TriggerOptions `json:"options,omitempty"`
RuntimeEnvironment *RuntimeEnvironment `json:"runtimeEnvironment,omitempty"`
Variables []Variable `json:"variables,omitempty"`
}
func (*CronTrigger) SetVariables ¶ added in v0.6.0
func (t *CronTrigger) SetVariables(variables map[string]interface{})
type CurrentAccount ¶
type CurrentAccount struct {
ID string
Name string
Users []CurrentAccountUser
}
CurrentAccount spec
type CurrentAccountUser ¶
type CurrentAccountUser struct {
ID string `json:"id,omitempty"`
UserName string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
}
CurrentAccountUser spec
type DataRetention ¶
type DataRetention struct {
Weeks int `json:"weeks"`
}
type DockerRegistry ¶
type DockerRegistry struct {
Kind string `json:"kind"`
BehindFirewall bool `json:"behindFirewall"`
Primary bool `json:"primary"`
Default bool `json:"default"`
Internal bool `json:"internal"`
DenyCompositeDomain bool `json:"denyCompositeDomain"`
ID string `json:"_id"`
Name string `json:"name"`
Provider string `json:"provider"`
Username string `json:"username"`
Password string `json:"password"`
Domain string `json:"domain"`
RepositoryPrefix string `json:"repositoryPrefix"`
}
type EntityAbacAttribute ¶ added in v0.5.0
type ErrorResponse ¶
type GitopsAbacRule ¶ added in v0.5.0
type GitopsAbacRule struct {
ID string `json:"id,omitempty"`
AccountId string `json:"accountId,omitempty"`
EntityType string `json:"entityType"`
Teams []string `json:"teams"`
Tags []string `json:"tags,omitempty"`
Actions []string `json:"actions"`
Attributes []EntityAbacAttribute `json:"attributes"`
}
GitopsAbacRule spec
type GitopsAbacRuleResponse ¶ added in v0.5.0
type GitopsAbacRuleResponse struct {
Data struct {
AbacRule GitopsAbacRule `json:"abacRule,omitempty"`
CreateAbacRule GitopsAbacRule `json:"createAbacRule,omitempty"`
RemoveAbacRule GitopsAbacRule `json:"removeAbacRule,omitempty"`
} `json:"data"`
}
type GitopsAbacRulesListResponse ¶ added in v0.5.0
type GitopsAbacRulesListResponse struct {
Data struct {
AbacRules []GitopsAbacRule `json:"abacRules"`
} `json:"data"`
}
type GraphQLRequest ¶ added in v0.5.0
type GraphQLRequest struct {
Query string `json:"query"`
Variables map[string]interface{} `json:"variables,omitempty"`
}
GraphQLRequest GraphQL query
type HermesTrigger ¶
type HermesTriggerEvent ¶
type Hooks ¶
type Hooks struct {
Hooks string
}
func (Hooks) MarshalJSON ¶
func (*Hooks) UnmarshalJSON ¶
type IDP ¶
type IDP struct {
Access_token string `json:"access_token,omitempty"`
Accounts []string `json:"accounts,omitempty"`
ApiHost string `json:"apiHost,omitempty"`
ApiPathPrefix string `json:"apiPathPrefix,omitempty"`
ApiURL string `json:"apiURL,omitempty"`
AppId string `json:"appId,omitempty"`
AuthURL string `json:"authURL,omitempty"`
ClientHost string `json:"clientHost,omitempty"`
ClientId string `json:"clientId,omitempty"`
ClientName string `json:"clientName,omitempty"`
ClientSecret string `json:"clientSecret,omitempty"`
ClientType string `json:"clientType,omitempty"`
CookieIv string `json:"cookieIv,omitempty"`
CookieKey string `json:"cookieKey,omitempty"`
DisplayName string `json:"displayName,omitempty"`
ID string `json:"_id,omitempty"`
IDPLoginUrl string `json:"IDPLoginUrl,omitempty"`
LoginUrl string `json:"loginUrl,omitempty"`
RedirectUiUrl string `json:"redirectUiUrl,omitempty"`
RedirectUrl string `json:"redirectUrl,omitempty"`
RefreshTokenURL string `json:"refreshTokenURL,omitempty"`
Scopes []string `json:"scopes,omitempty"`
Tenant string `json:"tenant,omitempty"`
TokenSecret string `json:"tokenSecret,omitempty"`
TokenURL string `json:"tokenURL,omitempty"`
UserProfileURL string `json:"userProfileURL,omitempty"`
}
type ImageViewConfig ¶
type ImageViewConfig struct {
Version string `json:"version"`
}
type Integration ¶
type Integration struct {
Stash Active `json:"stash,omitempty"`
Github Active `json:"github,omitempty"`
Gitlab Active `json:"gitlab,omitempty"`
Aks Exist `json:"aks,omitempty"`
Gcloud Exist `json:"gcloud,omitempty"`
DigitalOcean Exist `json:"digitalOcean,omitempty"`
Registries []DockerRegistry `json:"registries,omitempty"`
}
type Limits ¶
type Limits struct {
Collaborators Collaborators `json:"collaborators,omitempty"`
DataRetention DataRetention `json:"dataRetention,omitempty"`
}
type Metadata ¶
type Metadata struct {
Name string `json:"name,omitempty"`
ID string `json:"id,omitempty"`
IsPublic bool `json:"isPublic,omitempty"`
Labels Labels `json:"labels,omitempty"`
OriginalYamlString string `json:"originalYamlString,omitempty"`
Project string `json:"project,omitempty"`
ProjectId string `json:"projectId,omitempty"`
Revision int `json:"revision,omitempty"`
}
type NewPermission ¶
type NewPermission struct {
ID string `json:"_id,omitempty"`
Team string `json:"team,omitempty"`
Resource string `json:"resource,omitempty"`
RelatedResource string `json:"related_resource,omitempty"`
Action string `json:"action,omitempty"`
Account string `json:"account,omitempty"`
Tags []string `json:"tags,omitempty"`
}
NewPermission spec, diffs from Permission: `json:"_id,omitempty"`, `json:"team,omitempty"`, `json:"tags,omitempty"`
type NewTeam ¶
type NewTeam struct {
ID string `json:"_id,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Account string `json:"account,omitempty"`
Tags []string `json:"tags,omitempty"`
Users []string `json:"users,omitempty"`
}
NewTeam Codefresh API expects a list of users IDs to create a new team
func ConvertToNewTeam ¶
type NotificationEvent ¶
type PaymentPlan ¶
type PaymentPlan struct {
Trial struct {
Trialing bool `json:"trialing"`
TrialWillEndNotified bool `json:"trialWillEndNotified"`
TrialEndedNotified bool `json:"trialEndedNotified"`
Type string `json:"type"`
PreviousSegment string `json:"previousSegment"`
} `json:"trial,omitempty"`
ID string `json:"id,omitempty"`
Provider string `json:"provider,omitempty"`
}
type Permission ¶
type Permission struct {
ID string `json:"id,omitempty"`
Team string `json:"role,omitempty"`
Resource string `json:"resource,omitempty"`
RelatedResource string `json:"related_resource,omitempty"`
Action string `json:"action,omitempty"`
Account string `json:"account,omitempty"`
Tags []string `json:"attributes,omitempty"`
}
Permission spec
type Pipeline ¶
type Pipeline struct {
Metadata Metadata `json:"metadata,omitempty"`
Spec Spec `json:"spec,omitempty"`
Version string `json:"version,omitempty"`
}
func (*Pipeline) SetVariables ¶
type Project ¶
type Project struct {
ID string `json:"id,omitempty"`
ProjectName string `json:"projectName,omitempty"`
Tags []string `json:"tags,omitempty"`
Variables []Variable `json:"variables,omitempty"`
}
Project spec
func (*Project) SetVariables ¶
SetVariables project variables
type Registry ¶
type Registry struct {
// common
Id string `json:"_id,omitempty"`
Name string `json:"name,omitempty"`
Kind string `json:"kind,omitempty"`
Default bool `json:"default,omitempty"`
Primary bool `json:"primary,omitempty"`
BehindFirewall bool `json:"behindFirewall,omitempty"`
FallbackRegistry string `json:"fallbackRegistry,omitempty"`
RepositoryPrefix string `json:"repositoryPrefix,omitempty"`
Provider string `json:"provider,omitempty"`
// mostly all
Domain string `json:"domain,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
// bintray
Token string `json:"token,omitempty"`
// ecr
AccessKeyId string `json:"accessKeyId,omitempty"`
SecretAccessKey string `json:"secretAccessKey,omitempty"`
Region string `json:"region,omitempty"`
// gcr, gar
Keyfile string `json:"keyfile,omitempty"`
// acr
ClientId string `json:"clientId,omitempty"`
ClientSecret string `json:"clientSecret,omitempty"`
}
type RequestOptions ¶
type RequestOptions struct {
Path string
Method string
Body []byte
QS map[string]string
XAccessToken string
}
RequestOptions path, method, etc
type RuntimeEnvironment ¶
type ShortProfile ¶
type ShortProfile struct {
UserName string `json:"userName,omitempty"`
}
type Spec ¶
type Spec struct {
Variables []Variable `json:"variables,omitempty"`
SpecTemplate *SpecTemplate `json:"specTemplate,omitempty"`
Triggers []Trigger `json:"triggers,omitempty"`
CronTriggers []CronTrigger `json:"cronTriggers,omitempty"`
Priority int `json:"priority,omitempty"`
Concurrency int `json:"concurrency,omitempty"`
BranchConcurrency int `json:"branchConcurrency,omitempty"`
TriggerConcurrency int `json:"triggerConcurrency,omitempty"`
Contexts []interface{} `json:"contexts,omitempty"`
Steps *Steps `json:"steps,omitempty"`
Stages *Stages `json:"stages,omitempty"`
Mode string `json:"mode,omitempty"`
FailFast *bool `json:"fail_fast,omitempty"`
RuntimeEnvironment RuntimeEnvironment `json:"runtimeEnvironment,omitempty"`
TerminationPolicy []map[string]interface{} `json:"terminationPolicy,omitempty"`
PackId string `json:"packId,omitempty"`
RequiredAvailableStorage string `json:"requiredAvailableStorage,omitempty"`
Hooks *Hooks `json:"hooks,omitempty"`
Options map[string]bool `json:"options,omitempty"`
}
type SpecStepTypes ¶
type SpecStepTypes struct {
Arguments string `json:"arguments,omitempty"`
Delimiters map[string]interface{} `json:"delimiters,omitempty"`
Returns string `json:"returns,omitempty"`
Steps *orderedmap.OrderedMap `json:"steps,omitempty"`
StepsTemplate string `json:"stepsTemplate,omitempty"`
}
type SpecTemplate ¶
type Stages ¶
type Stages struct {
Stages string
}
func (Stages) MarshalJSON ¶
func (*Stages) UnmarshalJSON ¶
type StepTypes ¶
type StepTypes struct {
Version string `json:"version,omitempty"`
Kind string `json:"kind,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
Spec SpecStepTypes `json:"spec,omitempty"`
}
type StepTypesVersion ¶
type StepTypesVersions ¶
type StepTypesVersions struct {
Name string
Versions []StepTypesVersion
}
type Steps ¶
type Steps struct {
Steps string
}
func (Steps) MarshalJSON ¶
func (*Steps) UnmarshalJSON ¶
type Suspension ¶
type Suspension struct {
IsSuspended bool `json:"isSuspended"`
}
type Team ¶
type Team struct {
ID string `json:"_id,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Account string `json:"account,omitempty"`
Tags []string `json:"tags,omitempty"`
Users []TeamUser `json:"users,omitempty"`
}
Team spec
type TokenResponse ¶
type Trigger ¶
type Trigger struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Type string `json:"type,omitempty"`
Repo string `json:"repo,omitempty"`
Events []string `json:"events,omitempty"`
BranchRegex string `json:"branchRegex,omitempty"`
BranchRegexInput string `json:"branchRegexInput,omitempty"`
PullRequestTargetBranchRegex string `json:"pullRequestTargetBranchRegex,omitempty"`
CommentRegex string `json:"commentRegex,omitempty"`
ModifiedFilesGlob string `json:"modifiedFilesGlob,omitempty"`
Provider string `json:"provider,omitempty"`
Disabled bool `json:"disabled,omitempty"`
Options *TriggerOptions `json:"options,omitempty"`
PullRequestAllowForkEvents bool `json:"pullRequestAllowForkEvents,omitempty"`
CommitStatusTitle string `json:"commitStatusTitle,omitempty"`
Context string `json:"context,omitempty"`
Contexts []string `json:"contexts,omitempty"`
RuntimeEnvironment *RuntimeEnvironment `json:"runtimeEnvironment,omitempty"`
Variables []Variable `json:"variables,omitempty"`
}
func (*Trigger) SetVariables ¶
type TriggerOptions ¶
type User ¶
type User struct {
ID string `json:"_id,omitempty"`
UserName string `json:"userName"`
Email string `json:"email"`
Personal *Personal `json:"personal,omitempty"`
Roles []string `json:"roles,omitempty"`
DefaultAccount int `json:"defaultAccount,omitempty"`
Account []Account `json:"account,omitempty"`
Status string `json:"status,omitempty"`
RegisterDate string `json:"register_date,omitempty"`
HasPassword bool `json:"hasPassword,omitempty"`
Notifications []NotificationEvent `json:"notifications,omitempty"`
ShortProfile ShortProfile `json:"shortProfile,omitempty"`
Logins []Login `json:"logins,omitempty"`
InviteURL string `json:"inviteUrl,omitempty"`
}