Documentation
¶
Index ¶
- Constants
- type AgentState
- type Annotation
- type ApplicationResources
- type ArgoAPI
- type AuthOptions
- type CFEnvironment
- type ClientOptions
- type Cluster
- type ClusterMinified
- type Codefresh
- type CodefreshEvent
- type Commit
- type ContextPayload
- type CreateResponse
- type CreateRuntimeOptions
- type DockerDaemonScheduler
- type Environment
- type EnvironmentActivity
- type EnvironmentActivityRS
- type EnvironmentMetadata
- type EnvironmentPayload
- type EnvironmentSpec
- type Gitops
- type GitopsAPI
- type Heartbeat
- type IClusterAPI
- type IContextAPI
- type IPipelineAPI
- type IProgressAPI
- type IRuntimeEnvironmentAPI
- type ITokenAPI
- type IWorkflowAPI
- type IntegrationItem
- type IntegrationPayload
- type IntegrationPayloadData
- type Location
- type MongoCFEnvWrapper
- type Pagination
- type Pipeline
- type PipelineMetadata
- type PipelineSpec
- type Progress
- type ReplicaState
- type RunOptions
- type RuntimeEnvironment
- type RuntimeMetadata
- type RuntimeScheduler
- type SignCertificatesOptions
- type SyncPolicy
- type Token
- type User
- type ValidateRuntimeOptions
- type Workflow
Constants ¶
View Source
const (
KubernetesRunnerType = "kubernetes"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentState ¶
type AgentState struct { Kind string `json:"type"` Items interface{} `json:"items"` }
type Annotation ¶
type ApplicationResources ¶
type ArgoAPI ¶
type ArgoAPI interface { CreateIntegration(integration IntegrationPayloadData) error UpdateIntegration(name string, integration IntegrationPayloadData) error GetIntegrations() ([]*IntegrationPayload, error) GetIntegrationByName(name string) (*IntegrationPayload, error) DeleteIntegrationByName(name string) error HeartBeat(error string, version string, integration string) error SendResources(kind string, items interface{}, amount int, integration string) error }
type CFEnvironment ¶
type ClientOptions ¶
type ClientOptions struct { Auth AuthOptions Debug bool Host string Client *http.Client }
Options
type ClusterMinified ¶
type Codefresh ¶
type Codefresh interface { Pipelines() IPipelineAPI Tokens() ITokenAPI RuntimeEnvironments() IRuntimeEnvironmentAPI Workflows() IWorkflowAPI Progresses() IProgressAPI Clusters() IClusterAPI Contexts() IContextAPI Argo() ArgoAPI Gitops() GitopsAPI // contains filtered or unexported methods }
func New ¶
func New(opt *ClientOptions) Codefresh
type CodefreshEvent ¶
type ContextPayload ¶
type ContextPayload struct { Metadata struct { Name string `json:"name"` } Spec struct { Type string `json:"type"` Data struct { Auth struct { Type string `json:"type"` Username string `json:"username"` Password string `json:"password"` ApiHost string `json:"apiHost"` ApiPathPrefix string `json:"apiPathPrefix"` SshPrivateKey string `json:"sshPrivateKey"` } `json:"auth"` } `json:"data"` } `json:"spec"` }
type CreateResponse ¶
type CreateResponse struct {
Name string
}
type CreateRuntimeOptions ¶
type DockerDaemonScheduler ¶
type Environment ¶
type Environment struct { Gitops Gitops `json:"gitops"` FinishedAt string `json:"finishedAt"` HealthStatus string `json:"healthStatus"` SyncStatus string `json:"status"` HistoryId int64 `json:"historyId"` SyncRevision string `json:"revision"` Name string `json:"name"` Activities []EnvironmentActivity `json:"activities"` Resources interface{} `json:"resources"` RepoUrl string `json:"repoUrl"` Commit Commit `json:"commit"` SyncPolicy SyncPolicy `json:"syncPolicy"` Date string `json:"date"` ParentApp string `json:"parentApp"` }
type EnvironmentActivity ¶
type EnvironmentActivity struct { Name string `json:"name"` TargetImages []string `json:"targetImages"` Status string `json:"status"` LiveImages []string `json:"liveImages"` ReplicaSet EnvironmentActivityRS `json:"replicaSet"` }
type EnvironmentActivityRS ¶
type EnvironmentActivityRS struct { From ReplicaState `json:"from"` To ReplicaState `json:"to"` }
type EnvironmentMetadata ¶
type EnvironmentMetadata struct {
Name string `json:"name"`
}
type EnvironmentPayload ¶
type EnvironmentPayload struct { Version string `json:"version"` Metadata EnvironmentMetadata `json:"metadata"` Spec EnvironmentSpec `json:"spec"` }
type EnvironmentSpec ¶
type Gitops ¶
type Gitops struct { Comitters []User `json:"comitters"` Prs []Annotation `json:"prs"` Issues []Annotation `json:"issues"` }
type GitopsAPI ¶
type GitopsAPI interface { CreateEnvironment(name string, project string, application string, integration string) error SendEnvironment(environment Environment) (map[string]interface{}, error) DeleteEnvironment(name string) error GetEnvironments() ([]CFEnvironment, error) SendEvent(name string, props map[string]string) error SendApplicationResources(resources *ApplicationResources) error }
type IClusterAPI ¶
type IClusterAPI interface { GetClusterCredentialsByAccountId(selector string) (*Cluster, error) GetAccountClusters() ([]*ClusterMinified, error) }
type IContextAPI ¶
type IContextAPI interface { GetGitContexts() (error, *[]ContextPayload) GetGitContextByName(name string) (error, *ContextPayload) GetDefaultGitContext() (error, *ContextPayload) }
type IPipelineAPI ¶
type IPipelineAPI interface { List(qs map[string]string) ([]*Pipeline, error) Run(string, *RunOptions) (string, error) Create(string, PipelineSpec) (string, error) }
IPipelineAPI declers Codefresh pipeline API
type IProgressAPI ¶
type IRuntimeEnvironmentAPI ¶
type IRuntimeEnvironmentAPI interface { Create(*CreateRuntimeOptions) (*RuntimeEnvironment, error) Validate(*ValidateRuntimeOptions) error SignCertificate(*SignCertificatesOptions) ([]byte, error) Get(string) (*RuntimeEnvironment, error) List() ([]*RuntimeEnvironment, error) Delete(string) (bool, error) Default(string) (bool, error) }
IRuntimeEnvironmentAPI declers Codefresh runtime environment API
type IWorkflowAPI ¶
type IntegrationItem ¶
type IntegrationItem struct {
Amount int `json:"amount"`
}
type IntegrationPayload ¶
type IntegrationPayload struct { Type string `json:"type"` Data IntegrationPayloadData `json:"data"` }
type IntegrationPayloadData ¶
type IntegrationPayloadData struct { Name string `json:"name"` Url string `json:"url"` Clusters IntegrationItem `json:"clusters"` Applications IntegrationItem `json:"applications"` Repositories IntegrationItem `json:"repositories"` Username *string `json:"username"` Password *string `json:"password"` Token *string `json:"token"` ClusterName *string `json:"clusterName"` ServerVersion *string `json:"serverVersion"` Provider *string `json:"provider"` }
type MongoCFEnvWrapper ¶
type MongoCFEnvWrapper struct {
Docs []CFEnvironment `json:"docs"`
}
type Pagination ¶ added in v0.25.2
type Pipeline ¶
type Pipeline struct { Metadata PipelineMetadata `json:"metadata"` Spec PipelineSpec `json:"spec"` }
type PipelineMetadata ¶
type PipelineMetadata struct { Name string `json:"name"` IsPublic bool `json:"isPublic"` Labels struct { Tags []string `json:"tags"` } `json:"labels"` Deprecate struct { ApplicationPort string `json:"applicationPort"` RepoPipeline bool `json:"repoPipeline"` } `json:"deprecate"` OriginalYamlString string `json:"originalYamlString"` AccountID string `json:"accountId"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Project string `json:"project"` ID string `json:"id"` }
type PipelineSpec ¶
type PipelineSpec struct { Triggers []struct { Name string `json:"name"` Type string `json:"type"` Repo string `json:"repo"` Events []string `json:"events"` Provider string `json:"provider"` Context string `json:"context"` } `json:"triggers"` Contexts []interface{} `json:"contexts"` Variables []struct { Key string `json:"key"` Value string `json:"value"` } `json:"variables"` Steps map[string]interface{} `json:"steps"` Stages []interface{} `json:"stages"` RuntimeEnvironment struct { CPU string `json:"cpu"` Memory string `json:"memory"` Name string `json:"name"` DindStorage string `json:"dindStorage"` } `json:"runtimeEnvironment"` Mode string `json:"mode"` }
type ReplicaState ¶
type RunOptions ¶
type RuntimeEnvironment ¶
type RuntimeEnvironment struct { Version int `json:"version"` Metadata RuntimeMetadata `json:"metadata"` Extends []string `json:"extends"` Description string `json:"description"` AccountID string `json:"accountId"` RuntimeScheduler RuntimeScheduler `json:"runtimeScheduler"` DockerDaemonScheduler DockerDaemonScheduler `json:"dockerDaemonScheduler"` Status struct { Message string `json:"message"` UpdatedAt time.Time `json:"updated_at"` } `json:"status"` }
type RuntimeMetadata ¶
type RuntimeScheduler ¶
type RuntimeScheduler struct { Cluster struct { ClusterProvider struct { AccountID string `json:"accountId"` Selector string `json:"selector"` } `json:"clusterProvider"` Namespace string `json:"namespace"` } `json:"cluster"` UserAccess bool `json:"userAccess"` Pvcs struct { Dind struct { StorageClassName string `yaml:"storageClassName"` } `yaml:"dind"` } `yaml:"pvcs"` }
type SignCertificatesOptions ¶
type SyncPolicy ¶
type SyncPolicy struct {
AutoSync bool `json:"autoSync"`
}
type ValidateRuntimeOptions ¶
type Workflow ¶
type Workflow struct { ID string `json:"id"` Status string `json:"status"` UserYamlDescriptor string `json:"userYamlDescriptor"` Progress string `json:"progress"` Created time.Time `json:"created"` Started time.Time `json:"started"` Updated time.Time `json:"updated"` Finished time.Time `json:"finished"` Webhook bool `json:"webhookTriggered"` Duration time.Time `json:"totalTime"` PipelineID string `json:"serviceId"` PipelineName string `json:"pipelineName"` TriggerId string `json:"pipelineTriggerId"` TriggerName string `json:"pipelineTriggerName"` TriggerType string `json:"triggerType"` Repository string `json:"repoName"` RepoBranch string `json:"branchName"` Initiator string `json:"initiator"` Project string `json:"project"` DebuggerUsed bool `json:"useDebugger"` }
Click to show internal directories.
Click to hide internal directories.