internal

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: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneUrlDir

func CloneUrlDir(url, baseDir, cloneDir, username, token string) error

func Copy

func Copy(srcFile, dstFile string) error

func CopyDirectory

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

func CreateIfNotExists

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

func Exists

func Exists(filePath string) bool

func GetCurrentOdooProjects

func GetCurrentOdooProjects() []string

GetCurrentOdooProjects Get Current Odoo Projects

func GetCurrentOdooProjectsUser added in v0.6.0

func GetCurrentOdooProjectsUser(username string) []string

GetCurrentOdooProjects Get Current Odoo Projects

func GetCurrentOdooRepos

func GetCurrentOdooRepos() []string

GetCurrentOdooRepos Get Currently Copied Odoo Repos

func GetGitHubUsernameToken

func GetGitHubUsernameToken() (username, token string)

func GetOdooBackups

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

GetCurrentOdooProjects Get Current Odoo Projects

func IsBool

func IsBool(s string) bool

func IsInt

func IsInt(s string) bool

func IsNumeric

func IsNumeric(s string) bool

func IsProject

func IsProject() bool

func RemoveContents

func RemoveContents(dir string) error

func RepoHeadShortCode

func RepoHeadShortCode(repo string) (string, error)

func RepoShortCodes

func RepoShortCodes(repo string) ([]string, error)

func SSHConfigGenerate

func SSHConfigGenerate(project string) error

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) GetURI

func (db *Database) GetURI()

GenURI generate db uri string

type ODA added in v0.6.0

type ODA struct {
	Name    string
	Usage   string
	Version string
	EmbedFS embed.FS
	Q       QueryDef
}

func NewODA added in v0.6.0

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

func (*ODA) Backup added in v0.6.0

func (o *ODA) Backup() error

func (*ODA) BaseCreate added in v0.6.0

func (o *ODA) BaseCreate() error

func (*ODA) BaseCreateScript added in v0.6.0

func (o *ODA) BaseCreateScript(version string) error

base odoo image

func (*ODA) BaseDestroy added in v0.6.0

func (o *ODA) BaseDestroy() error

func (*ODA) BaseUpdate added in v0.6.0

func (o *ODA) BaseUpdate() error

func (*ODA) ConfigInit added in v0.6.0

func (o *ODA) ConfigInit() error

func (*ODA) ConfigPyright added in v0.6.0

func (o *ODA) ConfigPyright() error

func (*ODA) ConfigVSCode added in v0.6.0

func (o *ODA) ConfigVSCode() error

func (*ODA) DBCreateScript added in v0.6.0

func (o *ODA) DBCreateScript(version string) error

func (*ODA) DBEXEC added in v0.6.0

func (o *ODA) DBEXEC() error

func (*ODA) DBFullReset added in v0.6.0

func (o *ODA) DBFullReset() error

func (*ODA) DBLogs added in v0.6.0

func (o *ODA) DBLogs() error

func (*ODA) DBPSQL added in v0.6.0

func (o *ODA) DBPSQL() error

func (*ODA) DBRestart added in v0.6.0

func (o *ODA) DBRestart() error

func (*ODA) DBStart added in v0.6.0

func (o *ODA) DBStart() error

func (*ODA) DBStop added in v0.6.0

func (o *ODA) DBStop() error

func (*ODA) HostsUpdate added in v0.6.0

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

func (*ODA) InstanceAppInstallUpgrade added in v0.6.0

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

func (*ODA) OdooBase added in v0.6.0

func (o *ODA) OdooBase() error

func (*ODA) OdooCreate added in v0.6.0

func (o *ODA) OdooCreate() error

func (*ODA) OdooDestroy added in v0.6.0

func (o *ODA) OdooDestroy() error

OdooDestroy full instance destroy stop instance remove instance

func (*ODA) OdooExec added in v0.6.0

func (o *ODA) OdooExec(username string) error

OdooExec execCmd.Flags().StringVarP(&username, "username", "u", "odoo", "username") calls into "incus exec <project> -t -- /bin/bash"

func (*ODA) OdooLogs added in v0.6.0

func (o *ODA) OdooLogs() error

OdooLogs calls into "odas logs" calls into "incus exec <project> -t -- journalctl -f"

func (*ODA) OdooPS added in v0.6.0

func (o *ODA) OdooPS() error

func (*ODA) OdooPSQL added in v0.6.0

func (o *ODA) OdooPSQL() error

OdooPSQL calls into "incus exec <project> -t -- pgsql"

func (*ODA) OdooRestart added in v0.6.0

func (o *ODA) OdooRestart() error

OdooRestart full instance restart incus restart <project>

func (*ODA) OdooStart added in v0.6.0

func (o *ODA) OdooStart() error

OdooStart full instance start incus start <project>

func (*ODA) OdooStop added in v0.6.0

func (o *ODA) OdooStop() error

OdooStop full instance stop incus stop <project>

func (*ODA) PSQL added in v0.6.0

func (o *ODA) PSQL() error

func (*ODA) ProjectInit added in v0.6.0

func (o *ODA) ProjectInit() error

ProjectInit build project directory based on prompts

func (*ODA) ProjectReset added in v0.6.0

func (o *ODA) ProjectReset() error

#################################### ProjectReset reset project data directory and db stop instance drop instance db remove instance data directory contents

func (*ODA) Query added in v0.6.0

func (o *ODA) Query() error

func (*ODA) RepoBaseClone added in v0.6.0

func (o *ODA) RepoBaseClone() error

RepoBaseClone setup odoo,enterprise,design-themes,industry source repositories in repos/odoo directory

func (*ODA) RepoBaseUpdate added in v0.6.0

func (o *ODA) RepoBaseUpdate() error

RepoBaseUpdate update odoo,enterprise,design-themes,industry source repositories in repos/odoo directory

func (*ODA) RepoBranchClone added in v0.6.0

func (o *ODA) RepoBranchClone() error

RepoBranchClone setup odoo,enterprise,design-themes,industry branch repositories in repos/odoo directory repos/odoo/<branch> ex 17.0 > 17.0 repos/odoo/<branch> ex 17.2 > saas-17.2 mkdir -p repos/odoo/<branch> copy repos/odoo/{odoo,enterprise,design-themes,industry} to repos/odoo/<branch>/{odoo,enterprise,design-themes,industry} go to each directory and git checkout <branch>

func (*ODA) RepoBranchUpdate added in v0.6.0

func (o *ODA) RepoBranchUpdate() error

RepoBranchUpdate update odoo,enterprise,design-themes,industry source repositories in repos/odoo/<branch> directory

func (*ODA) Restore added in v0.6.0

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

func (*ODA) Scaffold added in v0.6.0

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

func (*ODA) UpdateUser added in v0.6.0

func (o *ODA) UpdateUser() error

func (*ODA) Welcome added in v0.6.0

func (o *ODA) Welcome() error

type QueryDef

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