config

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const OdooBaseURL = "https://github.com/odoo"

Variables

This section is empty.

Functions

func ReadConfValue

func ReadConfValue(conffile, key, def string) string

func WriteOdooConf

func WriteOdooConf(file, projectName, edition string, embedFS embed.FS) error

writeOdooConf Write Odoo Configfile

Types

type Branch

type Branch struct {
	Name             string   `json:"name"`
	Version          string   `json:"version"`
	Image            string   `json:"image"`
	InstanceName     string   `json:"instance_name"`
	Repos            []string `json:"repos"`
	BaselinePackages []string `json:"baseline_packages"`
	Odoobase         []string `json:"odoobase"`
}

func GetBranchLatest

func GetBranchLatest() *Branch

func GetBranches

func GetBranches() []*Branch

func GetVersion

func GetVersion(version string) *Branch

type OdaConf

type OdaConf struct {
	Database OdaDatabase `json:"database" yaml:"database"`
	Dirs     OdaDirs     `json:"dirs" yaml:"dirs"`
	Incus    OdaIncus    `json:"incus" yaml:"incus"`
	System   OdaSystem   `json:"system" yaml:"system"`
}

func LoadOdaConfig

func LoadOdaConfig() (*OdaConf, error)

func LoadOdaConfigUser

func LoadOdaConfigUser(user string) (*OdaConf, error)

func NewOdaConfig

func NewOdaConfig() *OdaConf

type OdaDatabase

type OdaDatabase struct {
	Host     string `json:"host" yaml:"host"`
	Port     int    `json:"port" yaml:"port"`
	Username string `json:"username" yaml:"username"`
	Password string `json:"password" yaml:"password"`
	Version  int    `json:"version" yaml:"version"`
	Image    string `json:"image" yaml:"image"`
}

type OdaDirs

type OdaDirs struct {
	Repo    string `json:"repo" yaml:"repo"`
	Project string `json:"project" yaml:"project"`
}

type OdaIncus

type OdaIncus struct {
	Socket      string `json:"socket" yaml:"socket"`
	Type        string `json:"type" yaml:"type"`
	URL         string `json:"url" yaml:"url"`
	LimitCPU    int    `json:"limit_cpu" yaml:"limit_cpu"`
	LimitMemory string `json:"limit_memory" yaml:"limit_memory"`
}

type OdaProject

type OdaProject struct {
	Version string `json:"version"`
}

func LoadProjectConfig

func LoadProjectConfig() (*OdaProject, error)

func (*OdaProject) WriteConfig

func (p *OdaProject) WriteConfig(configPath string) error

type OdaSystem

type OdaSystem struct {
	Domain string `json:"domain" yaml:"domain"`
	SSHKey string `json:"ssh_key" yaml:"ssh_key"`
}

type OdooConfig

type OdooConfig struct {
	AddonsPath        []string `yaml:"addons_path"`
	DataDir           string   `yaml:"data_dir"`
	AdminPasswd       string   `yaml:"admin_passwd"`
	WithoutDemo       string   `yaml:"without_demo"`
	CsvInternalSep    string   `yaml:"csv_internal_sep"`
	Reportgz          string   `yaml:"reportgz"`
	ServerWideModules string   `yaml:"server_wide_modules"`
	DbHost            string   `yaml:"db_host"`
	DbPort            string   `yaml:"db_port"`
	DbMaxconn         int      `yaml:"db_maxconn"`
	DbUser            string   `yaml:"db_user"`
	DbPassword        string   `yaml:"db_password"`
	DbName            string   `yaml:"db_name"`
	DbTemplate        string   `yaml:"db_template"`
	DbSslmode         string   `yaml:"db_sslmode"`
	ListDb            bool     `yaml:"list_db"`
	Proxy             bool     `yaml:"proxy"`
	ProxyMode         bool     `yaml:"proxy_mode"`
	Logfile           string   `yaml:"logfile"`
	LogLevel          string   `yaml:"log_level"`
	LogHandler        string   `yaml:"log_handler"`
	Workers           int      `yaml:"workers"`
}

func BuildOdooConfig

func BuildOdooConfig(kvals map[string]string) *OdooConfig

func LoadOdooConfig

func LoadOdooConfig(cwd string) (*OdooConfig, error)

func NewOdooConfig

func NewOdooConfig() *OdooConfig

func (*OdooConfig) Write

func (odoo *OdooConfig) Write(projectName, projectDir, edition string, embedFS embed.FS) error

Jump to

Keyboard shortcuts

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