Documentation ¶
Index ¶
- func CreateTemplate(ctx context.Context, mc model.ClientSet, entity *model.Template) (*model.Template, error)
- func GetTemplateNameByPath(path string) string
- func GetTerraformTemplateFiles(name, content string) (map[string]string, error)
- func SchemaSync(mc model.ClientSet) schemaSyncer
- func SetResourceDefinitionSchemaDefault(ctx context.Context, client model.ClientSet, rd *model.ResourceDefinition) (err error)
- func SetTemplateSchemaDefault(ctx context.Context, tv *model.TemplateVersion) error
- func SyncTemplateFromGitRef(ctx context.Context, mc model.ClientSet, entity *model.Template, ...) (err error)
- func SyncTemplateFromGitRepo(ctx context.Context, mc model.ClientSet, entity *model.Template, ...) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTemplate ¶
func CreateTemplate(ctx context.Context, mc model.ClientSet, entity *model.Template) (*model.Template, error)
CreateTemplate creates or updates a template.
func GetTemplateNameByPath ¶
func GetTerraformTemplateFiles ¶
GetTerraformTemplateFiles parse a full tf configuration to a map using filename as the key.
func SchemaSync ¶
func SetResourceDefinitionSchemaDefault ¶ added in v0.5.0
func SetResourceDefinitionSchemaDefault( ctx context.Context, client model.ClientSet, rd *model.ResourceDefinition, ) (err error)
SetResourceDefinitionSchemaDefault generate the schema default for resource definition. Required rd.Edges.MatchingRules.
func SetTemplateSchemaDefault ¶ added in v0.5.0
func SetTemplateSchemaDefault(ctx context.Context, tv *model.TemplateVersion) error
SetTemplateSchemaDefault set the schema default for template.
func SyncTemplateFromGitRef ¶ added in v0.6.0
func SyncTemplateFromGitRef( ctx context.Context, mc model.ClientSet, entity *model.Template, repo *vcs.Repository, ) (err error)
SyncTemplateFromGitRef clones a git repository create template and template version with reference. The reference can be a commit hash or a tag. The specified reference will not check semver format.
func SyncTemplateFromGitRepo ¶
func SyncTemplateFromGitRepo( ctx context.Context, mc model.ClientSet, entity *model.Template, repo *vcs.Repository, ) (err error)
SyncTemplateFromGitRepo clones a git repository, retrieves all tags, creates a template and template versions. If the template already exists, it will update the template and template versions. Only semver tags will be used to create template versions.
Types ¶
This section is empty.