Documentation ¶
Overview ¶
Copyright (C) 2020-2022 Daniele Rondina <geaaru@funtoo.org> Credits goes also to Gogs authors, some code portions and re-implemented design are also coming from the Gogs project, which is using the go-macaron framework and was really source of ispiration. Kudos to them!
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2020-2023 Daniele Rondina <geaaru@sabayonlinux.org> Credits goes also to Gogs authors, some code portions and re-implemented design are also coming from the Gogs project, which is using the go-macaron framework and was really source of ispiration. Kudos to them!
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2020-2023 Daniele Rondina <geaaru@funtoo.org> Credits goes also to Gogs authors, some code portions and re-implemented design are also coming from the Gogs project, which is using the go-macaron framework and was really source of ispiration. Kudos to them!
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2020-2022 Daniele Rondina <geaaru@funtoo.org> Credits goes also to Gogs authors, some code portions and re-implemented design are also coming from the Gogs project, which is using the go-macaron framework and was really source of ispiration. Kudos to them!
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2020 Daniele Rondina <geaaru@sabayonlinux.org> Credits goes also to Gogs authors, some code portions and re-implemented design are also coming from the Gogs project, which is using the go-macaron framework and was really source of ispiration. Kudos to them!
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2020-2022 Daniele Rondina <geaaru@sabayonlinux.org> Credits goes also to Gogs authors, some code portions and re-implemented design are also coming from the Gogs project, which is using the go-macaron framework and was really source of ispiration. Kudos to them!
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2020-2021 Daniele Rondina <geaaru@sabayonlinux.org> Credits goes also to Gogs authors, some code portions and re-implemented design are also coming from the Gogs project, which is using the go-macaron framework and was really source of ispiration. Kudos to them!
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2020 Daniele Rondina <geaaru@sabayonlinux.org> Credits goes also to Gogs authors, some code portions and re-implemented design are also coming from the Gogs project, which is using the go-macaron framework and was really source of ispiration. Kudos to them!
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2020-2022 Daniele Rondina <geaaru@funtoo.org> Credits goes also to Gogs authors, some code portions and re-implemented design are also coming from the Gogs project, which is using the go-macaron framework and was really source of ispiration. Kudos to them!
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2020-2021 Daniele Rondina <geaaru@sabayonlinux.org> Credits goes also to Gogs authors, some code portions and re-implemented design are also coming from the Gogs project, which is using the go-macaron framework and was really source of ispiration. Kudos to them!
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2020-2021 Daniele Rondina <geaaru@sabayonlinux.org> Credits goes also to Gogs authors, some code portions and re-implemented design are also coming from the Gogs project, which is using the go-macaron framework and was really source of ispiration. Kudos to them!
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2020-2023 Daniele Rondina <geaaru@sabayonlinux.org> Credits goes also to Gogs authors, some code portions and re-implemented design are also coming from the Gogs project, which is using the go-macaron framework and was really source of ispiration. Kudos to them!
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2020-2021 Daniele Rondina <geaaru@sabayonlinux.org> Credits goes also to Gogs authors, some code portions and re-implemented design are also coming from the Gogs project, which is using the go-macaron framework and was really source of ispiration. Kudos to them!
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- Constants
- func GenDefault(viper *v.Viper)
- type LxdCAcl
- type LxdCAclRule
- type LxdCCommand
- func (c *LxdCCommand) GetDescription() string
- func (c *LxdCCommand) GetDestroy() bool
- func (c *LxdCCommand) GetDisableFlags() []string
- func (c *LxdCCommand) GetDisableGroups() []string
- func (c *LxdCCommand) GetEnableFlags() []string
- func (c *LxdCCommand) GetEnableGroups() []string
- func (c *LxdCCommand) GetEnvs() LxdCEnvVars
- func (c *LxdCCommand) GetName() string
- func (c *LxdCCommand) GetNodePrefix() string
- func (c *LxdCCommand) GetProject() string
- func (c *LxdCCommand) GetSkipSync() bool
- func (c *LxdCCommand) GetVarFiles() []string
- type LxdCConfigTemplate
- type LxdCEnvVars
- type LxdCEnvironment
- func (e *LxdCEnvironment) AddACL(acl *LxdCAcl)
- func (e *LxdCEnvironment) AddCommand(cmd *LxdCCommand)
- func (e *LxdCEnvironment) AddNetwork(network *LxdCNetwork)
- func (e *LxdCEnvironment) AddProfile(profile *LxdCProfile)
- func (e *LxdCEnvironment) AddStorage(storage *LxdCStorage)
- func (e *LxdCEnvironment) GetACL(name string) (LxdCAcl, error)
- func (e *LxdCEnvironment) GetACLs() *[]LxdCAcl
- func (e *LxdCEnvironment) GetBaseFile() string
- func (e *LxdCEnvironment) GetCommand(name string) (*LxdCCommand, error)
- func (e *LxdCEnvironment) GetCommands() *[]LxdCCommand
- func (e *LxdCEnvironment) GetNetwork(name string) (LxdCNetwork, error)
- func (e *LxdCEnvironment) GetNetworks() *[]LxdCNetwork
- func (e *LxdCEnvironment) GetProfile(name string) (LxdCProfile, error)
- func (e *LxdCEnvironment) GetProfiles() *[]LxdCProfile
- func (e *LxdCEnvironment) GetProjectByName(pName string) *LxdCProject
- func (e *LxdCEnvironment) GetProjects() *[]LxdCProject
- func (e *LxdCEnvironment) GetStorage(name string) (LxdCStorage, error)
- func (e *LxdCEnvironment) GetStorages() *[]LxdCStorage
- type LxdCGeneral
- type LxdCGroup
- func (g *LxdCGroup) AddHooks(h *LxdCHooks)
- func (g *LxdCGroup) GetCommonProfiles() []string
- func (g *LxdCGroup) GetConnection() string
- func (g *LxdCGroup) GetDescription() string
- func (g *LxdCGroup) GetHooks(event string) []LxdCHook
- func (g *LxdCGroup) GetHooks4Nodes(event string, nodes []string) []LxdCHook
- func (g *LxdCGroup) GetLxdConfig() map[string]string
- func (g *LxdCGroup) GetName() string
- func (g *LxdCGroup) GetNodes() *[]LxdCNode
- func (g *LxdCGroup) GetNodesPrefix() string
- func (g *LxdCGroup) Init()
- func (g *LxdCGroup) IsEphemeral() bool
- func (g *LxdCGroup) SetNodesPrefix(prefix string)
- func (g *LxdCGroup) ToProcess(groupsEnabled, groupsDisabled []string) bool
- type LxdCHook
- type LxdCHooks
- type LxdCLogging
- type LxdCNetwork
- type LxdCNetworkForward
- type LxdCNetworkForwardPort
- type LxdCNode
- func (n *LxdCNode) AddHooks(h *LxdCHooks)
- func (n *LxdCNode) GetAllHooks(event string) []LxdCHook
- func (n *LxdCNode) GetHooks(event string) []LxdCHook
- func (n *LxdCNode) GetLxdConfig(groupMap map[string]string) map[string]string
- func (n *LxdCNode) GetName() string
- func (n *LxdCNode) Init()
- func (n *LxdCNode) IsSourcePathRelative() bool
- func (n *LxdCNode) ToJson() (string, error)
- func (n *LxdCNode) Wait4Ip() int64
- type LxdCPackExtra
- type LxdCProfile
- type LxdCProject
- func (p *LxdCProject) AddEnvironment(e *LxdCEnvVars)
- func (p *LxdCProject) AddGroup(grp *LxdCGroup)
- func (p *LxdCProject) AddHooks(h *LxdCHooks)
- func (p *LxdCProject) GetDescription() string
- func (p *LxdCProject) GetEnvsMap() (map[string]string, error)
- func (p *LxdCProject) GetGroupByName(name string) *LxdCGroup
- func (p *LxdCProject) GetGroups() *[]LxdCGroup
- func (p *LxdCProject) GetHooks(event string) []LxdCHook
- func (p *LxdCProject) GetHooks4Nodes(event string, nodes []string) []LxdCHook
- func (p *LxdCProject) GetName() string
- func (p *LxdCProject) GetNodesPrefix() string
- func (p *LxdCProject) GetShellEnvsFilter() *[]string
- func (p *LxdCProject) Init()
- func (p *LxdCProject) LoadEnvVarsFile(file string) error
- func (p *LxdCProject) Sanitize() *LxdCProjectSanitized
- func (p *LxdCProject) SetNodesPrefix(prefix string)
- type LxdCProjectSanitized
- type LxdCStorage
- type LxdCSyncResource
- type LxdCTemplateEngine
- type LxdComposeConfig
- func (c *LxdComposeConfig) Clone() *LxdComposeConfig
- func (c *LxdComposeConfig) GetEnvironmentDirs() []string
- func (c *LxdComposeConfig) GetGeneral() *LxdCGeneral
- func (c *LxdComposeConfig) GetLogging() *LxdCLogging
- func (c *LxdComposeConfig) IsEnableRenderEngine() bool
- func (c *LxdComposeConfig) SetRenderEnvs(envs []string) error
- func (c *LxdComposeConfig) Unmarshal() error
- func (c *LxdComposeConfig) Yaml() ([]byte, error)
Constants ¶
const ( LXD_COMPOSE_CONFIGNAME = ".lxd-compose" LXD_COMPOSE_ENV_PREFIX = "LXD_COMPOSE" )
const ( HookPreProject = "pre-project" HookPreGroup = "pre-group" HookPreNodeCreation = "pre-node-creation" HookPostNodeCreation = "post-node-creation" HookPreNodeSync = "pre-node-sync" HookPostNodeSync = "post-node-sync" HookPostGroup = "post-group" HookPostProject = "post-project" HookPreProjectShutdown = "pre-project-shutdown" HookPostProjectShutdown = "post-project-shutdown" HookPreGroupShutdown = "pre-group-shutdown" HookPostGroupShutdown = "post-group-shutdown" HookPreNodeShutdown = "pre-node-shutdown" HookPostNodeShutdown = "post-node-shutdown" HookPreNodeUpgrade = "pre-node-upgrade" HookPostNodeUpgrade = "post-node-upgrade" )
Variables ¶
This section is empty.
Functions ¶
func GenDefault ¶
Types ¶
type LxdCAcl ¶ added in v0.22.0
type LxdCAcl struct { // Name of the ACL Name string `json:"name" yaml:"name"` Documentation string `json:"documentation,omitempty" yaml:"documentation,omitempty"` // Description of the ACL // Example: Web servers Description string `json:"description" yaml:"description"` // List of egress rules (order independent) Egress []LxdCAclRule `json:"egress" yaml:"egress"` // List of ingress rules (order independent) Ingress []LxdCAclRule `json:"ingress" yaml:"ingress"` // ACL configuration map // Example: {"user.mykey": "foo"} Config map[string]string `json:"config" yaml:"config"` }
func AclFromYaml ¶ added in v0.22.0
func (*LxdCAcl) GetDescription ¶ added in v0.22.0
func (*LxdCAcl) GetDocumentation ¶ added in v0.22.0
func (*LxdCAcl) GetEgress ¶ added in v0.22.0
func (n *LxdCAcl) GetEgress() *[]LxdCAclRule
func (*LxdCAcl) GetIngress ¶ added in v0.22.0
func (n *LxdCAcl) GetIngress() *[]LxdCAclRule
type LxdCAclRule ¶ added in v0.22.0
type LxdCAclRule struct { // Action to perform on rule match // Example: allow Action string `json:"action" yaml:"action"` // Source address // Example: @internal Source string `json:"source,omitempty" yaml:"source,omitempty"` // Destination address // Example: 8.8.8.8/32,8.8.4.4/32 Destination string `json:"destination,omitempty" yaml:"destination,omitempty"` // Protocol // Example: udp Protocol string `json:"protocol,omitempty" yaml:"protocol,omitempty"` // Source port // Example: 1234 SourcePort string `json:"source_port,omitempty" yaml:"source_port,omitempty"` // Destination port // Example: 53 DestinationPort string `json:"destination_port,omitempty" yaml:"destination_port,omitempty"` // Type of ICMP message (for ICMP protocol) // Example: 8 ICMPType string `json:"icmp_type,omitempty" yaml:"icmp_type,omitempty"` // ICMP message code (for ICMP protocol) // Example: 0 ICMPCode string `json:"icmp_code,omitempty" yaml:"icmp_code,omitempty"` // Description of the rule // Example: Allow DNS queries to Google DNS Description string `json:"description,omitempty" yaml:"description,omitempty"` // State of the rule // Example: enabled State string `json:"state" yaml:"state"` }
type LxdCCommand ¶ added in v0.9.0
type LxdCCommand struct { Name string `json:"name" yaml:"name"` Description string `json:"description" yaml:"description"` Project string `json:"project" yaml:"project"` ApplyAlias bool `json:"apply_alias,omitempty" yaml:"apply_alias,omitempty"` SkipSync bool `json:"skip_sync,omitempty" yaml:"skip_sync,omitempty"` Destroy bool `json:"destroy,omitempty" yaml:"destroy,omitempty"` NodesPrefix string `json:"nodes_prefix,omitempty" yaml:"nodes_prefix,omitempty"` EnableFlags []string `json:"enable_flags,omitempty" yaml:"enable_flags,omitempty"` DisableFlags []string `json:"disable_flags,omitempty" yaml:"disable_flags,omitempty"` EnableGroups []string `json:"enable_groups,omitempty" yaml:"enable_groups,omitempty"` DisableGroups []string `json:"disable_groups,omitempty" yaml:"disable_groups,omitempty"` Envs LxdCEnvVars `json:"envs,omitempty" yaml:"envs,omitempty"` VarFiles []string `json:"vars_files,omitempty" yaml:"vars_files,omitempty"` IncludeHooksFiles []string `json:"include_hooks_files,omitempty" yaml:"include_hooks_files,omitempty"` }
func CommandFromFile ¶ added in v0.14.2
func CommandFromFile(file string) (*LxdCCommand, error)
func CommandFromYaml ¶ added in v0.10.1
func CommandFromYaml(data []byte) (*LxdCCommand, error)
func (*LxdCCommand) GetDescription ¶ added in v0.9.0
func (c *LxdCCommand) GetDescription() string
func (*LxdCCommand) GetDestroy ¶ added in v0.12.1
func (c *LxdCCommand) GetDestroy() bool
func (*LxdCCommand) GetDisableFlags ¶ added in v0.9.0
func (c *LxdCCommand) GetDisableFlags() []string
func (*LxdCCommand) GetDisableGroups ¶ added in v0.9.0
func (c *LxdCCommand) GetDisableGroups() []string
func (*LxdCCommand) GetEnableFlags ¶ added in v0.9.0
func (c *LxdCCommand) GetEnableFlags() []string
func (*LxdCCommand) GetEnableGroups ¶ added in v0.9.0
func (c *LxdCCommand) GetEnableGroups() []string
func (*LxdCCommand) GetEnvs ¶ added in v0.9.0
func (c *LxdCCommand) GetEnvs() LxdCEnvVars
func (*LxdCCommand) GetName ¶ added in v0.9.0
func (c *LxdCCommand) GetName() string
func (*LxdCCommand) GetNodePrefix ¶ added in v0.9.0
func (c *LxdCCommand) GetNodePrefix() string
func (*LxdCCommand) GetProject ¶ added in v0.9.0
func (c *LxdCCommand) GetProject() string
func (*LxdCCommand) GetSkipSync ¶ added in v0.12.1
func (c *LxdCCommand) GetSkipSync() bool
func (*LxdCCommand) GetVarFiles ¶ added in v0.9.0
func (c *LxdCCommand) GetVarFiles() []string
type LxdCConfigTemplate ¶
type LxdCEnvVars ¶
type LxdCEnvVars struct {
EnvVars map[string]interface{} `json:"envs,omitempty" yaml:"envs,omitempty"`
}
func EnvVarsFromYaml ¶
func EnvVarsFromYaml(data []byte) (*LxdCEnvVars, error)
func NewEnvVars ¶ added in v0.3.0
func NewEnvVars() *LxdCEnvVars
func (*LxdCEnvVars) AddKV ¶ added in v0.3.0
func (e *LxdCEnvVars) AddKV(key, value string) error
func (*LxdCEnvVars) AddKVAggregated ¶ added in v0.3.0
func (e *LxdCEnvVars) AddKVAggregated(aggregatedEnv string) error
type LxdCEnvironment ¶
type LxdCEnvironment struct { Version string `json:"version,omitempty" yaml:"version,omitempty"` File string `json:"-" yaml:"-"` TemplateEngine LxdCTemplateEngine `json:"template_engine,omitempty" yaml:"template_engine,omitempty"` Projects []LxdCProject `json:"projects" yaml:"projects"` Commands []LxdCCommand `json:"commands,omitempty" yaml:"commands,omitempty"` IncludeCommandsFiles []string `json:"include_commands_files,omitempty" yaml:"include_commands_files,omitempty"` Profiles []LxdCProfile `json:"profiles,omitempty" yaml:"profiles,omitempty"` IncludeProfilesFiles []string `json:"include_profiles_files,omitempty" yaml:"include_profiles_files,omitempty"` Networks []LxdCNetwork `json:"networks,omitempty" yaml:"networks,omitempty"` IncludeNetworkFiles []string `json:"include_networks_files,omitempty" yaml:"include_networks_files,omitempty"` Storages []LxdCStorage `json:"storages,omitempty" yaml:"storages,omitempty"` IncludeStorageFiles []string `json:"include_storage_files,omitempty" yaml:"include_storage_files,omitempty"` Acls []LxdCAcl `json:"acls,omitempty" yaml:"acls,omitempty"` IncludeAclsFiles []string `json:"include_acls_files,omitempty" yaml:"include_acls_files,omitempty"` PackExtra *LxdCPackExtra `json:"pack_extra,omitempty" yaml:"pack_extra,omitempty"` }
func EnvironmentFromYaml ¶
func EnvironmentFromYaml(data []byte, file string) (*LxdCEnvironment, error)
func (*LxdCEnvironment) AddACL ¶ added in v0.22.0
func (e *LxdCEnvironment) AddACL(acl *LxdCAcl)
func (*LxdCEnvironment) AddCommand ¶ added in v0.10.1
func (e *LxdCEnvironment) AddCommand(cmd *LxdCCommand)
func (*LxdCEnvironment) AddNetwork ¶ added in v0.11.0
func (e *LxdCEnvironment) AddNetwork(network *LxdCNetwork)
func (*LxdCEnvironment) AddProfile ¶ added in v0.11.0
func (e *LxdCEnvironment) AddProfile(profile *LxdCProfile)
func (*LxdCEnvironment) AddStorage ¶ added in v0.15.0
func (e *LxdCEnvironment) AddStorage(storage *LxdCStorage)
func (*LxdCEnvironment) GetACL ¶ added in v0.22.0
func (e *LxdCEnvironment) GetACL(name string) (LxdCAcl, error)
func (*LxdCEnvironment) GetACLs ¶ added in v0.22.0
func (e *LxdCEnvironment) GetACLs() *[]LxdCAcl
func (*LxdCEnvironment) GetBaseFile ¶ added in v0.10.1
func (e *LxdCEnvironment) GetBaseFile() string
func (*LxdCEnvironment) GetCommand ¶ added in v0.9.0
func (e *LxdCEnvironment) GetCommand(name string) (*LxdCCommand, error)
func (*LxdCEnvironment) GetCommands ¶ added in v0.9.0
func (e *LxdCEnvironment) GetCommands() *[]LxdCCommand
func (*LxdCEnvironment) GetNetwork ¶ added in v0.7.0
func (e *LxdCEnvironment) GetNetwork(name string) (LxdCNetwork, error)
func (*LxdCEnvironment) GetNetworks ¶ added in v0.7.0
func (e *LxdCEnvironment) GetNetworks() *[]LxdCNetwork
func (*LxdCEnvironment) GetProfile ¶
func (e *LxdCEnvironment) GetProfile(name string) (LxdCProfile, error)
func (*LxdCEnvironment) GetProfiles ¶
func (e *LxdCEnvironment) GetProfiles() *[]LxdCProfile
func (*LxdCEnvironment) GetProjectByName ¶
func (e *LxdCEnvironment) GetProjectByName(pName string) *LxdCProject
func (*LxdCEnvironment) GetProjects ¶
func (e *LxdCEnvironment) GetProjects() *[]LxdCProject
func (*LxdCEnvironment) GetStorage ¶ added in v0.15.0
func (e *LxdCEnvironment) GetStorage(name string) (LxdCStorage, error)
func (*LxdCEnvironment) GetStorages ¶ added in v0.15.0
func (e *LxdCEnvironment) GetStorages() *[]LxdCStorage
type LxdCGeneral ¶
type LxdCGeneral struct { Debug bool `mapstructure:"debug,omitempty" json:"debug,omitempty" yaml:"debug,omitempty"` LxdConfDir string `mapstructure:"lxd_confdir,omitempty" json:"lxd_confdir,omitempty" yaml:"lxd_confdir,omitempty"` LxdLocalDisable bool `mapstructure:"lxd_local_disable,omitempty" json:"lxd_local_disable,omitempty" yaml:"lxd_local_disable,omitempty"` P2PMode bool `mapstructure:"p2pmode,omitempty" json:"p2pmode,omitempty" yaml:"p2pmode,omitempty"` LegacyApi bool `mapstructure:"legacyapi,omitempty" json:"legacyapi,omitempty" yaml:"legacyapi,omitempty"` }
func (*LxdCGeneral) HasDebug ¶
func (g *LxdCGeneral) HasDebug() bool
type LxdCGroup ¶
type LxdCGroup struct { Name string `json:"name" yaml:"name"` Description string `json:"description,omitempty" yaml:"description,omitempty"` Connection string `json:"connection,omitempty" yaml:"connection,omitempty"` CommonProfiles []string `json:"common_profiles,omitempty" yaml:"common_profiles,omitempty"` Config map[string]string `json:"config,omitempty" yaml:"config,omitempty"` Ephemeral bool `json:"ephemeral,omitempty" yaml:"ephemeral,omitempty"` Nodes []LxdCNode `json:"nodes" yaml:"nodes"` NodesPrefix string `json:"nodes_prefix,omitempty" yaml:"nodes_prefix,omitempty"` Hooks []LxdCHook `json:"hooks" yaml:"hooks"` IncludeHooksFiles []string `json:"include_hooks_files,omitempty" yaml:"include_hooks_files,omitempty"` ConfigTemplates []LxdCConfigTemplate `json:"config_templates,omitempty" yaml:"config_templates,omitempty"` }
func GroupFromYaml ¶
func (*LxdCGroup) GetCommonProfiles ¶ added in v0.7.2
func (*LxdCGroup) GetConnection ¶ added in v0.7.2
func (*LxdCGroup) GetDescription ¶ added in v0.7.2
func (*LxdCGroup) GetHooks4Nodes ¶
func (*LxdCGroup) GetLxdConfig ¶ added in v0.18.0
func (*LxdCGroup) GetNodesPrefix ¶ added in v0.5.0
func (*LxdCGroup) IsEphemeral ¶ added in v0.7.2
func (*LxdCGroup) SetNodesPrefix ¶ added in v0.5.0
type LxdCHook ¶
type LxdCHook struct { Event string `json:"event" yaml:"event"` Node string `json:"node" yaml:"node"` Commands []string `json:"commands,omitempty" yaml:"commands,omitempty"` Out2Var string `json:"out2var,omitempty" yaml:"out2var,omitempty"` Err2Var string `json:"err2var,omitempty" yaml:"err2var,omitempty"` Entrypoint []string `json:"entrypoint,omitempty" yaml:"entrypoint,omitempty"` Flags []string `json:"flags,omitempty" yaml:"flags,omitempty"` Disable bool `json:"disable,omitempty" yaml:"disable,omitempty"` }
func FilterHooks4Node ¶
func (*LxdCHook) ContainsFlag ¶ added in v0.2.0
type LxdCHooks ¶ added in v0.16.0
type LxdCHooks struct {
Hooks []LxdCHook `json:"hooks,omitempty" yaml:"hooks,omitempty"`
}
func HooksFromYaml ¶ added in v0.16.0
type LxdCLogging ¶
type LxdCLogging struct { // Path of the logfile Path string `mapstructure:"path,omitempty" json:"path,omitempty" yaml:"path,omitempty"` // Enable/Disable logging to file EnableLogFile bool `mapstructure:"enable_logfile,omitempty" json:"enable_logfile,omitempty" yaml:"enable_logfile,omitempty"` // Enable JSON format logging in file JsonFormat bool `mapstructure:"json_format,omitempty" json:"json_format,omitempty" yaml:"json_format,omitempty"` // Log level Level string `mapstructure:"level,omitempty" json:"level,omitempty" yaml:"level,omitempty"` // Enable emoji EnableEmoji bool `mapstructure:"enable_emoji,omitempty" json:"enable_emoji,omitempty" yaml:"enable_emoji,omitempty"` // Enable/Disable color in logging Color bool `mapstructure:"color,omitempty" json:"color,omitempty" yaml:"color,omitempty"` // Enable/Disable commands output logging RuntimeCmdsOutput bool `mapstructure:"runtime_cmds_output,omitempty" json:"runtime_cmds_output,omitempty" yaml:"runtime_cmds_output,omitempty"` CmdsOutput bool `mapstructure:"cmds_output,omitempty" json:"cmds_output,omitempty" yaml:"cmds_output,omitempty"` PushProgressBar bool `mapstructure:"push_progressbar,omitempty" json:"push_progressbar,omitempty" yaml:"push_progressbar,omitempty"` }
type LxdCNetwork ¶ added in v0.7.0
type LxdCNetwork struct { Name string `json:"name" yaml:"name"` Type string `json:"type" yaml:"type"` Description string `json:"description" yaml:"description"` Config map[string]string `json:"config" yaml:"config"` // NetworkForwards Forwards []LxdCNetworkForward `json:"forwards,omitempty" yaml:"forwards,omitempty"` }
func NetworkFromYaml ¶ added in v0.11.0
func NetworkFromYaml(data []byte) (*LxdCNetwork, error)
func (*LxdCNetwork) GetDescription ¶ added in v0.11.0
func (n *LxdCNetwork) GetDescription() string
func (*LxdCNetwork) GetForwardAddress ¶ added in v0.23.0
func (n *LxdCNetwork) GetForwardAddress(a string) *LxdCNetworkForward
func (*LxdCNetwork) GetName ¶ added in v0.11.0
func (n *LxdCNetwork) GetName() string
func (*LxdCNetwork) GetType ¶ added in v0.11.0
func (n *LxdCNetwork) GetType() string
func (*LxdCNetwork) IsPresentForwardAddress ¶ added in v0.23.0
func (n *LxdCNetwork) IsPresentForwardAddress(a string) bool
type LxdCNetworkForward ¶ added in v0.23.0
type LxdCNetworkForward struct { ListenAddress string `json:"listen_address" yaml:"listen_address"` Description string `json:"description" yaml:"description"` Config map[string]string `json:"config" yaml:"config"` // Port forwards (optional) Ports []LxdCNetworkForwardPort `json:"ports,omitempty" yaml:"ports,omitempty"` }
type LxdCNetworkForwardPort ¶ added in v0.23.0
type LxdCNetworkForwardPort struct { // Description of the forward port // Example: My web server forward Description string `json:"description" yaml:"description"` // Protocol for port forward (either tcp or udp) // Example: tcp Protocol string `json:"protocol" yaml:"protocol"` // ListenPort(s) to forward (comma delimited ranges) // Example: 80,81,8080-8090 ListenPort string `json:"listen_port" yaml:"listen_port"` // TargetPort(s) to forward ListenPorts to (allows for many-to-one) // Example: 80,81,8080-8090 TargetPort string `json:"target_port" yaml:"target_port"` // TargetAddress to forward ListenPorts to // Example: 198.51.100.2 TargetAddress string `json:"target_address" yaml:"target_address"` }
type LxdCNode ¶
type LxdCNode struct { Name string `json:"name" yaml:"name"` NamePrefix string `json:"name_prefix,omitempty" yaml:"name_prefix,omitempty"` ImageSource string `json:"image_source" yaml:"image_source"` ImageRemoteServer string `json:"image_remote_server,omitempty" yaml:"image_remote_server,omitempty"` Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` Config map[string]string `json:"config,omitempty" yaml:"config,omitempty"` SourceDir string `json:"source_dir,omitempty" yaml:"source_dir,omitempty"` Entrypoint []string `json:"entrypoint,omitempty" yaml:"entrypoint,omitempty"` ConfigTemplates []LxdCConfigTemplate `json:"config_templates,omitempty" yaml:"config_templates,omitempty"` SyncResources []LxdCSyncResource `json:"sync_resources,omitempty" yaml:"sync_resources,omitempty"` Profiles []string `json:"profiles,omitempty" yaml:"profiles,omitempty"` Hooks []LxdCHook `json:"hooks" yaml:"hooks"` IncludeHooksFiles []string `json:"include_hooks_files,omitempty" yaml:"include_hooks_files,omitempty"` // Wait ip address before execute post-node-creation hooks for the timeout // in seconds defined. A value 0 means skip waiting. WaitIp int64 `json:"wait_ip,omitempty" yaml:"wait_ip,omitempty"` }
func (*LxdCNode) GetAllHooks ¶
func (*LxdCNode) GetLxdConfig ¶ added in v0.18.0
func (*LxdCNode) IsSourcePathRelative ¶
type LxdCPackExtra ¶ added in v0.26.0
type LxdCPackExtra struct { Dirs []string `json:"dirs,omitempty" yaml:"dirs,omitempty"` Files []string `json:"files,omitempty" yaml:"files,omitempty"` Rename []*tarf_specs.RenameRule `json:"rename,omitempty" yaml:"rename,omitempty"` }
type LxdCProfile ¶
type LxdCProfile struct { Name string `json:"name" yaml:"name"` Description string `json:"description" yaml:"description"` Config map[string]string `json:"config" yaml:"config"` Devices map[string]map[string]string `json:"devices" yaml:"devices"` }
func ProfileFromYaml ¶ added in v0.11.0
func ProfileFromYaml(data []byte) (*LxdCProfile, error)
func (*LxdCProfile) GetDescription ¶ added in v0.11.0
func (n *LxdCProfile) GetDescription() string
func (*LxdCProfile) GetName ¶ added in v0.11.0
func (n *LxdCProfile) GetName() string
type LxdCProject ¶
type LxdCProject struct { Name string `json:"name" yaml:"name"` Description string `json:"description,omitempty" yaml:"description,omitempty"` IncludeGroupFiles []string `json:"include_groups_files,omitempty" yaml:"include_groups_files,omitempty"` IncludeEnvFiles []string `json:"include_env_files,omitempty" yaml:"include_env_files,omitempty"` IncludeHooksFiles []string `json:"include_hooks_files,omitempty" yaml:"include_hooks_files,omitempty"` Environments []LxdCEnvVars `json:"vars,omitempty" yaml:"vars,omitempty"` ShellEnvsFilter []string `json:"shell_envs_filter,omitempty" yaml:"shell_envs_filter,omitempty"` Groups []LxdCGroup `json:"groups" yaml:"groups"` NodesPrefix string `json:"nodes_prefix,omitempty" yaml:"nodes_prefix,omitempty"` Hooks []LxdCHook `json:"hooks" yaml:"hooks"` ConfigTemplates []LxdCConfigTemplate `json:"config_templates,omitempty" yaml:"config_templates,omitempty"` }
func (*LxdCProject) AddEnvironment ¶
func (p *LxdCProject) AddEnvironment(e *LxdCEnvVars)
func (*LxdCProject) AddGroup ¶
func (p *LxdCProject) AddGroup(grp *LxdCGroup)
func (*LxdCProject) AddHooks ¶ added in v0.16.0
func (p *LxdCProject) AddHooks(h *LxdCHooks)
func (*LxdCProject) GetDescription ¶ added in v0.10.0
func (p *LxdCProject) GetDescription() string
func (*LxdCProject) GetEnvsMap ¶
func (p *LxdCProject) GetEnvsMap() (map[string]string, error)
func (*LxdCProject) GetGroupByName ¶ added in v0.26.0
func (p *LxdCProject) GetGroupByName(name string) *LxdCGroup
func (*LxdCProject) GetGroups ¶ added in v0.7.2
func (p *LxdCProject) GetGroups() *[]LxdCGroup
func (*LxdCProject) GetHooks ¶
func (p *LxdCProject) GetHooks(event string) []LxdCHook
func (*LxdCProject) GetHooks4Nodes ¶
func (p *LxdCProject) GetHooks4Nodes(event string, nodes []string) []LxdCHook
func (*LxdCProject) GetName ¶
func (p *LxdCProject) GetName() string
func (*LxdCProject) GetNodesPrefix ¶ added in v0.5.0
func (p *LxdCProject) GetNodesPrefix() string
func (*LxdCProject) GetShellEnvsFilter ¶ added in v0.25.0
func (p *LxdCProject) GetShellEnvsFilter() *[]string
func (*LxdCProject) Init ¶
func (p *LxdCProject) Init()
func (*LxdCProject) LoadEnvVarsFile ¶ added in v0.8.0
func (p *LxdCProject) LoadEnvVarsFile(file string) error
func (*LxdCProject) Sanitize ¶ added in v0.3.0
func (p *LxdCProject) Sanitize() *LxdCProjectSanitized
func (*LxdCProject) SetNodesPrefix ¶ added in v0.5.0
func (p *LxdCProject) SetNodesPrefix(prefix string)
type LxdCProjectSanitized ¶ added in v0.3.0
type LxdCProjectSanitized struct { Name string `json:"name" yaml:"name"` Description string `json:"description,omitempty" yaml:"description,omitempty"` IncludeGroupFiles []string `json:"include_groups_files,omitempty" yaml:"include_groups_files,omitempty"` IncludeEnvFiles []string `json:"include_env_files,omitempty" yaml:"include_env_files,omitempty"` IncludeHooksFiles []string `json:"include_hooks_files,omitempty" yaml:"include_hooks_files,omitempty"` Groups []LxdCGroup `json:"groups" yaml:"groups"` NodesPrefix string `json:"nodes_prefix,omitempty" yaml:"nodes_prefix,omitempty"` Hooks []LxdCHook `json:"hooks" yaml:"hooks"` ConfigTemplates []LxdCConfigTemplate `json:"config_templates,omitempty" yaml:"config_templates,omitempty"` }
func (*LxdCProjectSanitized) GetDescription ¶ added in v0.10.0
func (p *LxdCProjectSanitized) GetDescription() string
func (*LxdCProjectSanitized) GetGroups ¶ added in v0.10.0
func (p *LxdCProjectSanitized) GetGroups() *[]LxdCGroup
func (*LxdCProjectSanitized) GetName ¶ added in v0.10.0
func (p *LxdCProjectSanitized) GetName() string
type LxdCStorage ¶ added in v0.15.0
type LxdCStorage struct { Name string `json:"name" yaml:"name"` Driver string `json:"driver" yaml:"driver"` Description string `json:"description,omitempty" yaml:"description,omitempty"` Documentation string `json:"documentation,omitempty" yaml:"documentation,omitempty"` Config map[string]string `json:"config" yaml:"config"` }
func StorageFromYaml ¶ added in v0.15.0
func StorageFromYaml(data []byte) (*LxdCStorage, error)
func (*LxdCStorage) GetDescription ¶ added in v0.15.0
func (n *LxdCStorage) GetDescription() string
func (*LxdCStorage) GetDocumentation ¶ added in v0.19.0
func (n *LxdCStorage) GetDocumentation() string
func (*LxdCStorage) GetDriver ¶ added in v0.15.0
func (n *LxdCStorage) GetDriver() string
func (*LxdCStorage) GetName ¶ added in v0.15.0
func (n *LxdCStorage) GetName() string
type LxdCSyncResource ¶
type LxdCTemplateEngine ¶
type LxdComposeConfig ¶
type LxdComposeConfig struct { Viper *v.Viper `yaml:"-" json:"-"` General LxdCGeneral `mapstructure:"general" json:"general,omitempty" yaml:"general,omitempty"` Logging LxdCLogging `mapstructure:"logging" json:"logging,omitempty" yaml:"logging,omitempty"` EnvironmentDirs []string `mapstructure:"env_dirs,omitempty" json:"env_dirs,omitempty" yaml:"env_dirs,omitempty"` RenderDefaultFile string `mapstructure:"render_default_file,omitempty" json:"render_default_file,omitempty" yaml:"render_default_file,omitempty"` RenderValuesFile string `mapstructure:"render_values_file,omitempty" json:"render_values_file,omitempty" yaml:"render_values_file,omitempty"` RenderEnvsVars map[string]interface{} `mapstructure:"-" json:"-" yaml:"-"` RenderTemplatesDirs []string `mapstructure:"render_templates_dirs,omitempty" json:"render_templates_dirs,omitempty" yaml:"render_templates_dirs,omitempty"` }
func NewLxdComposeConfig ¶
func NewLxdComposeConfig(viper *v.Viper) *LxdComposeConfig
func (*LxdComposeConfig) Clone ¶ added in v0.26.0
func (c *LxdComposeConfig) Clone() *LxdComposeConfig
func (*LxdComposeConfig) GetEnvironmentDirs ¶
func (c *LxdComposeConfig) GetEnvironmentDirs() []string
func (*LxdComposeConfig) GetGeneral ¶
func (c *LxdComposeConfig) GetGeneral() *LxdCGeneral
func (*LxdComposeConfig) GetLogging ¶
func (c *LxdComposeConfig) GetLogging() *LxdCLogging
func (*LxdComposeConfig) IsEnableRenderEngine ¶ added in v0.8.0
func (c *LxdComposeConfig) IsEnableRenderEngine() bool
func (*LxdComposeConfig) SetRenderEnvs ¶ added in v0.9.0
func (c *LxdComposeConfig) SetRenderEnvs(envs []string) error
func (*LxdComposeConfig) Unmarshal ¶
func (c *LxdComposeConfig) Unmarshal() error
func (*LxdComposeConfig) Yaml ¶
func (c *LxdComposeConfig) Yaml() ([]byte, error)