loader

package
v0.33.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Copyright (C) 2020-2023 Daniele Rondina <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LxdCInstance

type LxdCInstance struct {
	Config         *specs.LxdComposeConfig
	Logger         *log.LxdCLogger
	Environments   []specs.LxdCEnvironment
	SkipSync       bool
	FlagsDisabled  []string
	FlagsEnabled   []string
	GroupsEnabled  []string
	GroupsDisabled []string
	NodesPrefix    string

	Upgrade bool
	Ask     bool
}

func NewLxdCInstance

func NewLxdCInstance(config *specs.LxdComposeConfig) *LxdCInstance

func (*LxdCInstance) AddEnvironment

func (i *LxdCInstance) AddEnvironment(env specs.LxdCEnvironment)

func (*LxdCInstance) AddFlagDisabled added in v0.2.0

func (i *LxdCInstance) AddFlagDisabled(flag string)

func (*LxdCInstance) AddFlagEnabled added in v0.2.0

func (i *LxdCInstance) AddFlagEnabled(flag string)

func (*LxdCInstance) ApplyCommand added in v0.16.2

func (i *LxdCInstance) ApplyCommand(c *specs.LxdCCommand, proj *specs.LxdCProject, envs []string, varfiles []string) error

func (*LxdCInstance) ApplyGroup

func (*LxdCInstance) ApplyProject

func (i *LxdCInstance) ApplyProject(projectName string) error

func (*LxdCInstance) DestroyGroup

func (i *LxdCInstance) DestroyGroup(group *specs.LxdCGroup, proj *specs.LxdCProject, env *specs.LxdCEnvironment) error

func (*LxdCInstance) DestroyProject

func (i *LxdCInstance) DestroyProject(projectName string) error

func (*LxdCInstance) GetAskMode added in v0.31.0

func (i *LxdCInstance) GetAskMode() bool

func (*LxdCInstance) GetConfig

func (i *LxdCInstance) GetConfig() *specs.LxdComposeConfig

func (*LxdCInstance) GetEntitiesByNodeName

func (i *LxdCInstance) GetEntitiesByNodeName(name string) (*specs.LxdCEnvironment, *specs.LxdCProject, *specs.LxdCGroup, *specs.LxdCNode)

func (*LxdCInstance) GetEnvByProjectName

func (i *LxdCInstance) GetEnvByProjectName(name string) *specs.LxdCEnvironment

func (*LxdCInstance) GetEnvironments

func (i *LxdCInstance) GetEnvironments() *[]specs.LxdCEnvironment

func (*LxdCInstance) GetEnvsUsingACL added in v0.22.0

func (i *LxdCInstance) GetEnvsUsingACL(name string) []*specs.LxdCEnvironment

func (*LxdCInstance) GetEnvsUsingNetwork added in v0.10.0

func (i *LxdCInstance) GetEnvsUsingNetwork(name string) []*specs.LxdCEnvironment

func (*LxdCInstance) GetEnvsUsingProfile added in v0.10.0

func (i *LxdCInstance) GetEnvsUsingProfile(name string) []*specs.LxdCEnvironment

func (*LxdCInstance) GetEnvsUsingStorage added in v0.15.0

func (i *LxdCInstance) GetEnvsUsingStorage(name string) []*specs.LxdCEnvironment

func (*LxdCInstance) GetFlagsDisabled added in v0.2.0

func (i *LxdCInstance) GetFlagsDisabled() []string

func (*LxdCInstance) GetFlagsEnabled added in v0.2.0

func (i *LxdCInstance) GetFlagsEnabled() []string

func (*LxdCInstance) GetGroupsDisabled added in v0.3.0

func (i *LxdCInstance) GetGroupsDisabled() []string

func (*LxdCInstance) GetGroupsEnabled added in v0.3.0

func (i *LxdCInstance) GetGroupsEnabled() []string

func (*LxdCInstance) GetNodeHooks4Event

func (i *LxdCInstance) GetNodeHooks4Event(event string, proj *specs.LxdCProject, group *specs.LxdCGroup, node *specs.LxdCNode) []specs.LxdCHook

func (*LxdCInstance) GetNodesPrefix added in v0.5.0

func (i *LxdCInstance) GetNodesPrefix() string

func (*LxdCInstance) GetSkipSync added in v0.3.0

func (i *LxdCInstance) GetSkipSync() bool

func (*LxdCInstance) GetUpgradeMode added in v0.31.0

func (i *LxdCInstance) GetUpgradeMode() bool

func (*LxdCInstance) LoadEnvironments

func (i *LxdCInstance) LoadEnvironments() error

func (*LxdCInstance) PackProjects added in v0.26.0

func (i *LxdCInstance) PackProjects(tarball, sourceCPDir string,
	projects []string) (string, error)

func (*LxdCInstance) ProcessHooks

func (i *LxdCInstance) ProcessHooks(hooks *[]specs.LxdCHook, proj *specs.LxdCProject, group *specs.LxdCGroup, targetNode *specs.LxdCNode) error

func (*LxdCInstance) SetAskMode added in v0.31.0

func (i *LxdCInstance) SetAskMode(v bool)

func (*LxdCInstance) SetFlagsDisabled added in v0.2.0

func (i *LxdCInstance) SetFlagsDisabled(flags []string)

func (*LxdCInstance) SetFlagsEnabled added in v0.2.0

func (i *LxdCInstance) SetFlagsEnabled(flags []string)

func (*LxdCInstance) SetGroupsDisabled added in v0.3.0

func (i *LxdCInstance) SetGroupsDisabled(groups []string)

func (*LxdCInstance) SetGroupsEnabled added in v0.3.0

func (i *LxdCInstance) SetGroupsEnabled(groups []string)

func (*LxdCInstance) SetNodesPrefix added in v0.5.0

func (i *LxdCInstance) SetNodesPrefix(s string)

func (*LxdCInstance) SetSkipSync added in v0.3.0

func (i *LxdCInstance) SetSkipSync(v bool)

func (*LxdCInstance) SetUpgradeMode added in v0.31.0

func (i *LxdCInstance) SetUpgradeMode(v bool)

func (*LxdCInstance) StopGroup added in v0.22.0

func (i *LxdCInstance) StopGroup(group *specs.LxdCGroup, proj *specs.LxdCProject, env *specs.LxdCEnvironment) error

func (*LxdCInstance) StopProject added in v0.22.0

func (i *LxdCInstance) StopProject(projectName string) error

func (*LxdCInstance) Validate

func (i *LxdCInstance) Validate(ignoreError bool) error

type PackJob added in v0.26.0

type PackJob struct {
	Envs                []*specs.LxdCEnvironment
	MapHooks            map[string]bool
	MapTemplates        map[string]bool
	MapEnvsfiles        map[string]bool
	MapExtra            map[string]bool
	MapEIncludes        map[string]bool
	MapRenames          map[string]bool
	Specfile            *tarf_specs.SpecFile
	SourceDir           string
	TargetSourcedir     string
	SourceCommonPathDir string

	EnvsDirs map[string]bool
}

func (*PackJob) HasEnv added in v0.26.0

func (j *PackJob) HasEnv(e *specs.LxdCEnvironment) bool

Jump to

Keyboard shortcuts

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