Documentation ¶
Index ¶
- Variables
- func ApplyResourceOperation(resource Resource) (bool, error)
- func ContextAddDnsModule(module Module)
- func ContextAddPluginModule(module Module)
- func ContextSetContainerModule(module Module)
- func ContextSetProxyModule(module Module)
- func GenerateSSHKeyPair() (*rsa.PrivateKey, error)
- func GetModuleSettings(moduleName string) interface{}
- func InitializeContext(host string, action string, projectDefinition *project.Project)
- func InstallPackage(packages []Package) error
- func RemoteRun(cmd string, opts RemoteRunOpts) (bytes.Buffer, bytes.Buffer, error)
- func RenderModuleTemplate(templateFolder embed.FS, fileName string, additionalData map[string]any, ...) (string, error)
- func RenderModuleTemplateText(templateName string, fileContents string, additionalData map[string]any, ...) (string, error)
- func ResolveRemoteGroupIntoGid(groupname string) (int, error)
- func ResolveRemoteUserIntoUid(username string) (int, error)
- func RollbackResourceOperation(resource Resource) (bool, error)
- func SimpleRemoteRun(cmd string, opts RemoteRunOpts) (string, error)
- func UnpackModuleSettings[T interface{}](_modulesSettings interface{}) (*T, error)
- func UpdatePackageList(vendors ...PackageVendor) error
- func ValidateVersion() (bool, string, error)
- func WriteVersion() error
- type ApplyResourceFuncType
- type ContextAuthenticationStruct
- type ContextStruct
- type DebugLogger
- type DeployedProject
- type Module
- type ModuleConfig
- type ModuleTemplateData
- type Operation
- type Package
- type PackageVendor
- type PluginModule
- type RemoteRunOpts
- type Resource
- type ResourceGroup
- type RollbackResourceFuncType
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var Context = ContextStruct{}
View Source
var ContextActionProjectDeploy = "project.deploy"
View Source
var ContextActionProjectDestroy = "project.destroy"
View Source
var ContextActionServerSetup = "server.setup"
Functions ¶
func ApplyResourceOperation ¶
func ContextAddDnsModule ¶
func ContextAddDnsModule(module Module)
func ContextAddPluginModule ¶
func ContextAddPluginModule(module Module)
func ContextSetContainerModule ¶
func ContextSetContainerModule(module Module)
func ContextSetProxyModule ¶
func ContextSetProxyModule(module Module)
func GenerateSSHKeyPair ¶
func GenerateSSHKeyPair() (*rsa.PrivateKey, error)
func GetModuleSettings ¶
func GetModuleSettings(moduleName string) interface{}
func InitializeContext ¶
InitializeContext will set the context object for the current host, action and project
host = IP address string action = any of ContextAction* constants projectDefinition = project definition object
func InstallPackage ¶
func RenderModuleTemplate ¶
func SimpleRemoteRun ¶
func SimpleRemoteRun(cmd string, opts RemoteRunOpts) (string, error)
func UnpackModuleSettings ¶
func UnpackModuleSettings[T interface{}](_modulesSettings interface{}) (*T, error)
func UpdatePackageList ¶
func UpdatePackageList(vendors ...PackageVendor) error
func ValidateVersion ¶
func WriteVersion ¶
func WriteVersion() error
Types ¶
type ApplyResourceFuncType ¶
type ApplyResourceFuncType func() error
type ContextAuthenticationStruct ¶
type ContextAuthenticationStruct struct {
LocalAuthenticationDir string
}
func (ContextAuthenticationStruct) GetPrivateKeyPath ¶
func (c ContextAuthenticationStruct) GetPrivateKeyPath() string
func (ContextAuthenticationStruct) GetPublicKeyPath ¶
func (c ContextAuthenticationStruct) GetPublicKeyPath() string
type ContextStruct ¶
type ContextStruct struct { TargetHost net.IP CurrentAction string Project *project.Project IsCI bool Authentication ContextAuthenticationStruct Resources []ResourceGroup ProxyModule Module ContainerModule Module DNSModules []Module PluginModules []Module }
func (ContextStruct) GetModulesInOrder ¶
func (c ContextStruct) GetModulesInOrder() []Module
type DebugLogger ¶
type DebugLogger struct { }
func (DebugLogger) Debug ¶
func (DebugLogger) Debug(obj interface{})
func (DebugLogger) Error ¶
func (DebugLogger) Error(obj interface{})
type DeployedProject ¶
func GetDeployedProjects ¶
func GetDeployedProjects() ([]DeployedProject, error)
type ModuleConfig ¶
type ModuleTemplateData ¶
type Package ¶
type Package struct { Name string Vendor PackageVendor }
type PackageVendor ¶
type PackageVendor string
var PackageVendorApk PackageVendor = "apk"
var PackageVendorApt PackageVendor = "apt"
type PluginModule ¶
type PluginModule interface { Init(moduleSettings interface{}) GetConfig() ModuleConfig GetTemplates() *embed.FS }
type RemoteRunOpts ¶
type Resource ¶
type Resource struct { Type Type Operation Operation // name of the resource (e.g. file name, container name) Name string // contents of resource, if any Content string // name of the associated service ServiceName string // for container resources Ports []string ImageName string }
func (Resource) GetOperationLabel ¶
type ResourceGroup ¶
type ResourceGroup struct { Name string Resources []Resource ApplyResourceFunc ApplyResourceFuncType RollbackResourceFunc RollbackResourceFuncType }
type RollbackResourceFuncType ¶
type RollbackResourceFuncType func() error
Click to show internal directories.
Click to hide internal directories.