Documentation ¶
Index ¶
- Constants
- Variables
- func EnvironmentTemplateFile(agentName, templateName string) string
- func EnvironmentTemplatesDirectoryForAgent(agentName string) string
- type Agent
- type ApplyError
- type Environment
- func (*Environment) Descriptor() ([]byte, []int)deprecated
- func (x *Environment) GetName() string
- func (x *Environment) GetSlug() string
- func (x *Environment) GetTier() string
- func (x *Environment) GetUrl() string
- func (*Environment) ProtoMessage()
- func (x *Environment) ProtoReflect() protoreflect.Message
- func (x *Environment) Reset()
- func (x *Environment) String() string
- type EnvironmentInfo
- func (*EnvironmentInfo) Descriptor() ([]byte, []int)deprecated
- func (x *EnvironmentInfo) GetAgentId() int64
- func (x *EnvironmentInfo) GetAgentName() string
- func (x *EnvironmentInfo) GetAgentUrl() string
- func (x *EnvironmentInfo) GetEnvironmentName() string
- func (x *EnvironmentInfo) GetEnvironmentSlug() string
- func (x *EnvironmentInfo) GetEnvironmentTier() string
- func (x *EnvironmentInfo) GetEnvironmentUrl() string
- func (x *EnvironmentInfo) GetProjectId() int64
- func (x *EnvironmentInfo) GetProjectPath() string
- func (x *EnvironmentInfo) GetProjectSlug() string
- func (x *EnvironmentInfo) GetProjectUrl() string
- func (x *EnvironmentInfo) GetTemplateName() string
- func (*EnvironmentInfo) ProtoMessage()
- func (x *EnvironmentInfo) ProtoReflect() protoreflect.Message
- func (x *EnvironmentInfo) Reset()
- func (x *EnvironmentInfo) String() string
- type EnvironmentTemplate
- func (*EnvironmentTemplate) Descriptor() ([]byte, []int)deprecated
- func (x *EnvironmentTemplate) GetData() []byte
- func (x *EnvironmentTemplate) GetName() string
- func (*EnvironmentTemplate) ProtoMessage()
- func (x *EnvironmentTemplate) ProtoReflect() protoreflect.Message
- func (x *EnvironmentTemplate) Reset()
- func (x *EnvironmentTemplate) String() string
- type EnvironmentTemplateData
- type EnvironmentTemplateDataFields
- type Job
- type ObjectManager
- type Pipeline
- type Project
- func (*Project) Descriptor() ([]byte, []int)deprecated
- func (x *Project) GetId() int64
- func (x *Project) GetPath() string
- func (x *Project) GetSlug() string
- func (x *Project) GetUrl() string
- func (*Project) ProtoMessage()
- func (x *Project) ProtoReflect() protoreflect.Message
- func (x *Project) Reset()
- func (x *Project) String() string
- type RenderedEnvironmentTemplate
- func (*RenderedEnvironmentTemplate) Descriptor() ([]byte, []int)deprecated
- func (x *RenderedEnvironmentTemplate) GetData() []byte
- func (x *RenderedEnvironmentTemplate) GetName() string
- func (*RenderedEnvironmentTemplate) ProtoMessage()
- func (x *RenderedEnvironmentTemplate) ProtoReflect() protoreflect.Message
- func (x *RenderedEnvironmentTemplate) Reset()
- func (x *RenderedEnvironmentTemplate) String() string
- type Renderer
- type RendererError
- type RendererErrorCode
- type TemplatingInfo
- func (*TemplatingInfo) Descriptor() ([]byte, []int)deprecated
- func (x *TemplatingInfo) GetAgent() *Agent
- func (x *TemplatingInfo) GetEnvironment() *Environment
- func (x *TemplatingInfo) GetJob() *Job
- func (x *TemplatingInfo) GetPipeline() *Pipeline
- func (x *TemplatingInfo) GetProject() *Project
- func (x *TemplatingInfo) GetUser() *User
- func (*TemplatingInfo) ProtoMessage()
- func (x *TemplatingInfo) ProtoReflect() protoreflect.Message
- func (x *TemplatingInfo) Reset()
- func (x *TemplatingInfo) String() string
- func (x *TemplatingInfo) ToEnvironmentInfo(tplName string) *EnvironmentInfo
- type User
Constants ¶
View Source
const ( ModuleName = "managed_resources" TemplatesDirectory = "environment_templates" DefaultTemplateName = "default" )
Variables ¶
View Source
var File_internal_module_managed_resources_managed_resources_proto protoreflect.FileDescriptor
Functions ¶
func EnvironmentTemplateFile ¶
Types ¶
type Agent ¶
type Agent struct { Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` Url string `protobuf:"bytes,3,opt,name=url" json:"url,omitempty"` // contains filtered or unexported fields }
func (*Agent) Descriptor
deprecated
func (*Agent) ProtoMessage ¶
func (*Agent) ProtoMessage()
func (*Agent) ProtoReflect ¶
func (x *Agent) ProtoReflect() protoreflect.Message
type ApplyError ¶
type ApplyError struct { GVK schema.GroupVersionKind Namespace string Name string Error error }
type Environment ¶
type Environment struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Slug string `protobuf:"bytes,2,opt,name=slug" json:"slug,omitempty"` Url string `protobuf:"bytes,3,opt,name=url" json:"url,omitempty"` Tier string `protobuf:"bytes,4,opt,name=tier" json:"tier,omitempty"` // contains filtered or unexported fields }
func (*Environment) Descriptor
deprecated
func (*Environment) Descriptor() ([]byte, []int)
Deprecated: Use Environment.ProtoReflect.Descriptor instead.
func (*Environment) GetName ¶
func (x *Environment) GetName() string
func (*Environment) GetSlug ¶
func (x *Environment) GetSlug() string
func (*Environment) GetTier ¶
func (x *Environment) GetTier() string
func (*Environment) GetUrl ¶
func (x *Environment) GetUrl() string
func (*Environment) ProtoMessage ¶
func (*Environment) ProtoMessage()
func (*Environment) ProtoReflect ¶
func (x *Environment) ProtoReflect() protoreflect.Message
func (*Environment) Reset ¶
func (x *Environment) Reset()
func (*Environment) String ¶
func (x *Environment) String() string
type EnvironmentInfo ¶
type EnvironmentInfo struct { EnvironmentName string `protobuf:"bytes,1,opt,name=environment_name" json:"environment_name,omitempty"` EnvironmentSlug string `protobuf:"bytes,2,opt,name=environment_slug" json:"environment_slug,omitempty"` EnvironmentUrl string `protobuf:"bytes,3,opt,name=environment_url" json:"environment_url,omitempty"` EnvironmentTier string `protobuf:"bytes,4,opt,name=environment_tier" json:"environment_tier,omitempty"` AgentId int64 `protobuf:"varint,5,opt,name=agent_id" json:"agent_id,omitempty"` AgentName string `protobuf:"bytes,6,opt,name=agent_name" json:"agent_name,omitempty"` AgentUrl string `protobuf:"bytes,7,opt,name=agent_url" json:"agent_url,omitempty"` ProjectId int64 `protobuf:"varint,8,opt,name=project_id" json:"project_id,omitempty"` ProjectSlug string `protobuf:"bytes,9,opt,name=project_slug" json:"project_slug,omitempty"` ProjectPath string `protobuf:"bytes,10,opt,name=project_path" json:"project_path,omitempty"` ProjectUrl string `protobuf:"bytes,11,opt,name=project_url" json:"project_url,omitempty"` TemplateName string `protobuf:"bytes,12,opt,name=template_name" json:"template_name,omitempty"` // contains filtered or unexported fields }
func (*EnvironmentInfo) Descriptor
deprecated
func (*EnvironmentInfo) Descriptor() ([]byte, []int)
Deprecated: Use EnvironmentInfo.ProtoReflect.Descriptor instead.
func (*EnvironmentInfo) GetAgentId ¶
func (x *EnvironmentInfo) GetAgentId() int64
func (*EnvironmentInfo) GetAgentName ¶
func (x *EnvironmentInfo) GetAgentName() string
func (*EnvironmentInfo) GetAgentUrl ¶
func (x *EnvironmentInfo) GetAgentUrl() string
func (*EnvironmentInfo) GetEnvironmentName ¶
func (x *EnvironmentInfo) GetEnvironmentName() string
func (*EnvironmentInfo) GetEnvironmentSlug ¶
func (x *EnvironmentInfo) GetEnvironmentSlug() string
func (*EnvironmentInfo) GetEnvironmentTier ¶
func (x *EnvironmentInfo) GetEnvironmentTier() string
func (*EnvironmentInfo) GetEnvironmentUrl ¶
func (x *EnvironmentInfo) GetEnvironmentUrl() string
func (*EnvironmentInfo) GetProjectId ¶
func (x *EnvironmentInfo) GetProjectId() int64
func (*EnvironmentInfo) GetProjectPath ¶
func (x *EnvironmentInfo) GetProjectPath() string
func (*EnvironmentInfo) GetProjectSlug ¶
func (x *EnvironmentInfo) GetProjectSlug() string
func (*EnvironmentInfo) GetProjectUrl ¶
func (x *EnvironmentInfo) GetProjectUrl() string
func (*EnvironmentInfo) GetTemplateName ¶
func (x *EnvironmentInfo) GetTemplateName() string
func (*EnvironmentInfo) ProtoMessage ¶
func (*EnvironmentInfo) ProtoMessage()
func (*EnvironmentInfo) ProtoReflect ¶
func (x *EnvironmentInfo) ProtoReflect() protoreflect.Message
func (*EnvironmentInfo) Reset ¶
func (x *EnvironmentInfo) Reset()
func (*EnvironmentInfo) String ¶
func (x *EnvironmentInfo) String() string
type EnvironmentTemplate ¶
type EnvironmentTemplate struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"` // contains filtered or unexported fields }
func (*EnvironmentTemplate) Descriptor
deprecated
func (*EnvironmentTemplate) Descriptor() ([]byte, []int)
Deprecated: Use EnvironmentTemplate.ProtoReflect.Descriptor instead.
func (*EnvironmentTemplate) GetData ¶
func (x *EnvironmentTemplate) GetData() []byte
func (*EnvironmentTemplate) GetName ¶
func (x *EnvironmentTemplate) GetName() string
func (*EnvironmentTemplate) ProtoMessage ¶
func (*EnvironmentTemplate) ProtoMessage()
func (*EnvironmentTemplate) ProtoReflect ¶
func (x *EnvironmentTemplate) ProtoReflect() protoreflect.Message
func (*EnvironmentTemplate) Reset ¶
func (x *EnvironmentTemplate) Reset()
func (*EnvironmentTemplate) String ¶
func (x *EnvironmentTemplate) String() string
type EnvironmentTemplateData ¶
type EnvironmentTemplateData[O any] struct { Objects []O `json:"objects"` EnvironmentTemplateDataFields }
type EnvironmentTemplateDataFields ¶
type EnvironmentTemplateDataFields struct { ApplyResources string `json:"apply_resources"` DeleteResources string `json:"delete_resources"` }
EnvironmentTemplateDataFields holds all fields except objects. This simplifies copying of these fields.
type Job ¶
type Job struct { Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` // contains filtered or unexported fields }
func (*Job) Descriptor
deprecated
func (*Job) ProtoMessage ¶
func (*Job) ProtoMessage()
func (*Job) ProtoReflect ¶
func (x *Job) ProtoReflect() protoreflect.Message
type ObjectManager ¶
type ObjectManager struct { Client dynamic.Interface Mapper meta.RESTMapper FieldManager string }
func (*ObjectManager) Apply ¶
func (m *ObjectManager) Apply(ctx context.Context, objs []*unstructured.Unstructured) ([]*unstructured.Unstructured, []ApplyError)
type Pipeline ¶
type Pipeline struct { Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` // contains filtered or unexported fields }
func (*Pipeline) Descriptor
deprecated
func (*Pipeline) ProtoMessage ¶
func (*Pipeline) ProtoMessage()
func (*Pipeline) ProtoReflect ¶
func (x *Pipeline) ProtoReflect() protoreflect.Message
type Project ¶
type Project struct { Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` Slug string `protobuf:"bytes,2,opt,name=slug" json:"slug,omitempty"` Path string `protobuf:"bytes,3,opt,name=path" json:"path,omitempty"` Url string `protobuf:"bytes,4,opt,name=url" json:"url,omitempty"` // contains filtered or unexported fields }
func (*Project) Descriptor
deprecated
func (*Project) ProtoMessage ¶
func (*Project) ProtoMessage()
func (*Project) ProtoReflect ¶
func (x *Project) ProtoReflect() protoreflect.Message
type RenderedEnvironmentTemplate ¶
type RenderedEnvironmentTemplate struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"` // contains filtered or unexported fields }
func (*RenderedEnvironmentTemplate) Descriptor
deprecated
func (*RenderedEnvironmentTemplate) Descriptor() ([]byte, []int)
Deprecated: Use RenderedEnvironmentTemplate.ProtoReflect.Descriptor instead.
func (*RenderedEnvironmentTemplate) GetData ¶
func (x *RenderedEnvironmentTemplate) GetData() []byte
func (*RenderedEnvironmentTemplate) GetName ¶
func (x *RenderedEnvironmentTemplate) GetName() string
func (*RenderedEnvironmentTemplate) ProtoMessage ¶
func (*RenderedEnvironmentTemplate) ProtoMessage()
func (*RenderedEnvironmentTemplate) ProtoReflect ¶
func (x *RenderedEnvironmentTemplate) ProtoReflect() protoreflect.Message
func (*RenderedEnvironmentTemplate) Reset ¶
func (x *RenderedEnvironmentTemplate) Reset()
func (*RenderedEnvironmentTemplate) String ¶
func (x *RenderedEnvironmentTemplate) String() string
type Renderer ¶
type Renderer struct {
Mapper meta.RESTMapper
}
func (*Renderer) RenderEnvironmentTemplate ¶
func (r *Renderer) RenderEnvironmentTemplate(tpl *EnvironmentTemplate, info *TemplatingInfo, processRenderedObj func(*unstructured.Unstructured) error) (*RenderedEnvironmentTemplate, error)
RenderEnvironmentTemplate renders a template. All returned errors are an instance of RendererError.
type RendererError ¶
type RendererError struct { Msg string Code RendererErrorCode }
func NewError ¶
func NewError(code RendererErrorCode, msg string) *RendererError
func NewErrorf ¶
func NewErrorf(code RendererErrorCode, format string, a ...any) *RendererError
func (*RendererError) Error ¶
func (r *RendererError) Error() string
type RendererErrorCode ¶
type RendererErrorCode byte
const ( InvalidArgument RendererErrorCode Internal )
func (RendererErrorCode) String ¶
func (c RendererErrorCode) String() string
type TemplatingInfo ¶
type TemplatingInfo struct { Agent *Agent `protobuf:"bytes,1,opt,name=agent" json:"agent,omitempty"` Environment *Environment `protobuf:"bytes,2,opt,name=environment" json:"environment,omitempty"` Project *Project `protobuf:"bytes,4,opt,name=project" json:"project,omitempty"` Pipeline *Pipeline `protobuf:"bytes,5,opt,name=pipeline" json:"pipeline,omitempty"` Job *Job `protobuf:"bytes,6,opt,name=job" json:"job,omitempty"` User *User `protobuf:"bytes,7,opt,name=user" json:"user,omitempty"` // contains filtered or unexported fields }
func (*TemplatingInfo) Descriptor
deprecated
func (*TemplatingInfo) Descriptor() ([]byte, []int)
Deprecated: Use TemplatingInfo.ProtoReflect.Descriptor instead.
func (*TemplatingInfo) GetAgent ¶
func (x *TemplatingInfo) GetAgent() *Agent
func (*TemplatingInfo) GetEnvironment ¶
func (x *TemplatingInfo) GetEnvironment() *Environment
func (*TemplatingInfo) GetJob ¶
func (x *TemplatingInfo) GetJob() *Job
func (*TemplatingInfo) GetPipeline ¶
func (x *TemplatingInfo) GetPipeline() *Pipeline
func (*TemplatingInfo) GetProject ¶
func (x *TemplatingInfo) GetProject() *Project
func (*TemplatingInfo) GetUser ¶
func (x *TemplatingInfo) GetUser() *User
func (*TemplatingInfo) ProtoMessage ¶
func (*TemplatingInfo) ProtoMessage()
func (*TemplatingInfo) ProtoReflect ¶
func (x *TemplatingInfo) ProtoReflect() protoreflect.Message
func (*TemplatingInfo) Reset ¶
func (x *TemplatingInfo) Reset()
func (*TemplatingInfo) String ¶
func (x *TemplatingInfo) String() string
func (*TemplatingInfo) ToEnvironmentInfo ¶
func (x *TemplatingInfo) ToEnvironmentInfo(tplName string) *EnvironmentInfo
type User ¶
type User struct { Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username" json:"username,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
Source Files ¶
Click to show internal directories.
Click to hide internal directories.