cmd

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: Apache-2.0 Imports: 70 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cli struct {
	Version kong.VersionFlag `help:"Print version information and quit"`

	Config         string        `help:"Config file path" env:"FIVENET_CONFIG_FILE"`
	StartTimeout   time.Duration `help:"App start timeout duration" default:"180s" env:"FIVENET_START_TIMEOUT"`
	SkipMigrations *bool         `help:"Disable the automatic DB migrations on startup." env:"FIVENET_SKIP_DB_MIGRATIONS"`

	Server  ServerCmd  `cmd:"" help:"Run FiveNet server."`
	Worker  WorkerCmd  `cmd:"" help:"Run FiveNet worker."`
	Discord DiscordCmd `cmd:"" help:"Run FiveNet Discord bot."`
	DBSync  DBSyncCmd  `cmd:"" name:"dbsync" help:"Run FiveNet database sync."`
	Tools   ToolsCmd   `cmd:"" help:"Run FiveNet tools/helpers."`
}

Functions

This section is empty.

Types

type Context

type Context struct{}

type DBCmd

type DBCmd struct {
	Version VersionCmd `cmd:"" help:"Display db migration version info"`
	Up      UpCmd      `cmd:"" help:"Run any outstanding migrations"`
}

type DBSyncCmd

type DBSyncCmd struct{}

func (*DBSyncCmd) Run

func (c *DBSyncCmd) Run(ctx *Context) error

type DiscordCmd

type DiscordCmd struct {
	ModuleCronAgent bool `help:"Run the cron agent." default:"false"`
}

func (*DiscordCmd) Run

func (c *DiscordCmd) Run(ctx *Context) error

type ServerCmd

type ServerCmd struct {
	ModuleCronAgent bool `help:"Run the cron agent, should only be used for single container/binary deployments." default:"false"`
}

func (*ServerCmd) Run

func (c *ServerCmd) Run(ctx *Context) error

type ToolsCmd

type ToolsCmd struct {
	DB DBCmd `cmd:""`

	UserActivityMigrate UserActivityMigrateCmd `cmd:""`
}

type UpCmd

type UpCmd struct{}

func (*UpCmd) Run

func (c *UpCmd) Run(ctx *kong.Context) error

type UserActivityMigrateCmd

type UserActivityMigrateCmd struct {
	Limit int64 `default:"250" help:"Limit to set on the select query."`
}

func (*UserActivityMigrateCmd) Run

type VersionCmd

type VersionCmd struct{}

func (*VersionCmd) Run

func (c *VersionCmd) Run(ctx *kong.Context) error

type WorkerCmd

type WorkerCmd struct {
	ModuleCentrumBot         bool `help:"Start Centrum bot module" default:"true"`
	ModuleCentrumHousekeeper bool `help:"Start Centrum Housekeeper module" default:"true"`
	ModuleUserTracker        bool `help:"Start User tracker module" default:"true"`
	ModuleJobsTimeclock      bool `help:"Start Jobs timeclock housekeeper module" default:"true"`
	ModuleDocsWorkflow       bool `help:"Start Docstore Workflow module" default:"true"`
	ModuleHousekeeper        bool `help:"Start Housekeepr module" default:"true"`
}

func (*WorkerCmd) Run

func (c *WorkerCmd) Run(ctx *Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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