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) CreateIDP(idp *IDP, isGlobal bool) (id string, err 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) DeleteIDP(id string) error
- func (client *Client) DeleteIDPAccount(id string) error
- func (client *Client) DeleteLocalUserPassword(userName 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) GetAccountIdpByID(idpID string) (*IDP, error)
- func (client *Client) GetAccountsList(accountsId []string) (*[]Account, error)
- func (client *Client) GetActiveGitopsAccountInfo() (*GitopsActiveAccountInfo, 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) UpdateActiveGitopsAccountSettings(gitProvider string, gitProviderApiUrl string, sharedConfigRepo string) error
- func (client *Client) UpdateContext(context *Context) (*Context, error)
- func (client *Client) UpdateIDP(idp *IDP, isGlobal bool) error
- func (client *Client) UpdateLocalUserPassword(userName, password string) error
- func (client *Client) UpdatePermissionTags(permission *Permission) 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
- func (client *Client) UpdateUserDetails(accountId, userId, userName, userEmail string) (*User, 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 ExternalResource
- type GitopsAbacRule
- type GitopsAbacRuleResponse
- type GitopsAbacRulesListResponse
- type GitopsActiveAccountInfo
- type GitopsActiveAccountResponse
- 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 PublicProfile
- 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 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 // contains filtered or unexported fields }
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 ¶
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) CreateIDP ¶ added in v0.8.0
Currently on create the API sometimes (like when creating saml idps) returns a different structure for accounts than on read making the client crash on decode For now we are disabling response decode and in the resource will instead call the read function again
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 ¶
func (client *Client) DeleteAbacRule(id string) (*GitopsAbacRule, error)
func (*Client) DeleteAccount ¶
func (*Client) DeleteContext ¶
func (*Client) DeleteHermesTriggerByEventAndPipeline ¶
func (*Client) DeleteIDPAccount ¶ added in v0.8.0
func (*Client) DeleteLocalUserPassword ¶ added in v0.10.0
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 ¶
func (client *Client) GetAbacRuleByID(id string) (*GitopsAbacRule, error)
GetAbacRuleByID -
func (*Client) GetAbacRulesList ¶
func (client *Client) GetAbacRulesList(entityType string) ([]GitopsAbacRule, error)
func (*Client) GetAccountByName ¶
GetAccountByName - returns account
func (*Client) GetAccountIDPs ¶
get account idps
func (*Client) GetAccountIdpByID ¶ added in v0.8.0
func (*Client) GetAccountsList ¶
func (*Client) GetActiveGitopsAccountInfo ¶ added in v0.10.0
func (client *Client) GetActiveGitopsAccountInfo() (*GitopsActiveAccountInfo, error)
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 ¶
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 ¶
func (client *Client) SendGqlRequest(request GraphQLRequest) ([]byte, error)
func (*Client) SetUserAsAccountAdmin ¶
func (*Client) SynchronizeClientWithGroup ¶
func (*Client) UpdateAPIKey ¶
func (*Client) UpdateAccount ¶
func (*Client) UpdateActiveGitopsAccountSettings ¶ added in v0.10.0
func (*Client) UpdateContext ¶
func (*Client) UpdateIDP ¶ added in v0.8.0
Currently on update the API returns a different structure for accounts than on read making the client crash on decode For now we are disabling response decode and in the resource will instead call the read function again
func (*Client) UpdateLocalUserPassword ¶ added in v0.10.0
func (*Client) UpdatePermissionTags ¶ added in v0.10.1
func (client *Client) UpdatePermissionTags(permission *Permission) error
func (*Client) UpdatePipeline ¶
func (*Client) UpdateProject ¶
UpdateProject PATCH project
func (*Client) UpdateRegistry ¶
func (*Client) UpdateStepTypes ¶
func (*Client) UpdateUserAccounts ¶
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"` IsEncrypred bool `json:"isEncrypted,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 ¶
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 ¶
func (t *CronTrigger) SetVariables(variables map[string]interface{}, encrypted bool)
type CurrentAccount ¶
type CurrentAccount struct { ID string Name string Users []CurrentAccountUser Admins []CurrentAccountUser FeatureFlags map[string]bool }
CurrentAccount spec
type CurrentAccountUser ¶
type CurrentAccountUser struct { ID string `json:"id,omitempty"` UserName string `json:"name,omitempty"` Email string `json:"email,omitempty"` Status string `json:"status,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 ¶
type ErrorResponse ¶
type ExternalResource ¶ added in v0.9.0
type GitopsAbacRule ¶
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 ¶
type GitopsAbacRuleResponse struct { Data struct { AbacRule GitopsAbacRule `json:"abacRule,omitempty"` CreateAbacRule GitopsAbacRule `json:"createAbacRule,omitempty"` RemoveAbacRule GitopsAbacRule `json:"removeAbacRule,omitempty"` } `json:"data"` }
type GitopsAbacRulesListResponse ¶
type GitopsAbacRulesListResponse struct { Data struct { AbacRules []GitopsAbacRule `json:"abacRules"` } `json:"data"` }
type GitopsActiveAccountInfo ¶ added in v0.10.0
type GitopsActiveAccountResponse ¶ added in v0.10.0
type GitopsActiveAccountResponse struct { Data struct { Me struct { ActiveAccount GitopsActiveAccountInfo `json:"activeAccount,omitempty"` } `json:"me,omitempty"` } `json:"data,omitempty"` }
type GraphQLRequest ¶
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 { ID string `json:"_id,omitempty"` Access_token string `json:"access_token,omitempty"` Accounts []string `json:"accounts,omitempty"` ClientName string `json:"clientName,omitempty"` // IDP name ClientType string `json:"clientType,omitempty"` // IDP type DisplayName string `json:"displayName,omitempty"` LoginUrl string `json:"loginUrl,omitempty"` // Login url in Codefresh RedirectUiUrl string `json:"redirectUiUrl,omitempty"` // Redicrect url Codefresh UI RedirectUrl string `json:"redirectUrl,omitempty"` ClientId string `json:"clientId,omitempty"` // All providers (base) ClientSecret string `json:"clientSecret,omitempty"` // All providers (base) ApiHost string `json:"apiHost,omitempty"` // GitHub ApiPathPrefix string `json:"apiPathPrefix,omitempty"` // Github // Bitbucket, Gitlab ApiURL string `json:"apiURL,omitempty"` // Azure, Okta, onelogin,saml AppId string `json:"appId,omitempty"` // Github, Gitlab AuthURL string `json:"authURL,omitempty"` // saml, okta, onelogin, auth0, azure, google, google-cloud-sr ClientHost string `json:"clientHost,omitempty"` // Azure CookieIv string `json:"cookieIv,omitempty"` // Azure CookieKey string `json:"cookieKey,omitempty"` // Azure IDPLoginUrl string `json:"IDPLoginUrl,omitempty"` // Bitbucket RefreshTokenURL string `json:"refreshTokenURL,omitempty"` // Multiple - computed Scopes []string `json:"scopes,omitempty"` // Azure Tenant string `json:"tenant,omitempty"` TokenSecret string `json:"tokenSecret,omitempty"` // Okta, Bitbucket, GitHub, Keycloak TokenURL string `json:"tokenURL,omitempty"` // Github, Gitlab UserProfileURL string `json:"userProfileURL,omitempty"` // Okta SyncMirrorAccounts []string `json:"syncMirrorAccounts,omitempty"` // Google, Ldap AllowedGroupsForSync string `json:"allowedGroupsForSync,omitempty"` // Google Subject string `json:"subject,omitempty"` // Google KeyFile string `json:"keyfile,omitempty"` // Google SyncField string `json:"syncField,omitempty"` // Azure AutoGroupSync bool `json:"autoGroupSync,omitempty"` // Google,Okta,saml ActivateUserAfterSync bool `json:"activateUserAfterSync,omitempty"` // Azure SyncInterval string `json:"syncInterval,omitempty"` // Onelogin ApiClientId string `json:"apiClientId,omitempty"` // Onelogin ApiClientSecret string `json:"apiClientSecret,omitempty"` // Keycloak Host string `json:"host,omitempty"` // keycloak Realm string `json:"realm,omitempty"` // SAML EntryPoint string `json:"entryPoint,omitempty"` // SAML ApplicationCert string `json:"cert,omitempty"` // SAML SamlProvider string `json:"provider,omitempty"` // ldap Password string `json:"password,omitempty"` Url string `json:"url,omitempty"` DistinguishedName string `json:"distinguishedName,omitempty"` SearchBase string `json:"searchBase,omitempty"` SearchFilter string `json:"searchFilter,omitempty"` SearchBaseForSync string `json:"searchBaseForSync,omitempty"` Certificate string `json:"certificate,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:"relatedResource,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:"relatedResource,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 PublicProfile ¶ added in v0.10.0
type PublicProfile struct {
HasPassword bool `json:"hasPassword,omitempty"`
}
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"` PermitRestartFromFailedSteps bool `json:"permitRestartFromFailedSteps,omitempty"` ExternalResources []ExternalResource `json:"externalResources,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"` PublicProfile PublicProfile `json:"publicProfile,omitempty"` Logins []Login `json:"logins,omitempty"` InviteURL string `json:"inviteUrl,omitempty"` }