cli

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCommands

func RegisterCommands(app *cobra.Command, c *client.Client)

RegisterCommands registers the resource action CLI commands.

Types

type BackupMultilistCommand

type BackupMultilistCommand struct {
	Payload     string
	ContentType string
	PrettyPrint bool
}

BackupMultilistCommand is the command line data structure for the backup action of multilist

func (*BackupMultilistCommand) RegisterFlags

func (cmd *BackupMultilistCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*BackupMultilistCommand) Run

func (cmd *BackupMultilistCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the BackupMultilistCommand command.

type CloneListsCommand

type CloneListsCommand struct {
	Payload     string
	ContentType string
	// The ID of the list to apply the operation on.
	// Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
	ListID      string
	PrettyPrint bool
}

CloneListsCommand is the command line data structure for the clone action of lists

func (*CloneListsCommand) RegisterFlags

func (cmd *CloneListsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*CloneListsCommand) Run

func (cmd *CloneListsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the CloneListsCommand command.

type CreateElementsCommand

type CreateElementsCommand struct {
	Payload     string
	ContentType string
	// The ID of the list to apply the operation on.
	// Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
	ListID string
	// Return this number of elements above and below the current element in `neighbors` field.
	Range       int
	PrettyPrint bool
}

CreateElementsCommand is the command line data structure for the create action of elements

func (*CreateElementsCommand) RegisterFlags

func (cmd *CreateElementsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*CreateElementsCommand) Run

func (cmd *CreateElementsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the CreateElementsCommand command.

type CreateListsCommand

type CreateListsCommand struct {
	Payload     string
	ContentType string
	// Replace list if exists.
	Replace     string
	PrettyPrint bool
}

CreateListsCommand is the command line data structure for the create action of lists

func (*CreateListsCommand) RegisterFlags

func (cmd *CreateListsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*CreateListsCommand) Run

func (cmd *CreateListsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the CreateListsCommand command.

type CreateMultilistCommand

type CreateMultilistCommand struct {
	Payload     string
	ContentType string
	// Returns errors only. If disabled, operations will be faster and require less memory.
	ErrorsOnly string
	// Return results of the operation. If disabled, operations will be faster and require less memory.
	Results     string
	PrettyPrint bool
}

CreateMultilistCommand is the command line data structure for the create action of multilist

func (*CreateMultilistCommand) RegisterFlags

func (cmd *CreateMultilistCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*CreateMultilistCommand) Run

func (cmd *CreateMultilistCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the CreateMultilistCommand command.

type DeleteBackupCommand

type DeleteBackupCommand struct {
	BackupID    string
	PrettyPrint bool
}

DeleteBackupCommand is the command line data structure for the delete action of backup

func (*DeleteBackupCommand) RegisterFlags

func (cmd *DeleteBackupCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*DeleteBackupCommand) Run

func (cmd *DeleteBackupCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the DeleteBackupCommand command.

type DeleteElementsCommand

type DeleteElementsCommand struct {
	// ID of element
	ElementID string
	// The ID of the list to apply the operation on.
	// Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
	ListID      string
	PrettyPrint bool
}

DeleteElementsCommand is the command line data structure for the delete action of elements

func (*DeleteElementsCommand) RegisterFlags

func (cmd *DeleteElementsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*DeleteElementsCommand) Run

func (cmd *DeleteElementsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the DeleteElementsCommand command.

type DeleteListsCommand

type DeleteListsCommand struct {
	// The ID of the list to apply the operation on.
	// Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
	ListID      string
	PrettyPrint bool
}

DeleteListsCommand is the command line data structure for the delete action of lists

func (*DeleteListsCommand) RegisterFlags

func (cmd *DeleteListsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*DeleteListsCommand) Run

func (cmd *DeleteListsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the DeleteListsCommand command.

type DeleteMultiElementsCommand

type DeleteMultiElementsCommand struct {
	// The ID of the list to apply the operation on.
	// Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
	ListID string
	// IDs of elements
	ElementIds  []string
	PrettyPrint bool
}

DeleteMultiElementsCommand is the command line data structure for the delete-multi action of elements

func (*DeleteMultiElementsCommand) RegisterFlags

func (cmd *DeleteMultiElementsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*DeleteMultiElementsCommand) Run

func (cmd *DeleteMultiElementsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the DeleteMultiElementsCommand command.

type DeleteMultilistCommand

type DeleteMultilistCommand struct {
	// ID of element
	ElementID string
	// Include all lists in these sets
	AllInSets []string
	// Returns errors only. If disabled, operations will be faster and require less memory.
	ErrorsOnly string
	// Include lists that match exact list names
	Lists []string
	// Include lists that match all values in metadata.
	// Payload must be valid json with string->string values.
	// Example: {"country":"dk","game":"match4"}
	MatchMetadata string
	PrettyPrint   bool
}

DeleteMultilistCommand is the command line data structure for the delete action of multilist

func (*DeleteMultilistCommand) RegisterFlags

func (cmd *DeleteMultilistCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*DeleteMultilistCommand) Run

func (cmd *DeleteMultilistCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the DeleteMultilistCommand command.

type DownloadCommand

type DownloadCommand struct {
	// OutFile is the path to the download output file.
	OutFile string
}

DownloadCommand is the command line data structure for the download command.

func (*DownloadCommand) Run

func (cmd *DownloadCommand) Run(c *client.Client, args []string) error

Run downloads files with given paths.

type GetAllListsCommand

type GetAllListsCommand struct {
	// Start with element following this ID. Empty will return from start.
	AfterID string
	// Return elements preceding this ID.
	BeforeID string
	// Maximum Number of results
	Limit       int
	PrettyPrint bool
}

GetAllListsCommand is the command line data structure for the get_all action of lists

func (*GetAllListsCommand) RegisterFlags

func (cmd *GetAllListsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*GetAllListsCommand) Run

func (cmd *GetAllListsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the GetAllListsCommand command.

type GetAroundElementsCommand

type GetAroundElementsCommand struct {
	Payload     string
	ContentType string
	// ID of element
	ElementID string
	// The ID of the list to apply the operation on.
	// Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
	ListID string
	// Return this number of elements above and below the current element in `neighbors` field.
	Range       int
	PrettyPrint bool
}

GetAroundElementsCommand is the command line data structure for the get-around action of elements

func (*GetAroundElementsCommand) RegisterFlags

func (cmd *GetAroundElementsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*GetAroundElementsCommand) Run

func (cmd *GetAroundElementsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the GetAroundElementsCommand command.

type GetElementsCommand

type GetElementsCommand struct {
	// ID of element
	ElementID string
	// The ID of the list to apply the operation on.
	// Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
	ListID string
	// Return this number of elements above and below the current element in `neighbors` field.
	Range       int
	PrettyPrint bool
}

GetElementsCommand is the command line data structure for the get action of elements

func (*GetElementsCommand) RegisterFlags

func (cmd *GetElementsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*GetElementsCommand) Run

func (cmd *GetElementsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the GetElementsCommand command.

type GetListsCommand

type GetListsCommand struct {
	// The ID of the list to apply the operation on.
	// Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
	ListID string
	// Include top_element and bottom_element in result.
	TopBottom   string
	PrettyPrint bool
}

GetListsCommand is the command line data structure for the get action of lists

func (*GetListsCommand) RegisterFlags

func (cmd *GetListsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*GetListsCommand) Run

func (cmd *GetListsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the GetListsCommand command.

type GetMultiElementsCommand

type GetMultiElementsCommand struct {
	Payload     string
	ContentType string
	// The ID of the list to apply the operation on.
	// Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
	ListID      string
	PrettyPrint bool
}

GetMultiElementsCommand is the command line data structure for the get-multi action of elements

func (*GetMultiElementsCommand) RegisterFlags

func (cmd *GetMultiElementsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*GetMultiElementsCommand) Run

func (cmd *GetMultiElementsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the GetMultiElementsCommand command.

type GetMultilistCommand

type GetMultilistCommand struct {
	// ID of element
	ElementID string
	// Include all lists in these sets
	AllInSets []string
	// Include lists that match exact list names
	Lists []string
	// Include lists that match all values in metadata.
	// Payload must be valid json with string->string values.
	// Example: {"country":"dk","game":"match4"}
	MatchMetadata string
	PrettyPrint   bool
}

GetMultilistCommand is the command line data structure for the get action of multilist

func (*GetMultilistCommand) RegisterFlags

func (cmd *GetMultilistCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*GetMultilistCommand) Run

func (cmd *GetMultilistCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the GetMultilistCommand command.

type GetPercentileListsCommand

type GetPercentileListsCommand struct {
	// The ID of the list to apply the operation on.
	// Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
	ListID string
	// Return median percentile element.
	// If the percentile is between two elements, the element with the highest score is returned.
	// Value must be parseable as a float point number and must be between 0.0 and 100.0
	FromTop string
	// Return this number of elements above and below the current element in `neighbors` field.
	Range       int
	PrettyPrint bool
}

GetPercentileListsCommand is the command line data structure for the get-percentile action of lists

func (*GetPercentileListsCommand) RegisterFlags

func (cmd *GetPercentileListsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*GetPercentileListsCommand) Run

func (cmd *GetPercentileListsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the GetPercentileListsCommand command.

type GetRangeListsCommand

type GetRangeListsCommand struct {
	// The ID of the list to apply the operation on.
	// Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
	ListID string
	// First result will be at this rank from the bottom of the list.
	FromBottom int
	// First result will be at this rank from the top of the list.
	FromTop int
	// Number of results to return
	Limit       int
	PrettyPrint bool
}

GetRangeListsCommand is the command line data structure for the get-range action of lists

func (*GetRangeListsCommand) RegisterFlags

func (cmd *GetRangeListsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*GetRangeListsCommand) Run

func (cmd *GetRangeListsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the GetRangeListsCommand command.

type HealthHealthCommand

type HealthHealthCommand struct {
	PrettyPrint bool
}

HealthHealthCommand is the command line data structure for the health action of health

func (*HealthHealthCommand) RegisterFlags

func (cmd *HealthHealthCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*HealthHealthCommand) Run

func (cmd *HealthHealthCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the HealthHealthCommand command.

type JWTJWTCommand

type JWTJWTCommand struct {
	// Expire token in this many minutes. Default is 24 hours.
	Expire int
	// Create key with list restrictions.
	// Use commas to separate multiple elements
	OnlyElements string
	// Create key with list restrictions.
	// Use commas to separate multiple lists
	OnlyLists string
	// Create key with scope
	Scope       string
	PrettyPrint bool
}

JWTJWTCommand is the command line data structure for the jwt action of jwt

func (*JWTJWTCommand) RegisterFlags

func (cmd *JWTJWTCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*JWTJWTCommand) Run

func (cmd *JWTJWTCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the JWTJWTCommand command.

type PutElementsCommand

type PutElementsCommand struct {
	Payload     string
	ContentType string
	// ID of element
	ElementID string
	// The ID of the list to apply the operation on.
	// Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
	ListID string
	// Return this number of elements above and below the current element in `neighbors` field.
	Range       int
	PrettyPrint bool
}

PutElementsCommand is the command line data structure for the put action of elements

func (*PutElementsCommand) RegisterFlags

func (cmd *PutElementsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*PutElementsCommand) Run

func (cmd *PutElementsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the PutElementsCommand command.

type PutMultiElementsCommand

type PutMultiElementsCommand struct {
	Payload     string
	ContentType string
	// The ID of the list to apply the operation on.
	// Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
	ListID string
	// Return results of the operation. If disabled, operations will be faster and require less memory.
	Results     string
	PrettyPrint bool
}

PutMultiElementsCommand is the command line data structure for the put-multi action of elements

func (*PutMultiElementsCommand) RegisterFlags

func (cmd *PutMultiElementsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*PutMultiElementsCommand) Run

func (cmd *PutMultiElementsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the PutMultiElementsCommand command.

type PutMultilistCommand

type PutMultilistCommand struct {
	Payload     string
	ContentType string
	// Returns errors only. If disabled, operations will be faster and require less memory.
	ErrorsOnly string
	// Return results of the operation. If disabled, operations will be faster and require less memory.
	Results     string
	PrettyPrint bool
}

PutMultilistCommand is the command line data structure for the put action of multilist

func (*PutMultilistCommand) RegisterFlags

func (cmd *PutMultilistCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*PutMultilistCommand) Run

func (cmd *PutMultilistCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the PutMultilistCommand command.

type ReindexListsCommand

type ReindexListsCommand struct {
	// The ID of the list to apply the operation on.
	// Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
	ListID      string
	PrettyPrint bool
}

ReindexListsCommand is the command line data structure for the reindex action of lists

func (*ReindexListsCommand) RegisterFlags

func (cmd *ReindexListsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*ReindexListsCommand) Run

func (cmd *ReindexListsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the ReindexListsCommand command.

type ReindexMultilistCommand

type ReindexMultilistCommand struct {
	Payload     string
	ContentType string
	// Returns errors only. If disabled, operations will be faster and require less memory.
	ErrorsOnly  string
	PrettyPrint bool
}

ReindexMultilistCommand is the command line data structure for the reindex action of multilist

func (*ReindexMultilistCommand) RegisterFlags

func (cmd *ReindexMultilistCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*ReindexMultilistCommand) Run

func (cmd *ReindexMultilistCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the ReindexMultilistCommand command.

type RepairListsCommand

type RepairListsCommand struct {
	// The ID of the list to apply the operation on.
	// Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
	ListID string
	// Clear list if unable to repair
	Clear       string
	PrettyPrint bool
}

RepairListsCommand is the command line data structure for the repair action of lists

func (*RepairListsCommand) RegisterFlags

func (cmd *RepairListsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*RepairListsCommand) Run

func (cmd *RepairListsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the RepairListsCommand command.

type RestoreMultilistCommand

type RestoreMultilistCommand struct {
	// Keep existing lists. Only restore missing lists
	Keep string
	// Optional alternative list id prefix.
	// If not provided the original list id/segment ids will be used and any existing list will be overwritten.
	ListIDPrefix string
	// Optional alternative list id suffix.
	// If not provided the original list id/segment ids will be used and any existing list will be overwritten.
	ListIDSuffix string
	// The body will not contain any data. Instead load data from provided URL.
	// The call will return when the backup has finished.
	// If the source is s3, the source should be defined as s3://bucket/path/file.bin. Replace bucket and path+file
	Src string
	// The body will not contain any data. Instead load data from file from this path.
	// The call will return when the backup has finished.
	SrcFile     string
	PrettyPrint bool
}

RestoreMultilistCommand is the command line data structure for the restore action of multilist

func (*RestoreMultilistCommand) RegisterFlags

func (cmd *RestoreMultilistCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*RestoreMultilistCommand) Run

func (cmd *RestoreMultilistCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the RestoreMultilistCommand command.

type RootHealthCommand

type RootHealthCommand struct {
	PrettyPrint bool
}

RootHealthCommand is the command line data structure for the root action of health

func (*RootHealthCommand) RegisterFlags

func (cmd *RootHealthCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*RootHealthCommand) Run

func (cmd *RootHealthCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the RootHealthCommand command.

type StatusBackupCommand

type StatusBackupCommand struct {
	BackupID    string
	PrettyPrint bool
}

StatusBackupCommand is the command line data structure for the status action of backup

func (*StatusBackupCommand) RegisterFlags

func (cmd *StatusBackupCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*StatusBackupCommand) Run

func (cmd *StatusBackupCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the StatusBackupCommand command.

type VerifyListsCommand

type VerifyListsCommand struct {
	// The ID of the list to apply the operation on.
	// Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
	ListID string
	// Clear list if unable to repair
	Clear string
	// Attempt to repair list
	Repair      string
	PrettyPrint bool
}

VerifyListsCommand is the command line data structure for the verify action of lists

func (*VerifyListsCommand) RegisterFlags

func (cmd *VerifyListsCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*VerifyListsCommand) Run

func (cmd *VerifyListsCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the VerifyListsCommand command.

type VerifyMultilistCommand

type VerifyMultilistCommand struct {
	Payload     string
	ContentType string
	// Clear list if unable to repair
	Clear string
	// Verify elements as well
	Elements string
	// Returns errors only. If disabled, operations will be faster and require less memory.
	ErrorsOnly string
	// Repair lists with problems automatically.
	Repair      string
	PrettyPrint bool
}

VerifyMultilistCommand is the command line data structure for the verify action of multilist

func (*VerifyMultilistCommand) RegisterFlags

func (cmd *VerifyMultilistCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*VerifyMultilistCommand) Run

func (cmd *VerifyMultilistCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the VerifyMultilistCommand command.

Jump to

Keyboard shortcuts

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