cmd

package
v0.2.25 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtworkClientCommands added in v0.2.16

type ArtworkClientCommands struct {
	ArtworkCreate ArtworkCreateCmd `cmd:"" name:"artwork-upload" help:"Upload a new artwork." group:"ARTWORK"`
}

type ArtworkCreateCmd added in v0.2.16

type ArtworkCreateCmd struct {
	Path string `cmd:"" name:"path" help:"Path to the artwork file." arg:"" required:""`
}

func (*ArtworkCreateCmd) Run added in v0.2.16

func (cmd *ArtworkCreateCmd) Run(ctx server.Cmd) error

type GoogleClientCommands added in v0.2.20

type GoogleClientCommands struct {
	GoogleLogin GoogleLoginCmd `cmd:"" name:"google-login" help:"Login to the Google." group:"GOOGLE"`
}

type GoogleLoginCmd added in v0.2.20

type GoogleLoginCmd struct {
	ReadOnly     bool   `name:"read-only" help:"Request read-only access to Google Drive." negatable:""`
	ClientID     string `name:"client-id" help:"Google OAuth2 client ID." env:"GOOGLE_CLIENT_ID"`
	ClientSecret string `name:"client-secret" help:"Google OAuth2 client secret." env:"GOOGLE_CLIENT_SECRET"`
}

type LLMProviderClientCommands added in v0.2.10

type LLMProviderClientCommands struct {
	LLMProviderCreate LLMProviderCreateCmd `cmd:"" name:"llm-create" help:"Create or update an LLM provider." group:"LLM PROVIDER"`
}

type LLMProviderCreateCmd added in v0.2.10

type LLMProviderCreateCmd struct {
	schema.LLMProviderCreate
}

func (*LLMProviderCreateCmd) Run added in v0.2.10

func (cmd *LLMProviderCreateCmd) Run(ctx server.Cmd) error

type MetadataClientCommands added in v0.2.3

type MetadataClientCommands struct {
	Metadata MetadataCmd `cmd:"" name:"metadata" help:"Extract metadata for a file using the server endpoint." group:"METADATA"`
}

type MetadataCmd added in v0.2.3

type MetadataCmd struct {
	Path string `arg:"" name:"path" type:"file" help:"Path to the local file."`
}

func (*MetadataCmd) Run added in v0.2.3

func (cmd *MetadataCmd) Run(ctx server.Cmd) error

type ObjectClientCommands added in v0.2.0

type ObjectClientCommands struct {
	ObjectList ObjectListCmd `cmd:"" name:"objects" help:"List server objects." group:"OBJECT"`
	ObjectHead ObjectHeadCmd `cmd:"" name:"object" help:"Get object metadata by volume and path." group:"OBJECT"`
	ObjectPut  ObjectPutCmd  `cmd:"" name:"object-upload" help:"Upload an object to a volume." group:"OBJECT"`
	ObjectGet  ObjectGetCmd  `cmd:"" name:"object-download" help:"Download an object from a volume." group:"OBJECT"`
}

type ObjectGetCmd added in v0.2.20

type ObjectGetCmd struct {
	schema.ObjectKey
}

func (*ObjectGetCmd) Run added in v0.2.20

func (cmd *ObjectGetCmd) Run(ctx server.Cmd) error

type ObjectHeadCmd added in v0.2.25

type ObjectHeadCmd struct {
	schema.ObjectKey
}

func (*ObjectHeadCmd) Run added in v0.2.25

func (cmd *ObjectHeadCmd) Run(ctx server.Cmd) error

type ObjectListCmd added in v0.2.0

type ObjectListCmd struct {
	schema.ObjectListRequest
}

func (*ObjectListCmd) Run added in v0.2.0

func (cmd *ObjectListCmd) Run(ctx server.Cmd) error

type ObjectPutCmd added in v0.2.24

type ObjectPutCmd struct {
	schema.ObjectKey
}

func (*ObjectPutCmd) Run added in v0.2.24

func (cmd *ObjectPutCmd) Run(ctx server.Cmd) error

type RunServer added in v0.2.0

type RunServer struct {
	pgcmd.PostgresFlags
	servercmd.RunServer
	UIFlags

	// Other flags
	Indexer     bool     `long:"indexer" help:"Run this instance as an indexer of content" default:"false" negatable:""`
	Passphrases []string `name:"passphrase" env:"${ENV_NAME}_PASSPHRASES" help:"One or more passphrases used to encrypt credentials."`
}

func (*RunServer) Run added in v0.2.0

func (runner *RunServer) Run(ctx server.Cmd) error

func (*RunServer) WithManager added in v0.2.0

func (runner *RunServer) WithManager(ctx server.Cmd, conn pg.PoolConn, fn func(*manager.Filer) error) error

type SearchClientCommands added in v0.2.10

type SearchClientCommands struct {
	Search SearchCmd `cmd:"" name:"search" help:"Search server objects." group:"SEARCH"`
}

type SearchCmd added in v0.2.10

type SearchCmd struct {
	schema.SearchListRequest
}

func (*SearchCmd) Run added in v0.2.10

func (cmd *SearchCmd) Run(ctx server.Cmd) error

type ServerCommands

type ServerCommands struct {
	RunServer RunServer `cmd:"" name:"run" help:"Run the filer server." group:"SERVER"`
	servercmd.OpenAPICommands
}

type UIFlags added in v0.2.13

type UIFlags struct {
	UI bool `long:"ui" help:"Serve the web UI from this server" default:"true" negatable:""`
}

func (*UIFlags) MaybeRegisterUI added in v0.2.13

func (f *UIFlags) MaybeRegisterUI(ctx context.Context, log *slog.Logger, router *httprouter.Router) error

type VolumeClientCommands added in v0.2.0

type VolumeClientCommands struct {
	VolumeGet        VolumeGetCmd        `cmd:"" name:"volume" help:"Get a volume by name." group:"VOLUME"`
	VolumeList       VolumeListCmd       `cmd:"" name:"volumes" help:"List server volumes." group:"VOLUME"`
	VolumeCreateFile VolumeCreateFileCmd `cmd:"" name:"volume-create-file" help:"Create a new file-backed volume." group:"VOLUME"`
	VolumeCreateS3   VolumeCreateS3Cmd   `cmd:"" name:"volume-create-s3" help:"Create a new S3-backed volume." group:"VOLUME"`
	VolumeMount      VolumeMountCmd      `cmd:"" name:"volume-mount" help:"Mount a volume by name." group:"VOLUME"`
	VolumeUnmount    VolumeUnmountCmd    `cmd:"" name:"volume-unmount" help:"Unmount a volume by name." group:"VOLUME"`
	VolumeUpdate     VolumeUpdateCmd     `cmd:"" name:"volume-update" help:"Update a volume by name." group:"VOLUME"`
	VolumeDelete     VolumeDeleteCmd     `cmd:"" name:"volume-delete" help:"Delete a volume by name." group:"VOLUME"`
	VolumeReindex    VolumeReindexCmd    `cmd:"" name:"volume-reindex" help:"Reindex a volume by name." group:"VOLUME"`
}

type VolumeCreateFileCmd added in v0.2.14

type VolumeCreateFileCmd struct {
	Name string `arg:"" name:"name" help:"Volume name."`
	Path string `arg:"" name:"path" type:"file" help:"Path to filesystem."`
}

func (*VolumeCreateFileCmd) Run added in v0.2.14

func (cmd *VolumeCreateFileCmd) Run(ctx server.Cmd) error

type VolumeCreateS3Cmd added in v0.2.20

type VolumeCreateS3Cmd struct {
	URL          *url.URL `arg:"" name:"url" type:"url" help:"S3 URL (s3://bucket-name/prefix)."`
	Endpoint     *url.URL `name:"endpoint" type:"url" help:"Custom S3 endpoint URL."`
	Region       string   `name:"region" help:"AWS region. Defaults to us-east-1 for custom endpoints."`
	Anonymous    bool     `name:"anonymous" help:"Use anonymous credentials for S3." negatable:""`
	AccessKey    string   `name:"access-key" help:"AWS access credential."`
	SecretKey    string   `name:"secret-key" help:"AWS secret credential."`
	SessionToken string   `name:"session-token" help:"AWS session token credential."`
}

func (*VolumeCreateS3Cmd) Run added in v0.2.20

func (cmd *VolumeCreateS3Cmd) Run(ctx server.Cmd) error

type VolumeDeleteCmd added in v0.2.14

type VolumeDeleteCmd struct {
	VolumeGetCmd
}

func (*VolumeDeleteCmd) Run added in v0.2.14

func (cmd *VolumeDeleteCmd) Run(ctx server.Cmd) error

type VolumeGetCmd added in v0.2.14

type VolumeGetCmd struct {
	Name string `arg:"" name:"name" help:"Volume name."`
}

func (*VolumeGetCmd) Run added in v0.2.14

func (cmd *VolumeGetCmd) Run(ctx server.Cmd) error

type VolumeListCmd added in v0.2.7

type VolumeListCmd struct {
	schema.VolumeListRequest
}

func (*VolumeListCmd) Run added in v0.2.7

func (cmd *VolumeListCmd) Run(ctx server.Cmd) error

type VolumeMountCmd added in v0.2.14

type VolumeMountCmd struct {
	VolumeGetCmd
}

func (*VolumeMountCmd) Run added in v0.2.14

func (cmd *VolumeMountCmd) Run(ctx server.Cmd) error

type VolumeReindexCmd added in v0.2.16

type VolumeReindexCmd struct {
	VolumeGetCmd
	schema.ObjectListFilters
	Force bool `json:"force" short:"f" help:"Force reindexing of all objects, even if they are already indexed"`
}

func (*VolumeReindexCmd) Run added in v0.2.16

func (cmd *VolumeReindexCmd) Run(ctx server.Cmd) error

type VolumeUnmountCmd added in v0.2.14

type VolumeUnmountCmd struct {
	VolumeGetCmd
}

func (*VolumeUnmountCmd) Run added in v0.2.14

func (cmd *VolumeUnmountCmd) Run(ctx server.Cmd) error

type VolumeUpdateCmd added in v0.2.14

type VolumeUpdateCmd struct {
	VolumeGetCmd
	schema.VolumeMeta
}

func (*VolumeUpdateCmd) Run added in v0.2.14

func (cmd *VolumeUpdateCmd) Run(ctx server.Cmd) error

Jump to

Keyboard shortcuts

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