internal

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreYouSure added in v0.5.0

func AreYouSure(prompt string) bool

func Copy added in v0.5.0

func Copy(srcFile, dstFile string) error

func CopyDirectory added in v0.5.0

func CopyDirectory(scrDir, dest string) error
func CopySymLink(source, dest string) error

func CreateIfNotExists added in v0.5.0

func CreateIfNotExists(dir string, perm os.FileMode) error

func Exists added in v0.5.0

func Exists(filePath string) bool

func ExistsIn added in v0.5.3

func ExistsIn[T comparable](sliceList []T, value T) bool

existsIn searches list for value

func GetFQDN added in v0.5.4

func GetFQDN() (fqdn, hostname, domain string)

func GetOSVersion added in v0.5.0

func GetOSVersion() string

func GetOSVersionName added in v0.5.4

func GetOSVersionName() (osName string, osVersionID string, osVersionCodename string)

func GetOdooBackups

func GetOdooBackups(project string) (backups, addons []string)

func GetOdooBranchVersion added in v0.5.4

func GetOdooBranchVersion(path string) (branch string, version string)

func IsBool added in v0.5.0

func IsBool(s string) bool

func IsInt added in v0.5.0

func IsInt(s string) bool

func IsNumeric added in v0.5.0

func IsNumeric(s string) bool

func ReadConfValue added in v0.5.3

func ReadConfValue(conffile, key, def string) string

func RemoveContents

func RemoveContents(dir string) error

func RemoveDuplicate added in v0.5.3

func RemoveDuplicate[T comparable](sliceList []T) []T

removeDuplicate Remove Duplicate Values from Slice

func SelectOnly added in v0.5.3

func SelectOnly(sliceList []string, value string) []string

Types

type Database

type Database struct {
	Hostname string `json:"hostname,omitempty"`
	Port     int    `json:"port,omitempty"`
	Database string `json:"database,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
	URI      string `json:"uri,omitempty"`
	*sqlx.DB
}

Database struct contains sql pointer

func OpenDatabase

func OpenDatabase(db Database) (*Database, error)

OpenDatabase open database

func (*Database) ActivateModuleUpdateNotificationCron

func (db *Database) ActivateModuleUpdateNotificationCron() error

func (*Database) ActivateNeutralizationWatermarks

func (db *Database) ActivateNeutralizationWatermarks() error

func (*Database) ChangeDBUUID

func (db *Database) ChangeDBUUID() error

func (*Database) DeactivateCrons

func (db *Database) DeactivateCrons() error

func (*Database) DeactivateMailServers

func (db *Database) DeactivateMailServers() error

func (*Database) DeleteOCNProjectUUID

func (db *Database) DeleteOCNProjectUUID() error

func (*Database) DeleteWebsiteDomains

func (db *Database) DeleteWebsiteDomains() error

func (*Database) DisableBankSync

func (db *Database) DisableBankSync() error

func (*Database) DisableCDN

func (db *Database) DisableCDN() error

func (*Database) DisableDeliveryCarriers

func (db *Database) DisableDeliveryCarriers() error

func (*Database) DisableFetchmail

func (db *Database) DisableFetchmail() error

func (*Database) DisableIAPAccount

func (db *Database) DisableIAPAccount() error

func (*Database) DisableMailTemplate

func (db *Database) DisableMailTemplate() error

func (*Database) DisablePaymentGeneric

func (db *Database) DisablePaymentGeneric() error

func (*Database) DisableProdDeliveryCarriers

func (db *Database) DisableProdDeliveryCarriers() error

func (*Database) GetURI

func (db *Database) GetURI()

GenURI generate db uri string

func (*Database) RemoveEnterpriseCode

func (db *Database) RemoveEnterpriseCode() error

func (*Database) RemoveFacebookTokens

func (db *Database) RemoveFacebookTokens() error

func (*Database) RemoveIRLogging

func (db *Database) RemoveIRLogging() error

func (*Database) RemoveInstagramTokens

func (db *Database) RemoveInstagramTokens() error

func (*Database) RemoveLinkedInTokens

func (db *Database) RemoveLinkedInTokens() error

func (*Database) RemoveMapBoxToken

func (db *Database) RemoveMapBoxToken() error

func (*Database) RemoveTwitterTokens

func (db *Database) RemoveTwitterTokens() error

func (*Database) RemoveYoutubeTokens

func (db *Database) RemoveYoutubeTokens() error

func (*Database) UnsetFirebase

func (db *Database) UnsetFirebase() error

func (*Database) UpdateDatabaseExpirationDate

func (db *Database) UpdateDatabaseExpirationDate() error

type ODA added in v0.5.3

type ODA struct {
	Name         string
	Usage        string
	Version      string
	EmbedFS      embed.FS
	Q            QueryDef
	OdooRepos    []string
	OdooVersions []string
	OdooDatabase OdooDatabase
	OdooConfigs  []OdooConfig
	OdooConf     OdooConf
}

func NewODA added in v0.5.3

func NewODA(name, usage, version string, embedFS embed.FS) *ODA

func (*ODA) AdminPassword added in v0.5.3

func (o *ODA) AdminPassword() error

func (*ODA) AdminUsername added in v0.5.3

func (o *ODA) AdminUsername() error

func (*ODA) Backup added in v0.5.3

func (o *ODA) Backup() error

func (*ODA) BaseCreate added in v0.5.3

func (o *ODA) BaseCreate(version, localDomain string) error

func (*ODA) CaddyfileUpdate added in v0.5.3

func (o *ODA) CaddyfileUpdate(domain string) error

func (*ODA) ConfigInit added in v0.5.3

func (o *ODA) ConfigInit(localDomain string) error

func (*ODA) GetOdooConf added in v0.5.3

func (o *ODA) GetOdooConf() *ODA

func (*ODA) GetOdooConfig added in v0.5.3

func (o *ODA) GetOdooConfig(version string) OdooConfig

func (*ODA) HostsUpdate added in v0.5.3

func (o *ODA) HostsUpdate(domain string) error

func (*ODA) InstanceAppInstallUpgrade added in v0.5.3

func (o *ODA) InstanceAppInstallUpgrade(install bool, modules ...string) error

func (*ODA) Logs added in v0.5.3

func (o *ODA) Logs() error

func (*ODA) OdooRestart added in v0.5.3

func (o *ODA) OdooRestart() error

func (*ODA) OdooStart added in v0.5.3

func (o *ODA) OdooStart() error

func (*ODA) OdooStop added in v0.5.3

func (o *ODA) OdooStop() error

func (*ODA) PGCatUpdate added in v0.5.5

func (o *ODA) PGCatUpdate() error

func (*ODA) PSQL added in v0.5.3

func (o *ODA) PSQL() error

func (*ODA) Query added in v0.5.3

func (o *ODA) Query() error

func (*ODA) RepoUpdate added in v0.5.3

func (o *ODA) RepoUpdate() error

func (*ODA) Restore added in v0.5.3

func (o *ODA) Restore(any, move, full bool) error

func (*ODA) Scaffold added in v0.5.3

func (o *ODA) Scaffold(module string) error

func (*ODA) Trim added in v0.5.3

func (o *ODA) Trim(limit int, all bool) error

Trim database backups

func (*ODA) UpdateUser added in v0.5.3

func (o *ODA) UpdateUser() error

func (*ODA) Welcome added in v0.5.3

func (o *ODA) Welcome() error

type OdooConf added in v0.5.3

type OdooConf struct {
	DbHost     string
	DbPort     string
	DbName     string
	DbUser     string
	DbPassword string
	DbTemplate string
	AddonsPath string
	DataDir    string
}

type OdooConfig added in v0.5.0

type OdooConfig 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"`
}

type OdooDB

type OdooDB struct {
	Hostname string `json:"hostname,omitempty"`
	Port     string `json:"port,omitempty"`
	Database string `json:"database,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
	Template string `json:"template,omitempty"`
}

func (*OdooDB) CreateDatabase

func (o *OdooDB) CreateDatabase() error

func (*OdooDB) DropDatabase

func (o *OdooDB) DropDatabase() error

func (*OdooDB) RestoreDatabase

func (o *OdooDB) RestoreDatabase(source string) error

type OdooDatabase added in v0.5.0

type OdooDatabase struct {
	Name    string
	Version string
	Image   string
}

type QueryDef added in v0.5.0

type QueryDef struct {
	Model    string
	Filter   string
	Offset   int
	Limit    int
	Fields   string
	Count    bool
	Username string
	Password string
}

Jump to

Keyboard shortcuts

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