Documentation
¶
Index ¶
- Variables
- func GetOrgIdFromSlug(slug string, collaborations []CollaborationResult) string
- type CollaborationResult
- type CompileConfigRequest
- type ConfigCompiler
- func (c *ConfigCompiler) ConfigQuery(configPath string, orgID string, params Parameters, values Values) (*ConfigResponse, error)
- func (c *ConfigCompiler) GetOrgCollaborations() ([]CollaborationResult, error)
- func (c *ConfigCompiler) ProcessConfig(opts ProcessConfigOpts) error
- func (c *ConfigCompiler) ValidateConfig(opts ValidateConfigOpts) error
- type ConfigError
- type ConfigResponse
- type Options
- type Parameters
- type ProcessConfigOpts
- type ValidateConfigOpts
- type Values
Constants ¶
This section is empty.
Variables ¶
var (
CollaborationsPath = "me/collaborations"
)
var (
// Making this the one true source for default config path
DefaultConfigPath = ".circleci/config.yml"
)
Functions ¶
func GetOrgIdFromSlug ¶ added in v0.1.25569
func GetOrgIdFromSlug(slug string, collaborations []CollaborationResult) string
GetOrgIdFromSlug - converts a slug into an orgID.
Types ¶
type CollaborationResult ¶ added in v0.1.25569
type CompileConfigRequest ¶
type CompileConfigRequest struct {
ConfigYaml string `json:"config_yaml"`
Options Options `json:"options"`
}
CompileConfigRequest - the structure of the data we send to the downstream compilation service.
type ConfigCompiler ¶ added in v0.1.25569
type ConfigCompiler struct {
// contains filtered or unexported fields
}
func New ¶ added in v0.1.25569
func New(cfg *settings.Config) *ConfigCompiler
func (*ConfigCompiler) ConfigQuery ¶ added in v0.1.25569
func (c *ConfigCompiler) ConfigQuery( configPath string, orgID string, params Parameters, values Values, ) (*ConfigResponse, error)
ConfigQuery - attempts to compile or validate a given config file with the passed in params/values. If the orgID is passed in, the config-compilation with private orbs should work.
func (*ConfigCompiler) GetOrgCollaborations ¶ added in v0.1.25569
func (c *ConfigCompiler) GetOrgCollaborations() ([]CollaborationResult, error)
GetOrgCollaborations - fetches all the collaborations for a given user.
func (*ConfigCompiler) ProcessConfig ¶ added in v0.1.25569
func (c *ConfigCompiler) ProcessConfig(opts ProcessConfigOpts) error
func (*ConfigCompiler) ValidateConfig ¶ added in v0.1.25569
func (c *ConfigCompiler) ValidateConfig(opts ValidateConfigOpts) error
The <path> arg is actually optional, in order to support compatibility with the --path flag.
type ConfigError ¶
type ConfigError struct {
Message string `json:"message"`
}
type ConfigResponse ¶
type ConfigResponse struct {
Valid bool `json:"valid"`
SourceYaml string `json:"source-yaml"`
OutputYaml string `json:"output-yaml"`
Errors []ConfigError `json:"errors"`
}
ConfigResponse - the structure of what is returned from the downstream compilation endpoint
type Parameters ¶ added in v0.1.25569
type Parameters map[string]interface{}
Static typing is bypassed using an empty interface here due to pipeline parameters supporting multiple types.
type ProcessConfigOpts ¶ added in v0.1.25569
type ValidateConfigOpts ¶ added in v0.1.25569
type Values ¶ added in v0.1.25569
CircleCI provides various `<< pipeline.x >>` values to be used in your config, but sometimes we need to fabricate those values when validating config.
func LocalPipelineValues ¶ added in v0.1.25569
func LocalPipelineValues() Values
vars should contain any pipeline parameters that should be accessible via << pipeline.parameters.foo >>