Documentation ¶
Overview ¶
This is the workflow action for calling an api
Index ¶
- Constants
- func Action_GitDownload(w *workflow.Workflow, m *workflow.TemplateData) error
- func GetSchema() workflow.SchemaEndpoint
- type Git
- func (m *Git) DownloadFromGitHub(project string, File string, branch string) (string, error)
- func (m *Git) DownloadFromGitLab(project string, File string, branch string) (string, error)
- func (m *Git) DownloadGitFile(target_type string, project string, File string, branch string) (string, error)
- func (m *Git) String() string
- func (m *Git) Update(opts ...GitOption)
- type GitOption
- type GitSchema
Constants ¶
const ( TARGET_TYPE_GITLAB = "gitlab" TARGET_TYPE_GITHUB = "github" )
Variables ¶
This section is empty.
Functions ¶
func Action_GitDownload ¶
func Action_GitDownload(w *workflow.Workflow, m *workflow.TemplateData) error
func GetSchema ¶
func GetSchema() workflow.SchemaEndpoint
GetAction returns the action for the target
Types ¶
type Git ¶
type Git struct { Host string `json:"host" yaml:"host" flag:"host h" desc:"the host url"` User string `json:"user" yaml:"user" flag:"user u" desc:"The user name"` Authorization string `json:"authorization" yaml:"authorization" flag:"auth a" desc:"The auth token"` Ssh string `json:"ssh" yaml:"ssh" flag:"ssh s" desc:"The SSH key"` Email string `json:"email" yaml:"email" flag:"email e" desc:"The Email address"` }
K8 is the struct for the k8 connection If you want to use the kube config file, you need to set the DefaultContext and ConfigPath DefaultContext is the default context to use ConfigPath is the path to the kube config file Host is the host to connect to You will need to set the Host and Authorization if you want to use the token connection Authorization is the authorization token UseTokenConnection if true, use the token connection, otherwise use the kube config file Ignore_ssl if true, ignore the ssl connection
func CreateGit ¶
Create a instance of the k8 type default_context is the default context to use config_path is the path to the kube config file
func CreateGitOptions ¶
CreateK8Options creates a instance of the k8 type opts are the options for the k8 type
func (*Git) DownloadFromGitHub ¶
func (*Git) DownloadFromGitLab ¶
func (*Git) DownloadGitFile ¶
type GitOption ¶
type GitOption func(*Git)
K8Option is the option for the k8 connection
func OptionGitEmail ¶
OptionK8IgnoreSSL is the option for the ignore ssl
func OptionGitHost ¶
OptionK8DefaultContext is the option for the default context
func OptionGitPassword ¶
OptionK8Host is the option for the host
func OptionGitSSH ¶
OptionK8Auth is the option for the authorization
func OptionGitUser ¶
OptionK8ConfigPath is the option for the config path
type GitSchema ¶
type GitSchema struct { }
func (GitSchema) GetActionSchema ¶
func (s GitSchema) GetActionSchema() map[string]workflow.ActionSchema
GetActions returns the actions for this schema
func (GitSchema) GetFunctionMap ¶
func (s GitSchema) GetFunctionMap() map[string]workflow.FunctionSchema
GetFunctionMap returns the function map for this schema
func (GitSchema) GetTargetSchema ¶
func (s GitSchema) GetTargetSchema() map[string]workflow.TargetSchema
GetTargetSchema returns the target schema for this action