managed_resources

package
v17.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

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

func EnvironmentTemplateFile(agentName, templateName string) string

func EnvironmentTemplatesDirectoryForAgent

func EnvironmentTemplatesDirectoryForAgent(agentName string) string

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) Descriptor() ([]byte, []int)

Deprecated: Use Agent.ProtoReflect.Descriptor instead.

func (*Agent) GetId

func (x *Agent) GetId() int64

func (*Agent) GetName

func (x *Agent) GetName() string

func (*Agent) GetUrl

func (x *Agent) GetUrl() string

func (*Agent) ProtoMessage

func (*Agent) ProtoMessage()

func (*Agent) ProtoReflect

func (x *Agent) ProtoReflect() protoreflect.Message

func (*Agent) Reset

func (x *Agent) Reset()

func (*Agent) String

func (x *Agent) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Job.ProtoReflect.Descriptor instead.

func (*Job) GetId

func (x *Job) GetId() int64

func (*Job) ProtoMessage

func (*Job) ProtoMessage()

func (*Job) ProtoReflect

func (x *Job) ProtoReflect() protoreflect.Message

func (*Job) Reset

func (x *Job) Reset()

func (*Job) String

func (x *Job) String() string

type ObjectManager

type ObjectManager struct {
	Client       dynamic.Interface
	Mapper       meta.RESTMapper
	FieldManager string
}

func (*ObjectManager) Apply

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) Descriptor() ([]byte, []int)

Deprecated: Use Pipeline.ProtoReflect.Descriptor instead.

func (*Pipeline) GetId

func (x *Pipeline) GetId() int64

func (*Pipeline) ProtoMessage

func (*Pipeline) ProtoMessage()

func (*Pipeline) ProtoReflect

func (x *Pipeline) ProtoReflect() protoreflect.Message

func (*Pipeline) Reset

func (x *Pipeline) Reset()

func (*Pipeline) String

func (x *Pipeline) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Project.ProtoReflect.Descriptor instead.

func (*Project) GetId

func (x *Project) GetId() int64

func (*Project) GetPath

func (x *Project) GetPath() string

func (*Project) GetSlug

func (x *Project) GetSlug() string

func (*Project) GetUrl

func (x *Project) GetUrl() string

func (*Project) ProtoMessage

func (*Project) ProtoMessage()

func (*Project) ProtoReflect

func (x *Project) ProtoReflect() protoreflect.Message

func (*Project) Reset

func (x *Project) Reset()

func (*Project) String

func (x *Project) String() string

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 (*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) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetId

func (x *User) GetId() int64

func (*User) GetUsername

func (x *User) GetUsername() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL