Help us shape the future of Go! Take the 2026 Go Developer Survey

cli

package
v0.251.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddFeedCmd added in v0.222.4

type AddFeedCmd struct {
	FeedArgs `embed:""`

	URL         string                 `help:"URL of feed"             required:"" validate:"required,url"`
	FetchMethod models.FeedFetchMethod `` /* 150-byte string literal not displayed */
}

AddFeedCmd is a command that will add a custom feed with the given options.

func (*AddFeedCmd) Run added in v0.222.4

func (c *AddFeedCmd) Run() error

type BlockUserCmd added in v0.27.0

type BlockUserCmd struct {
	UserArgs

	Value bool `help:"Block status."`
}

func (*BlockUserCmd) Run added in v0.27.0

func (c *BlockUserCmd) Run() error

type ClassifyFeedCmd added in v0.230.0

type ClassifyFeedCmd struct {
	AllUnclassified bool          `help:"classify all unclassified feeds" validate:"omitempty"`
	FeedID          models.FeedID `help:"ID of feed"                      validate:"omitempty,required_without=AllUnclassified,startswith=feed_"`
}

ClassifyFeedCmd is a command that will classify a feed.

func (*ClassifyFeedCmd) Run added in v0.230.0

func (c *ClassifyFeedCmd) Run() error

type ClearSchedulerCmd added in v0.24.0

type ClearSchedulerCmd struct{}

ClearSchedulerCmd is a cli command for clearing the scheduled jobs queue.

func (*ClearSchedulerCmd) Run added in v0.24.0

func (c *ClearSchedulerCmd) Run() error

type CreateIndexCmd added in v0.87.0

type CreateIndexCmd struct {
	schema.IndicesOptions
}

func (*CreateIndexCmd) Run added in v0.87.0

func (r *CreateIndexCmd) Run(opts *CreateIndexCmd) error

type DeleteJobSchedulerCmd added in v0.102.0

type DeleteJobSchedulerCmd struct {
	ID    string `arg:"" help:"The job ID."`
	Group string `arg:"" help:"The job group (optional)." optional:""`
}

DeleteJobSchedulerCmd is a cli command for deleting a scheduled job.

func (*DeleteJobSchedulerCmd) Run added in v0.102.0

func (c *DeleteJobSchedulerCmd) Run() error

Run runs the delete-job scheduler command.

type DeleteUserCmd added in v0.27.0

type DeleteUserCmd struct {
	UserArgs
}

func (*DeleteUserCmd) Run added in v0.27.0

func (c *DeleteUserCmd) Run() error

type DirectFetchArgs added in v0.222.4

type DirectFetchArgs struct {
	models.FetchDirectOptions
}

type EditFeedCmd added in v0.245.0

type EditFeedCmd struct {
	FeedArgs `embed:""`

	FeedID models.FeedID `help:"ID of feed" required:"" validate:"required,startswith=feed_"`
}

EditFeedCmd performs updates on a feed.

func (*EditFeedCmd) Run added in v0.245.0

func (c *EditFeedCmd) Run() error

Run performs the operations for resetting feed updates.

type ElasticCmd added in v0.87.0

type ElasticCmd struct {
	Indices IndicesCmd `cmd:"" help:"Perform operations on indices."`
	ILM     ILMCmd     `cmd:"" help:"Perform ILM operations."`
}

ElasticCmd contains commands for manipulating Elasticsearch.

type FeedArgs added in v0.71.0

type FeedArgs struct {
	DirectFetchArgs `embed:""`
	ZyteFetchArgs   `embed:""`

	Name           *string `help:"Optional name of the feed"                   optional:""`
	Description    *string `help:"Optional description of the feed"            optional:""`
	Categories     *string `help:"Optional comma-separated list of categories" optional:""`
	UpdateInterval *string `help:"update interval for feed"                    optional:""`
}

type FeedCmd added in v0.71.0

type FeedCmd struct {
	Fetch        FetchFeedCmd        `cmd:"" help:"fetch a feed (by either URL or ID)"`
	ResetUpdates ResetFeedUpdatesCmd `cmd:"" help:"reset the feed updates job"`
	Edit         EditFeedCmd         `cmd:"" help:"edit the feed"`
	Add          AddFeedCmd          `cmd:"" help:"add a feed"`
	Classify     ClassifyFeedCmd     `cmd:"" help:"classify a feed"`
}

FeedCmd contains subcommands for interacting with feeds.

type FetchFeedCmd added in v0.71.0

type FetchFeedCmd struct {
	FeedID       *models.FeedID `help:"ID of feed"                        validate:"omitempty,required_without=FeedURL,startswith=feed_"`
	FeedURL      *string        `help:"URL of feed"                       validate:"omitempty,required_without=FeedID,omitempty,url"`
	ApplyUpdates bool           `help:"Whether to write updates to store" validate:"omitempty"`
	Validate     bool           `help:"validate the feed"                                                                                default:"false"`
}

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

Run performs the operations for fetching feed details.

type ILMCmd added in v0.87.0

type ILMCmd struct {
	Update UpdateILMPoliciesCmd `cmd:"update" help:"Update ILM policies."`
}

type IndicesCmd added in v0.87.0

type IndicesCmd struct {
	Update  UpdateIndexSchemaCmd `cmd:"" help:"Update schema(s)"`
	Migrate MigrateIndexCmd      `cmd:"" help:"Migrate data"`
	Create  CreateIndexCmd       `cmd:"" help:"Create indices"`
}

IndicesCmd contains commands for manipulating Elasticsearch indices.

type InitSchedulerCmd added in v0.24.0

type InitSchedulerCmd struct{}

InitSchedulerCmd is a cli command to init the scheduler backend (for a new installation), without starting the scheduler.

func (*InitSchedulerCmd) Run added in v0.24.0

func (c *InitSchedulerCmd) Run() error

type ListJobsSchedulerCmd added in v0.102.0

type ListJobsSchedulerCmd struct{}

ListJobsSchedulerCmd is a cli command for listing all scheduled jobs.

func (*ListJobsSchedulerCmd) Run added in v0.102.0

func (c *ListJobsSchedulerCmd) Run() error

type ListUserCmd added in v0.165.0

type ListUserCmd struct {
	UserID models.UserID `arg:"" help:"ID of user" optional:""`
}

func (*ListUserCmd) Run added in v0.165.0

func (c *ListUserCmd) Run() error

type MigrateIndexCmd added in v0.87.0

type MigrateIndexCmd struct {
	schema.IndicesOptions
}

func (*MigrateIndexCmd) Run added in v0.87.0

func (r *MigrateIndexCmd) Run(opts *MigrateIndexCmd) error

type ResetFeedUpdatesCmd added in v0.102.0

type ResetFeedUpdatesCmd struct {
	FeedID models.FeedID `help:"ID of feed" validate:"required,startswith=feed_"`
}

ResetFeedUpdatesCmd is a CLI command to reset the updates for a feed. It will reset the last_fetched timestamp on the feed and delete any scheduled job for feed updates.

func (*ResetFeedUpdatesCmd) Run added in v0.102.0

func (c *ResetFeedUpdatesCmd) Run() error

Run performs the operations for resetting feed updates.

type RunSchedulerCmd

type RunSchedulerCmd struct{}

RunSchedulerCmd is a cli command for running the scheduler component.

func (*RunSchedulerCmd) Run

func (c *RunSchedulerCmd) Run() error

type SchedulerCmd

type SchedulerCmd struct {
	Run       RunSchedulerCmd       `cmd:"" help:"Run scheduler."`
	Clear     ClearSchedulerCmd     `cmd:"" help:"Clear all jobs."`
	Init      InitSchedulerCmd      `cmd:"" help:"Initialise the scheduler/queue."`
	ListJobs  ListJobsSchedulerCmd  `cmd:"" help:"List all jobs."`
	DeleteJob DeleteJobSchedulerCmd `cmd:"" help:"Job related commands."`
}

SchedulerCmd defines the `scheduler` command, for performing job scheduler related actions.

type ServeCmd

type ServeCmd struct{}

ServeCmd defines the `server` command for running the server.

func (*ServeCmd) Run

func (r *ServeCmd) Run() error

Run performs setup and execution for the server command.

type UpdateILMPoliciesCmd added in v0.87.0

type UpdateILMPoliciesCmd struct {
	schema.ILMOptions
}

func (*UpdateILMPoliciesCmd) Run added in v0.87.0

type UpdateIndexSchemaCmd added in v0.87.0

type UpdateIndexSchemaCmd struct {
	schema.IndicesOptions
}

func (*UpdateIndexSchemaCmd) Run added in v0.87.0

type UserArgs added in v0.92.0

type UserArgs struct {
	UserID models.UserID `arg:"" help:"ID of user"`
}

type UserCmd added in v0.27.0

type UserCmd struct {
	Delete DeleteUserCmd `cmd:"" help:"Delete user"`
	Block  BlockUserCmd  `cmd:"" help:"Block user"`
	List   ListUserCmd   `cmd:"" help:"List user details"`
}

UserCmd contains sub commands for managing users.

type ZyteFetchArgs added in v0.222.4

type ZyteFetchArgs struct {
	models.FetchZyteOptions `embed:""`
}

Jump to

Keyboard shortcuts

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