Documentation
¶
Index ¶
- type ActionCallCmd
- type ActionCommands
- type ActionListCmd
- type ClientCommands
- type Flags
- type ObjectCommands
- type ObjectDeleteCmd
- type ObjectGetCmd
- type ObjectHeadCmd
- type ObjectListCmd
- type ObjectPutCmd
- type ObjectUploadCmd
- type SearchCmd
- type SearchCommands
- type SignInFlags
- type VolumeBackendsCmd
- type VolumeCommands
- type VolumeCreateCmd
- type VolumeCreateFSCmd
- type VolumeCreateGCalendarCmd
- type VolumeCreateGContactsCmd
- type VolumeCreateGDriveCmd
- type VolumeCreateGTasksCmd
- type VolumeCreateRSSCmd
- type VolumeCreateS3Cmd
- type VolumeCreateWebcalCmd
- type VolumeDeleteCmd
- type VolumeGetCmd
- type VolumeListCmd
- type VolumeMountCmd
- type VolumeUnmountCmd
- type VolumeUpdateCmd
- type VolumeWatchCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionCallCmd ¶
type ActionCommands ¶
type ActionCommands struct {
ActionList ActionListCmd `` /* 163-byte string literal not displayed */
ActionCall ActionCallCmd `` /* 138-byte string literal not displayed */
}
type ActionListCmd ¶
type ActionListCmd struct {
Name string `arg:"" name:"name" optional:"" help:"Volume name, or every volume which is mounted, and online, without it"`
}
type ClientCommands ¶
type ClientCommands struct {
VolumeCommands
ObjectCommands
SearchCommands
ActionCommands
// The server's credentials, such as GOOGLE_CLIENT, and the sign-ins
// which are stored, of go-auth's
credentialcmd.CredentialProviderCommands
credentialcmd.CredentialManagerCommands
}
ClientCommands are the commands which call the filer API of a server
type Flags ¶
type Flags struct {
Volume []string `` /* 348-byte string literal not displayed */
Worker string `` /* 176-byte string literal not displayed */
Backend []string `` /* 261-byte string literal not displayed */
}
func (Flags) WithRegistry ¶
func (flags Flags) WithRegistry(ctx server.Cmd, srv *servercmd.RunServer, b *broadcaster.Broadcaster, fn func(*registry.Registry) error, opts ...registry.Opt) (err error)
WithRegistry creates a registry of volumes, with the server's tracer and meter, and the flags' worker, when it's set, and then the options, such as the provider of the volumes' credentials (registry.WithCredentials), which they look up of their names, such as S3_SECRET, and runs it, so the changes to its volumes are published to the broadcaster, and it's closed when the function returns, adds the volumes of the flags, registers its HTTP handlers with the server, when there is one, and then calls the function with the registry. The broadcaster is one a server shares with its other modules, which it runs and serves, or, when it's nil, one which is created, served as go-server's /changes, and run until the function returns. A volume which can't be added is an error. The registry, and its volumes, are closed when the function returns. Returns any error.
type ObjectCommands ¶
type ObjectCommands struct {
ObjectList ObjectListCmd `cmd:"" name:"objects" help:"List the objects in a directory of a volume, a page at a time." group:"OBJECT"`
ObjectHead ObjectHeadCmd `cmd:"" name:"object" help:"Get the metadata of an object in a volume." group:"OBJECT"`
ObjectGet ObjectGetCmd `cmd:"" name:"object-get" help:"Download a file in a volume, to a file, or to standard output." group:"OBJECT"`
ObjectPut ObjectPutCmd `cmd:"" name:"object-put" help:"Upload a file, or standard input, to a file in a volume." group:"OBJECT"`
ObjectUpload ObjectUploadCmd `` /* 126-byte string literal not displayed */
ObjectDelete ObjectDeleteCmd `cmd:"" name:"object-delete" help:"Delete a file in a volume, or a directory, with --recursive." group:"OBJECT"`
}
type ObjectDeleteCmd ¶
type ObjectGetCmd ¶
type ObjectGetCmd struct {
Name string `arg:"" name:"name" help:"Volume name."`
Path string `arg:"" name:"path" help:"Path of the file in the volume."`
File string `` /* 148-byte string literal not displayed */
Force bool `name:"force" short:"f" help:"Download the file when the file it's downloaded to exists, and isn't older."`
}
type ObjectHeadCmd ¶
type ObjectListCmd ¶
type ObjectListCmd struct {
Name string `arg:"" name:"name" help:"Volume name."`
Path string `arg:"" name:"path" optional:"" help:"Directory to list, which defaults to the root of the volume."`
Recursive bool `name:"recursive" short:"r" help:"List every object beneath the directory."`
StartAfter string `name:"start-after" help:"Return objects whose keys sort after this key, which is the next key of the previous page."`
Limit *uint64 `name:"limit" help:"Maximum number of objects to return, which defaults to and is capped at 100."`
Type string `` /* 224-byte string literal not displayed */
Sort string `` /* 192-byte string literal not displayed */
NoTitle bool `name:"no-title" help:"Show each object's name, rather than its title (dc:title), when it has one."`
}
type ObjectPutCmd ¶
type ObjectPutCmd struct {
Name string `arg:"" name:"name" help:"Volume name."`
Path string `arg:"" name:"path" help:"Path of the file in the volume, or of the directory, ending with /, to upload it to with its name."`
File string `arg:"" name:"file" help:"File to upload, or - for standard input."`
IfNotExists bool `name:"no-replace" help:"Don't replace a file which exists."`
IfExists bool `name:"replace-only" help:"Don't create a file which doesn't exist."`
Meta []string `` /* 231-byte string literal not displayed */
}
type ObjectUploadCmd ¶
type ObjectUploadCmd struct {
Name string `arg:"" name:"name" help:"Volume name."`
Path string `arg:"" name:"path" help:"Directory in the volume to upload into, which is created, or / for its root."`
Files []string `` /* 214-byte string literal not displayed */
Overwrite bool `name:"overwrite" short:"y" help:"Replace files which exist, rather than skipping them."`
Meta []string `` /* 232-byte string literal not displayed */
}
type SearchCmd ¶
type SearchCmd struct {
Query []string `` /* 240-byte string literal not displayed */
Offset uint64 `name:"offset" help:"How many of the objects which match are skipped, before those which are shown"`
Limit *uint64 `name:"limit" help:"Maximum number of objects to show, which defaults to and is capped at 100"`
NoTitle bool `name:"no-title" help:"Show the paths of objects, rather than their titles"`
}
func (*SearchCmd) AfterApply ¶
AfterApply sets the query to the words of the command line as they're written, as Kong splits a word which starts with -, which is excluded, as short flags, when it's the first of the query, such as -symphony, of -s and ymphony, which are its characters, so the query is the fewest words, at the end of the command line, which are of the same characters, without a -- before them
type SearchCommands ¶
type SearchCommands struct {
Search SearchCmd `` /* 153-byte string literal not displayed */
}
SearchCommands are the commands which search the objects of volumes
type SignInFlags ¶
type SignInFlags struct {
NoBrowser bool `name:"no-browser" help:"Print the URL to sign in at, when its user needs to sign in, rather than opening it in the browser."`
SignInAddr string `` /* 203-byte string literal not displayed */
}
SignInFlags are the flags of signing in, of a command which signs in, when the server needs it: whether the URL to sign in at is opened, and the loopback address it redirects to, which is fixed, so it can be one a web application's client registers, as well as any a desktop app's can
type VolumeBackendsCmd ¶
type VolumeBackendsCmd struct{}
type VolumeCommands ¶
type VolumeCommands struct {
VolumeList VolumeListCmd `cmd:"" name:"volumes" help:"List volumes, with the URLs of their backends." group:"VOLUME"`
VolumeGet VolumeGetCmd `cmd:"" name:"volume" help:"Get a volume by its name, with the URL of its backend." group:"VOLUME"`
VolumeBackends VolumeBackendsCmd `` /* 181-byte string literal not displayed */
VolumeCreate VolumeCreateCmd `cmd:"" name:"volume-create" help:"Create a volume from the URL of its backend, or a directory." group:"VOLUME"`
VolumeCreateFS VolumeCreateFSCmd `cmd:"" name:"volume-create-fs" help:"Create a volume of a directory on the server." group:"VOLUME"`
VolumeCreateS3 VolumeCreateS3Cmd `` /* 145-byte string literal not displayed */
VolumeCreateGTasks VolumeCreateGTasksCmd `` /* 167-byte string literal not displayed */
VolumeCreateGContacts VolumeCreateGContactsCmd `` /* 184-byte string literal not displayed */
VolumeCreateGCalendar VolumeCreateGCalendarCmd `` /* 236-byte string literal not displayed */
VolumeCreateGDrive VolumeCreateGDriveCmd `` /* 292-byte string literal not displayed */
VolumeCreateRSS VolumeCreateRSSCmd `cmd:"" name:"volume-create-rss" help:"Create a volume of an RSS feed's items, read-only, of its URL." group:"VOLUME"`
VolumeCreateWebcal VolumeCreateWebcalCmd `` /* 132-byte string literal not displayed */
VolumeUpdate VolumeUpdateCmd `` /* 212-byte string literal not displayed */
VolumeMount VolumeMountCmd `` /* 162-byte string literal not displayed */
VolumeUnmount VolumeUnmountCmd `` /* 134-byte string literal not displayed */
VolumeDelete VolumeDeleteCmd `cmd:"" name:"volume-delete" help:"Delete a volume by its name, without deleting its files." group:"VOLUME"`
VolumeWatch VolumeWatchCmd `` /* 132-byte string literal not displayed */
}
type VolumeCreateCmd ¶
type VolumeCreateCmd struct {
URL string `` /* 235-byte string literal not displayed */
Name string `` /* 195-byte string literal not displayed */
Opt []string `` /* 280-byte string literal not displayed */
Description string `` /* 130-byte string literal not displayed */
Writable *bool `` /* 189-byte string literal not displayed */
}
type VolumeCreateFSCmd ¶
type VolumeCreateFSCmd struct {
Name string `arg:"" name:"name" help:"Volume name, which is an identifier."`
Path string `arg:"" name:"path" help:"Absolute path of the directory, on the server, such as /mnt/media."`
Writable bool `` /* 158-byte string literal not displayed */
Skip []string `` /* 237-byte string literal not displayed */
Package []string `` /* 254-byte string literal not displayed */
Opt []string `` /* 210-byte string literal not displayed */
Description string `` /* 130-byte string literal not displayed */
}
type VolumeCreateGCalendarCmd ¶
type VolumeCreateGCalendarCmd struct {
Name string `arg:"" name:"name" help:"Volume name, which is an identifier."`
Writable bool `` /* 257-byte string literal not displayed */
Window string `` /* 148-byte string literal not displayed */
Credential string `` /* 171-byte string literal not displayed */
Quota *uint `name:"quota" help:"Most requests to Google each minute, or 0 not to limit them, which is 120, unless it's set."`
RefreshInterval *time.Duration `` /* 147-byte string literal not displayed */
SignInFlags
Opt []string `` /* 211-byte string literal not displayed */
Description string `` /* 130-byte string literal not displayed */
}
type VolumeCreateGContactsCmd ¶
type VolumeCreateGContactsCmd struct {
Name string `arg:"" name:"name" help:"Volume name, which is an identifier."`
Writable bool `` /* 261-byte string literal not displayed */
Credential string `` /* 171-byte string literal not displayed */
Quota *uint `name:"quota" help:"Most requests to Google each minute, or 0 not to limit them, which is 120, unless it's set."`
RefreshInterval *time.Duration `` /* 147-byte string literal not displayed */
SignInFlags
Opt []string `` /* 210-byte string literal not displayed */
Description string `` /* 130-byte string literal not displayed */
}
type VolumeCreateGDriveCmd ¶
type VolumeCreateGDriveCmd struct {
Name string `arg:"" name:"name" help:"Volume name, which is an identifier."`
Writable bool `` /* 233-byte string literal not displayed */
Credential string `` /* 171-byte string literal not displayed */
Quota *uint `name:"quota" help:"Most requests to Google each minute, or 0 not to limit them, which is 120, unless it's set."`
RefreshInterval *time.Duration `` /* 161-byte string literal not displayed */
SignInFlags
Opt []string `` /* 210-byte string literal not displayed */
Description string `` /* 130-byte string literal not displayed */
}
type VolumeCreateGTasksCmd ¶
type VolumeCreateGTasksCmd struct {
Name string `arg:"" name:"name" help:"Volume name, which is an identifier."`
Writable bool `` /* 229-byte string literal not displayed */
Credential string `` /* 171-byte string literal not displayed */
Quota *uint `name:"quota" help:"Most requests to Google each minute, or 0 not to limit them, which is 120, unless it's set."`
RefreshInterval *time.Duration `` /* 147-byte string literal not displayed */
Hidden bool `` /* 134-byte string literal not displayed */
SignInFlags
Opt []string `` /* 210-byte string literal not displayed */
Description string `` /* 130-byte string literal not displayed */
}
type VolumeCreateRSSCmd ¶
type VolumeCreateRSSCmd struct {
Name string `arg:"" name:"name" help:"Volume name, which is an identifier."`
Feed string `arg:"" name:"url" help:"URL of the feed, which is http or https."`
RefreshInterval *time.Duration `name:"refresh-interval" placeholder:"DURATION" help:"How long a feed which is fetched is kept, which is 5m, unless it's set."`
Opt []string `` /* 211-byte string literal not displayed */
Description string `` /* 126-byte string literal not displayed */
}
type VolumeCreateS3Cmd ¶
type VolumeCreateS3Cmd struct {
Name string `arg:"" name:"name" help:"Volume name, which is an identifier."`
Bucket string `arg:"" name:"bucket" help:"Bucket, and optionally a prefix of its keys, such as my.bucket or my.bucket/photos."`
Region string `name:"region" help:"Region of the bucket, which is its own, when it's not set."`
Endpoint string `` /* 127-byte string literal not displayed */
Profile string `name:"profile" help:"Profile of the server's shared AWS configuration, whose credentials are used."`
AccessKey string `` /* 197-byte string literal not displayed */
SecretKey string `` /* 187-byte string literal not displayed */
SessionToken string `` /* 148-byte string literal not displayed */
Anonymous bool `name:"anonymous" help:"Requests aren't signed, so they're without credentials, and the volume is read-only."`
Writable bool `` /* 205-byte string literal not displayed */
SeaweedFS string `` /* 194-byte string literal not displayed */
Opt []string `` /* 210-byte string literal not displayed */
Description string `` /* 130-byte string literal not displayed */
}
type VolumeCreateWebcalCmd ¶ added in v0.5.2
type VolumeCreateWebcalCmd struct {
Name string `arg:"" name:"name" help:"Volume name, which is an identifier."`
Feed string `arg:"" name:"url" help:"URL of the calendar, which is webcal, https or http, such as a calendar's subscription link."`
RefreshInterval *time.Duration `` /* 130-byte string literal not displayed */
Opt []string `` /* 211-byte string literal not displayed */
Description string `` /* 133-byte string literal not displayed */
}
type VolumeDeleteCmd ¶
type VolumeDeleteCmd struct {
VolumeGetCmd
}
type VolumeGetCmd ¶
type VolumeGetCmd struct {
Name string `arg:"" name:"name" help:"Volume name."`
}
type VolumeListCmd ¶
type VolumeListCmd struct{}
type VolumeMountCmd ¶
type VolumeMountCmd struct {
VolumeGetCmd
SignInFlags
}
type VolumeUnmountCmd ¶
type VolumeUnmountCmd struct {
VolumeGetCmd
}
type VolumeUpdateCmd ¶
type VolumeUpdateCmd struct {
VolumeGetCmd
SignInFlags
Opt []string `` /* 252-byte string literal not displayed */
Unset []string `name:"unset" sep:"none" placeholder:"KEY" help:"Option to remove, so it's the default, which can be repeated."`
Enabled *bool `` /* 162-byte string literal not displayed */
Description *string `` /* 150-byte string literal not displayed */
Writable *bool `` /* 199-byte string literal not displayed */
}
type VolumeWatchCmd ¶
type VolumeWatchCmd struct {
Name []string `arg:"" name:"name" optional:"" help:"Volumes to watch, which is every volume without any."`
}