Documentation
¶
Overview ¶
Package cli contains functionality for the command-line interface of the service. It provides commands for starting both the server and scheduler services.
Index ¶
- type Args
- type Arguments
- type BlockUserCmd
- type ClearSchedulerCmd
- type DataCmd
- type DeleteCmd
- type DeleteUserCmd
- type FeedArgs
- type FeedCmd
- type FetchFeedCmd
- type InitSchedulerCmd
- type ListSchedulerCmd
- type MigrateCmd
- type Option
- type ReverseProxyCmd
- type RunReverseProxyCmd
- type RunSchedulerCmd
- type SchedulerCmd
- type SchemaCmd
- type ServeCmd
- type UpdateCmd
- type UserCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
type Arguments struct {
// Logger is a logger that the command can use.
Logger *slog.Logger
// StaticContent is an embedded filesystem containing static files.
StaticContent embed.FS
// Environment is the running environment for the application.
Environment string
}
Arguments are the common options for commands.
func AddArguments ¶
AddArguments generates command-line arguments from the given options.
type BlockUserCmd ¶ added in v0.27.0
func (*BlockUserCmd) Run ¶ added in v0.27.0
func (c *BlockUserCmd) Run() error
type ClearSchedulerCmd ¶ added in v0.24.0
type ClearSchedulerCmd struct{}
func (*ClearSchedulerCmd) Run ¶ added in v0.24.0
func (c *ClearSchedulerCmd) Run(opts *Arguments) error
Run runs the clear command that will remove all scheduled jobs.
type DataCmd ¶
type DataCmd struct {
Delete DeleteCmd `cmd:"delete" help:"Delete objects"`
}
DataCmd defines the `data` command, which contains commands for manipulating data.
type DeleteUserCmd ¶ added in v0.27.0
type DeleteUserCmd struct {
Args
}
func (*DeleteUserCmd) Run ¶ added in v0.27.0
func (c *DeleteUserCmd) Run() error
type FeedCmd ¶ added in v0.71.0
type FeedCmd struct {
Fetch FetchFeedCmd `cmd:"fetch" help:"fetch a feed (by either URL or ID)"`
}
FeedCmd contains sub commands for interacting with feeds.
type FetchFeedCmd ¶ added in v0.71.0
FetchFeedCmd is a command that will fetch a feed, by either URL or its Feed ID.
func (*FetchFeedCmd) Run ¶ added in v0.71.0
func (c *FetchFeedCmd) Run() error
type InitSchedulerCmd ¶ added in v0.24.0
type InitSchedulerCmd struct{}
func (*InitSchedulerCmd) Run ¶ added in v0.24.0
func (c *InitSchedulerCmd) Run(opts *Arguments) error
Run runs the clear command that will remove all scheduled jobs.
type ListSchedulerCmd ¶ added in v0.59.0
type ListSchedulerCmd struct{}
func (*ListSchedulerCmd) Run ¶ added in v0.59.0
func (c *ListSchedulerCmd) Run(opts *Arguments) error
Run runs the clear command that will remove all scheduled jobs.
type MigrateCmd ¶
func (*MigrateCmd) Run ¶
func (r *MigrateCmd) Run(opts *MigrateCmd) error
type Option ¶
Option is a functional option for the command-line.
func WithEnvironment ¶
WithEnvironment option sets the environment for the command.
func WithLogger ¶
WithLogger defines a logger for a command.
type ReverseProxyCmd ¶ added in v0.57.0
type ReverseProxyCmd struct {
Run RunReverseProxyCmd `cmd:"run" help:"Run reverse proxy."`
}
ReverseProxyCmd defines the `reverseproxy` command, for running the reverse proxy.
type RunReverseProxyCmd ¶ added in v0.57.0
type RunReverseProxyCmd struct{}
func (*RunReverseProxyCmd) Run ¶ added in v0.57.0
func (c *RunReverseProxyCmd) Run(opts *Arguments) error
Run contains logic for setup and execution of the reverse proxy.
type RunSchedulerCmd ¶
type RunSchedulerCmd struct{}
func (*RunSchedulerCmd) Run ¶
func (c *RunSchedulerCmd) Run(opts *Arguments) error
Run contains logic for setup and execution of the scheduler.
type SchedulerCmd ¶
type SchedulerCmd struct {
Run RunSchedulerCmd `cmd:"run" help:"Run scheduler."`
Clear ClearSchedulerCmd `cmd:"clear" help:"Clear all jobs."`
Init InitSchedulerCmd `cmd:"init" help:"Initialise the scheduler/queue."`
List ListSchedulerCmd `cmd:"list" help:"List all jobs."`
}
SchedulerCmd defines the `scheduler` command, for running the job scheduler.
type SchemaCmd ¶
type SchemaCmd struct {
Update UpdateCmd `cmd:"update" help:"Update schema(s)"`
Migrate MigrateCmd `cmd:"migrate" help:"Migrate schema(s)"`
}
type ServeCmd ¶
type ServeCmd struct{}
ServeCmd defines the `server` command for running the server.
type UserCmd ¶ added in v0.27.0
type UserCmd struct {
Delete DeleteUserCmd `cmd:"delete" help:"Delete user"`
Block BlockUserCmd `cmd:"delete" help:"Block user"`
}
UserCmd contains sub commands for managing users.