Documentation
¶
Index ¶
- func BackupMultilistPath() string
- func CloneListsPath(listID string) string
- func CreateElementsPath(listID string) string
- func CreateListsPath() string
- func CreateMultilistPath() string
- func DeleteBackupPath(backupID string) string
- func DeleteElementsPath(listID string, elementID string) string
- func DeleteListsPath(listID string) string
- func DeleteMultiElementsPath(listID string) string
- func DeleteMultilistPath(elementID string) string
- func GetAllListsPath() string
- func GetAroundElementsPath(listID string, elementID string) string
- func GetElementsPath(listID string, elementID string) string
- func GetListsPath(listID string) string
- func GetMultiElementsPath(listID string) string
- func GetMultilistPath(elementID string) string
- func GetPercentileListsPath(listID string) string
- func GetRangeListsPath(listID string) string
- func HealthHealthPath() string
- func JWTJWTPath() string
- func PutElementsPath(listID string, elementID string) string
- func PutMultiElementsPath(listID string) string
- func PutMultilistPath() string
- func ReindexListsPath(listID string) string
- func ReindexMultilistPath() string
- func RepairListsPath(listID string) string
- func RestoreMultilistPath() string
- func RootHealthPath() string
- func StatusBackupPath(backupID string) string
- func VerifyListsPath(listID string) string
- func VerifyMultilistPath() string
- type BackupDestination
- type Client
- func (c *Client) BackupMultilist(ctx context.Context, path string, payload *MultiListBackup, contentType string) (*http.Response, error)
- func (c *Client) CloneLists(ctx context.Context, path string, payload *RankList, contentType string) (*http.Response, error)
- func (c *Client) CreateElements(ctx context.Context, path string, payload *Element, range_ *int, ...) (*http.Response, error)
- func (c *Client) CreateLists(ctx context.Context, path string, payload *RankList, replace *bool, ...) (*http.Response, error)
- func (c *Client) CreateMultilist(ctx context.Context, path string, payload *ListPayloadQL, errorsOnly *bool, ...) (*http.Response, error)
- func (c *Client) DecodeErrorResponse(resp *http.Response) (*goa.ErrorResponse, error)
- func (c *Client) DecodeRankdbBackupStatus(resp *http.Response) (*RankdbBackupStatus, error)
- func (c *Client) DecodeRankdbBackupStatusFull(resp *http.Response) (*RankdbBackupStatusFull, error)
- func (c *Client) DecodeRankdbBackupStatusTiny(resp *http.Response) (*RankdbBackupStatusTiny, error)
- func (c *Client) DecodeRankdbCallback(resp *http.Response) (*RankdbCallback, error)
- func (c *Client) DecodeRankdbElement(resp *http.Response) (*RankdbElement, error)
- func (c *Client) DecodeRankdbElementCollection(resp *http.Response) (RankdbElementCollection, error)
- func (c *Client) DecodeRankdbElementFull(resp *http.Response) (*RankdbElementFull, error)
- func (c *Client) DecodeRankdbElementFullCollection(resp *http.Response) (RankdbElementFullCollection, error)
- func (c *Client) DecodeRankdbElementFullUpdate(resp *http.Response) (*RankdbElementFullUpdate, error)
- func (c *Client) DecodeRankdbElementFullUpdateCollection(resp *http.Response) (RankdbElementFullUpdateCollection, error)
- func (c *Client) DecodeRankdbElementTiny(resp *http.Response) (*RankdbElementTiny, error)
- func (c *Client) DecodeRankdbElementTinyCollection(resp *http.Response) (RankdbElementTinyCollection, error)
- func (c *Client) DecodeRankdbListopresult(resp *http.Response) (*RankdbListopresult, error)
- func (c *Client) DecodeRankdbListsresult(resp *http.Response) (*RankdbListsresult, error)
- func (c *Client) DecodeRankdbMultielement(resp *http.Response) (*RankdbMultielement, error)
- func (c *Client) DecodeRankdbOperationSuccess(resp *http.Response) (*RankdbOperationSuccess, error)
- func (c *Client) DecodeRankdbRanklist(resp *http.Response) (*RankdbRanklist, error)
- func (c *Client) DecodeRankdbRanklistCollection(resp *http.Response) (RankdbRanklistCollection, error)
- func (c *Client) DecodeRankdbRanklistFull(resp *http.Response) (*RankdbRanklistFull, error)
- func (c *Client) DecodeRankdbRanklistTiny(resp *http.Response) (*RankdbRanklistTiny, error)
- func (c *Client) DecodeRankdbRanklistTinyCollection(resp *http.Response) (RankdbRanklistTinyCollection, error)
- func (c *Client) DecodeRankdbRestoreresult(resp *http.Response) (*RankdbRestoreresult, error)
- func (c *Client) DecodeRankdbResultlist(resp *http.Response) (*RankdbResultlist, error)
- func (c *Client) DecodeRankdbSysinfo(resp *http.Response) (*RankdbSysinfo, error)
- func (c *Client) DeleteBackup(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) DeleteElements(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) DeleteLists(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) DeleteMultiElements(ctx context.Context, path string, elementIds []string) (*http.Response, error)
- func (c *Client) DeleteMultilist(ctx context.Context, path string, allInSets []string, errorsOnly *bool, ...) (*http.Response, error)
- func (c *Client) DownloadDoc(ctx context.Context, filename, dest string) (int64, error)
- func (c *Client) DownloadSwagger(ctx context.Context, filename, dest string) (int64, error)
- func (c *Client) GetAllLists(ctx context.Context, path string, afterID *string, beforeID *string, ...) (*http.Response, error)
- func (c *Client) GetAroundElements(ctx context.Context, path string, payload *MultiElement, range_ *int, ...) (*http.Response, error)
- func (c *Client) GetElements(ctx context.Context, path string, range_ *int) (*http.Response, error)
- func (c *Client) GetLists(ctx context.Context, path string, topBottom *bool) (*http.Response, error)
- func (c *Client) GetMultiElements(ctx context.Context, path string, payload *MultiElement, contentType string) (*http.Response, error)
- func (c *Client) GetMultilist(ctx context.Context, path string, allInSets []string, lists []string, ...) (*http.Response, error)
- func (c *Client) GetPercentileLists(ctx context.Context, path string, fromTop *string, range_ *int) (*http.Response, error)
- func (c *Client) GetRangeLists(ctx context.Context, path string, fromBottom *int, fromTop *int, limit *int) (*http.Response, error)
- func (c *Client) HealthHealth(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) JWTJWT(ctx context.Context, path string, scope string, expire *int, ...) (*http.Response, error)
- func (c *Client) NewBackupMultilistRequest(ctx context.Context, path string, payload *MultiListBackup, contentType string) (*http.Request, error)
- func (c *Client) NewCloneListsRequest(ctx context.Context, path string, payload *RankList, contentType string) (*http.Request, error)
- func (c *Client) NewCreateElementsRequest(ctx context.Context, path string, payload *Element, range_ *int, ...) (*http.Request, error)
- func (c *Client) NewCreateListsRequest(ctx context.Context, path string, payload *RankList, replace *bool, ...) (*http.Request, error)
- func (c *Client) NewCreateMultilistRequest(ctx context.Context, path string, payload *ListPayloadQL, errorsOnly *bool, ...) (*http.Request, error)
- func (c *Client) NewDeleteBackupRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewDeleteElementsRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewDeleteListsRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewDeleteMultiElementsRequest(ctx context.Context, path string, elementIds []string) (*http.Request, error)
- func (c *Client) NewDeleteMultilistRequest(ctx context.Context, path string, allInSets []string, errorsOnly *bool, ...) (*http.Request, error)
- func (c *Client) NewGetAllListsRequest(ctx context.Context, path string, afterID *string, beforeID *string, ...) (*http.Request, error)
- func (c *Client) NewGetAroundElementsRequest(ctx context.Context, path string, payload *MultiElement, range_ *int, ...) (*http.Request, error)
- func (c *Client) NewGetElementsRequest(ctx context.Context, path string, range_ *int) (*http.Request, error)
- func (c *Client) NewGetListsRequest(ctx context.Context, path string, topBottom *bool) (*http.Request, error)
- func (c *Client) NewGetMultiElementsRequest(ctx context.Context, path string, payload *MultiElement, contentType string) (*http.Request, error)
- func (c *Client) NewGetMultilistRequest(ctx context.Context, path string, allInSets []string, lists []string, ...) (*http.Request, error)
- func (c *Client) NewGetPercentileListsRequest(ctx context.Context, path string, fromTop *string, range_ *int) (*http.Request, error)
- func (c *Client) NewGetRangeListsRequest(ctx context.Context, path string, fromBottom *int, fromTop *int, limit *int) (*http.Request, error)
- func (c *Client) NewHealthHealthRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewJWTJWTRequest(ctx context.Context, path string, scope string, expire *int, ...) (*http.Request, error)
- func (c *Client) NewPutElementsRequest(ctx context.Context, path string, payload *Element, range_ *int, ...) (*http.Request, error)
- func (c *Client) NewPutMultiElementsRequest(ctx context.Context, path string, payload PutMultiElementsPayload, ...) (*http.Request, error)
- func (c *Client) NewPutMultilistRequest(ctx context.Context, path string, payload *ListPayloadQL, errorsOnly *bool, ...) (*http.Request, error)
- func (c *Client) NewReindexListsRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewReindexMultilistRequest(ctx context.Context, path string, payload *ListQL, errorsOnly *bool, ...) (*http.Request, error)
- func (c *Client) NewRepairListsRequest(ctx context.Context, path string, clear *bool) (*http.Request, error)
- func (c *Client) NewRestoreMultilistRequest(ctx context.Context, path string, keep *bool, listIDPrefix *string, ...) (*http.Request, error)
- func (c *Client) NewRootHealthRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewStatusBackupRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewVerifyListsRequest(ctx context.Context, path string, clear *bool, repair *bool) (*http.Request, error)
- func (c *Client) NewVerifyMultilistRequest(ctx context.Context, path string, payload *ListQL, clear *bool, elements *bool, ...) (*http.Request, error)
- func (c *Client) PutElements(ctx context.Context, path string, payload *Element, range_ *int, ...) (*http.Response, error)
- func (c *Client) PutMultiElements(ctx context.Context, path string, payload PutMultiElementsPayload, ...) (*http.Response, error)
- func (c *Client) PutMultilist(ctx context.Context, path string, payload *ListPayloadQL, errorsOnly *bool, ...) (*http.Response, error)
- func (c *Client) ReindexLists(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) ReindexMultilist(ctx context.Context, path string, payload *ListQL, errorsOnly *bool, ...) (*http.Response, error)
- func (c *Client) RepairLists(ctx context.Context, path string, clear *bool) (*http.Response, error)
- func (c *Client) RestoreMultilist(ctx context.Context, path string, keep *bool, listIDPrefix *string, ...) (*http.Response, error)
- func (c *Client) RootHealth(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) SetJWTSigner(signer goaclient.Signer)
- func (c *Client) StatusBackup(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) VerifyLists(ctx context.Context, path string, clear *bool, repair *bool) (*http.Response, error)
- func (c *Client) VerifyMultilist(ctx context.Context, path string, payload *ListQL, clear *bool, elements *bool, ...) (*http.Response, error)
- type Element
- type ListPayloadQL
- type ListQL
- type MultiElement
- type MultiListBackup
- type PutMultiElementsPayload
- type RankList
- type RankdbBackupStatus
- type RankdbBackupStatusFull
- type RankdbBackupStatusTiny
- type RankdbCallback
- type RankdbElement
- type RankdbElementCollection
- type RankdbElementFull
- type RankdbElementFullCollection
- type RankdbElementFullUpdate
- type RankdbElementFullUpdateCollection
- type RankdbElementTiny
- type RankdbElementTinyCollection
- type RankdbListopresult
- type RankdbListsresult
- type RankdbMultielement
- type RankdbOperationSuccess
- type RankdbRanklist
- type RankdbRanklistCollection
- type RankdbRanklistFull
- type RankdbRanklistTiny
- type RankdbRanklistTinyCollection
- type RankdbRestoreresult
- type RankdbResultlist
- type RankdbSysinfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackupMultilistPath ¶
func BackupMultilistPath() string
BackupMultilistPath computes a request path to the backup action of multilist.
func CloneListsPath ¶
CloneListsPath computes a request path to the clone action of lists.
func CreateElementsPath ¶
CreateElementsPath computes a request path to the create action of elements.
func CreateListsPath ¶
func CreateListsPath() string
CreateListsPath computes a request path to the create action of lists.
func CreateMultilistPath ¶
func CreateMultilistPath() string
CreateMultilistPath computes a request path to the create action of multilist.
func DeleteBackupPath ¶
DeleteBackupPath computes a request path to the delete action of backup.
func DeleteElementsPath ¶
DeleteElementsPath computes a request path to the delete action of elements.
func DeleteListsPath ¶
DeleteListsPath computes a request path to the delete action of lists.
func DeleteMultiElementsPath ¶
DeleteMultiElementsPath computes a request path to the delete-multi action of elements.
func DeleteMultilistPath ¶
DeleteMultilistPath computes a request path to the delete action of multilist.
func GetAllListsPath ¶
func GetAllListsPath() string
GetAllListsPath computes a request path to the get_all action of lists.
func GetAroundElementsPath ¶
GetAroundElementsPath computes a request path to the get-around action of elements.
func GetElementsPath ¶
GetElementsPath computes a request path to the get action of elements.
func GetListsPath ¶
GetListsPath computes a request path to the get action of lists.
func GetMultiElementsPath ¶
GetMultiElementsPath computes a request path to the get-multi action of elements.
func GetMultilistPath ¶
GetMultilistPath computes a request path to the get action of multilist.
func GetPercentileListsPath ¶
GetPercentileListsPath computes a request path to the get-percentile action of lists.
func GetRangeListsPath ¶
GetRangeListsPath computes a request path to the get-range action of lists.
func HealthHealthPath ¶
func HealthHealthPath() string
HealthHealthPath computes a request path to the health action of health.
func JWTJWTPath ¶
func JWTJWTPath() string
JWTJWTPath computes a request path to the jwt action of jwt.
func PutElementsPath ¶
PutElementsPath computes a request path to the put action of elements.
func PutMultiElementsPath ¶
PutMultiElementsPath computes a request path to the put-multi action of elements.
func PutMultilistPath ¶
func PutMultilistPath() string
PutMultilistPath computes a request path to the put action of multilist.
func ReindexListsPath ¶
ReindexListsPath computes a request path to the reindex action of lists.
func ReindexMultilistPath ¶
func ReindexMultilistPath() string
ReindexMultilistPath computes a request path to the reindex action of multilist.
func RepairListsPath ¶
RepairListsPath computes a request path to the repair action of lists.
func RestoreMultilistPath ¶
func RestoreMultilistPath() string
RestoreMultilistPath computes a request path to the restore action of multilist.
func RootHealthPath ¶
func RootHealthPath() string
RootHealthPath computes a request path to the root action of health.
func StatusBackupPath ¶
StatusBackupPath computes a request path to the status action of backup.
func VerifyListsPath ¶
VerifyListsPath computes a request path to the verify action of lists.
func VerifyMultilistPath ¶
func VerifyMultilistPath() string
VerifyMultilistPath computes a request path to the verify action of multilist.
Types ¶
type BackupDestination ¶
type BackupDestination struct { // Specifies the destination path. // If type is server, this should be ip+port of the other server, eg. 10.0.0.1:8080. // If the type is s3, the source should be specified as s3://bucket/path/file.bin. Replace bucket and path+file Path *string `form:"path,omitempty" json:"path,omitempty" xml:"path,omitempty"` // Optional alternative list id prefix for server-to-server transfers. // If not provided the original list id/segment ids will be used and any existing list will be overwritten. ServerListIDPrefix *string `form:"server_list_id_prefix,omitempty" json:"server_list_id_prefix,omitempty" xml:"server_list_id_prefix,omitempty"` // Optional alternative list id suffix for server-to-server transfers. // If not provided the original list id/segment ids will be used and any existing list will be overwritten. ServerListIDSuffix *string `form:"server_list_id_suffix,omitempty" json:"server_list_id_suffix,omitempty" xml:"server_list_id_suffix,omitempty"` // Specifies the destination type of the backup. Can be 'file' 'download', 's3' or 'server' Type string `form:"type" json:"type" xml:"type"` }
BackupDestination user type.
func (*BackupDestination) Validate ¶
func (ut *BackupDestination) Validate() (err error)
Validate validates the BackupDestination type instance.
type Client ¶
type Client struct { *goaclient.Client JWTSigner goaclient.Signer Encoder *goa.HTTPEncoder Decoder *goa.HTTPDecoder }
Client is the rankdb service client.
func (*Client) BackupMultilist ¶
func (c *Client) BackupMultilist(ctx context.Context, path string, payload *MultiListBackup, contentType string) (*http.Response, error)
Backup lists. If no lists, nor any search is specified all lists are backed up.A callback is provided to check progress.
func (*Client) CloneLists ¶
func (c *Client) CloneLists(ctx context.Context, path string, payload *RankList, contentType string) (*http.Response, error)
Creates a clone of the list to a new list with the supplied metadata. The URL list is the source and the payload must contain the new list ID.
func (*Client) CreateElements ¶
func (c *Client) CreateElements(ctx context.Context, path string, payload *Element, range_ *int, contentType string) (*http.Response, error)
Create Element in list
func (*Client) CreateLists ¶
func (c *Client) CreateLists(ctx context.Context, path string, payload *RankList, replace *bool, contentType string) (*http.Response, error)
Create New List. If the list already exists "Conflict" will be returned. The provided populated data may be provided unsorted, but should not contain duplicate element IDs.
func (*Client) CreateMultilist ¶
func (c *Client) CreateMultilist(ctx context.Context, path string, payload *ListPayloadQL, errorsOnly *bool, results *bool, contentType string) (*http.Response, error)
Create elements in lists
func (*Client) DecodeErrorResponse ¶
DecodeErrorResponse decodes the ErrorResponse instance encoded in resp body.
func (*Client) DecodeRankdbBackupStatus ¶
func (c *Client) DecodeRankdbBackupStatus(resp *http.Response) (*RankdbBackupStatus, error)
DecodeRankdbBackupStatus decodes the RankdbBackupStatus instance encoded in resp body.
func (*Client) DecodeRankdbBackupStatusFull ¶
func (c *Client) DecodeRankdbBackupStatusFull(resp *http.Response) (*RankdbBackupStatusFull, error)
DecodeRankdbBackupStatusFull decodes the RankdbBackupStatusFull instance encoded in resp body.
func (*Client) DecodeRankdbBackupStatusTiny ¶
func (c *Client) DecodeRankdbBackupStatusTiny(resp *http.Response) (*RankdbBackupStatusTiny, error)
DecodeRankdbBackupStatusTiny decodes the RankdbBackupStatusTiny instance encoded in resp body.
func (*Client) DecodeRankdbCallback ¶
func (c *Client) DecodeRankdbCallback(resp *http.Response) (*RankdbCallback, error)
DecodeRankdbCallback decodes the RankdbCallback instance encoded in resp body.
func (*Client) DecodeRankdbElement ¶
func (c *Client) DecodeRankdbElement(resp *http.Response) (*RankdbElement, error)
DecodeRankdbElement decodes the RankdbElement instance encoded in resp body.
func (*Client) DecodeRankdbElementCollection ¶
func (c *Client) DecodeRankdbElementCollection(resp *http.Response) (RankdbElementCollection, error)
DecodeRankdbElementCollection decodes the RankdbElementCollection instance encoded in resp body.
func (*Client) DecodeRankdbElementFull ¶
func (c *Client) DecodeRankdbElementFull(resp *http.Response) (*RankdbElementFull, error)
DecodeRankdbElementFull decodes the RankdbElementFull instance encoded in resp body.
func (*Client) DecodeRankdbElementFullCollection ¶
func (c *Client) DecodeRankdbElementFullCollection(resp *http.Response) (RankdbElementFullCollection, error)
DecodeRankdbElementFullCollection decodes the RankdbElementFullCollection instance encoded in resp body.
func (*Client) DecodeRankdbElementFullUpdate ¶
func (c *Client) DecodeRankdbElementFullUpdate(resp *http.Response) (*RankdbElementFullUpdate, error)
DecodeRankdbElementFullUpdate decodes the RankdbElementFullUpdate instance encoded in resp body.
func (*Client) DecodeRankdbElementFullUpdateCollection ¶
func (c *Client) DecodeRankdbElementFullUpdateCollection(resp *http.Response) (RankdbElementFullUpdateCollection, error)
DecodeRankdbElementFullUpdateCollection decodes the RankdbElementFullUpdateCollection instance encoded in resp body.
func (*Client) DecodeRankdbElementTiny ¶
func (c *Client) DecodeRankdbElementTiny(resp *http.Response) (*RankdbElementTiny, error)
DecodeRankdbElementTiny decodes the RankdbElementTiny instance encoded in resp body.
func (*Client) DecodeRankdbElementTinyCollection ¶
func (c *Client) DecodeRankdbElementTinyCollection(resp *http.Response) (RankdbElementTinyCollection, error)
DecodeRankdbElementTinyCollection decodes the RankdbElementTinyCollection instance encoded in resp body.
func (*Client) DecodeRankdbListopresult ¶
func (c *Client) DecodeRankdbListopresult(resp *http.Response) (*RankdbListopresult, error)
DecodeRankdbListopresult decodes the RankdbListopresult instance encoded in resp body.
func (*Client) DecodeRankdbListsresult ¶
func (c *Client) DecodeRankdbListsresult(resp *http.Response) (*RankdbListsresult, error)
DecodeRankdbListsresult decodes the RankdbListsresult instance encoded in resp body.
func (*Client) DecodeRankdbMultielement ¶
func (c *Client) DecodeRankdbMultielement(resp *http.Response) (*RankdbMultielement, error)
DecodeRankdbMultielement decodes the RankdbMultielement instance encoded in resp body.
func (*Client) DecodeRankdbOperationSuccess ¶
func (c *Client) DecodeRankdbOperationSuccess(resp *http.Response) (*RankdbOperationSuccess, error)
DecodeRankdbOperationSuccess decodes the RankdbOperationSuccess instance encoded in resp body.
func (*Client) DecodeRankdbRanklist ¶
func (c *Client) DecodeRankdbRanklist(resp *http.Response) (*RankdbRanklist, error)
DecodeRankdbRanklist decodes the RankdbRanklist instance encoded in resp body.
func (*Client) DecodeRankdbRanklistCollection ¶
func (c *Client) DecodeRankdbRanklistCollection(resp *http.Response) (RankdbRanklistCollection, error)
DecodeRankdbRanklistCollection decodes the RankdbRanklistCollection instance encoded in resp body.
func (*Client) DecodeRankdbRanklistFull ¶
func (c *Client) DecodeRankdbRanklistFull(resp *http.Response) (*RankdbRanklistFull, error)
DecodeRankdbRanklistFull decodes the RankdbRanklistFull instance encoded in resp body.
func (*Client) DecodeRankdbRanklistTiny ¶
func (c *Client) DecodeRankdbRanklistTiny(resp *http.Response) (*RankdbRanklistTiny, error)
DecodeRankdbRanklistTiny decodes the RankdbRanklistTiny instance encoded in resp body.
func (*Client) DecodeRankdbRanklistTinyCollection ¶
func (c *Client) DecodeRankdbRanklistTinyCollection(resp *http.Response) (RankdbRanklistTinyCollection, error)
DecodeRankdbRanklistTinyCollection decodes the RankdbRanklistTinyCollection instance encoded in resp body.
func (*Client) DecodeRankdbRestoreresult ¶
func (c *Client) DecodeRankdbRestoreresult(resp *http.Response) (*RankdbRestoreresult, error)
DecodeRankdbRestoreresult decodes the RankdbRestoreresult instance encoded in resp body.
func (*Client) DecodeRankdbResultlist ¶
func (c *Client) DecodeRankdbResultlist(resp *http.Response) (*RankdbResultlist, error)
DecodeRankdbResultlist decodes the RankdbResultlist instance encoded in resp body.
func (*Client) DecodeRankdbSysinfo ¶
func (c *Client) DecodeRankdbSysinfo(resp *http.Response) (*RankdbSysinfo, error)
DecodeRankdbSysinfo decodes the RankdbSysinfo instance encoded in resp body.
func (*Client) DeleteBackup ¶
cancel backup
func (*Client) DeleteElements ¶
Delete element in list. If element is not found the operation is considered a success
func (*Client) DeleteLists ¶
Delete List. Also returns success if list was not found.
func (*Client) DeleteMultiElements ¶
func (c *Client) DeleteMultiElements(ctx context.Context, path string, elementIds []string) (*http.Response, error)
Delete Multiple Elements in list.If an element does not exist, success is returned.
func (*Client) DeleteMultilist ¶
func (c *Client) DeleteMultilist(ctx context.Context, path string, allInSets []string, errorsOnly *bool, lists []string, matchMetadata *string) (*http.Response, error)
Delete element in multiple lists. If element is not found the operation is considered a success
func (*Client) DownloadDoc ¶
DownloadDoc downloads /files with the given filename and writes it to the file dest. It returns the number of bytes downloaded in case of success.
func (*Client) DownloadSwagger ¶
DownloadSwagger downloads /files with the given filename and writes it to the file dest. It returns the number of bytes downloaded in case of success.
func (*Client) GetAllLists ¶
func (c *Client) GetAllLists(ctx context.Context, path string, afterID *string, beforeID *string, limit *int) (*http.Response, error)
Get multiple lists. Lists are sorted lexicographically. See https://golang.org/pkg/strings/#Compare
func (*Client) GetAroundElements ¶
func (c *Client) GetAroundElements(ctx context.Context, path string, payload *MultiElement, range_ *int, contentType string) (*http.Response, error)
Get relation of one element to multiple specific elements. The element will have local_from_top and local_from_bottom populated.Elements that are not found are ignored.
func (*Client) GetElements ¶
Get Element in list
func (*Client) GetLists ¶
func (c *Client) GetLists(ctx context.Context, path string, topBottom *bool) (*http.Response, error)
Return Single List. Note that top and bottom element will be omitted on empty lists.
func (*Client) GetMultiElements ¶
func (c *Client) GetMultiElements(ctx context.Context, path string, payload *MultiElement, contentType string) (*http.Response, error)
Get Multiple Elements in list. Will return 404 if list cannot be found, OK even if no elements are found.
func (*Client) GetMultilist ¶
func (c *Client) GetMultilist(ctx context.Context, path string, allInSets []string, lists []string, matchMetadata *string) (*http.Response, error)
Get Element in multiple lists
func (*Client) GetPercentileLists ¶
func (c *Client) GetPercentileLists(ctx context.Context, path string, fromTop *string, range_ *int) (*http.Response, error)
Get element at percentile. Either `from_top` or `from_bottom` must be supplied
func (*Client) GetRangeLists ¶
func (c *Client) GetRangeLists(ctx context.Context, path string, fromBottom *int, fromTop *int, limit *int) (*http.Response, error)
Get rank range of the list. Either `from_top` or `from_bottom` must be supplied
func (*Client) HealthHealth ¶
Return system information
func (*Client) JWTJWT ¶
func (c *Client) JWTJWT(ctx context.Context, path string, scope string, expire *int, onlyElements *string, onlyLists *string) (*http.Response, error)
JWT key generator. If left disabled in config, Unauthorized is returned
func (*Client) NewBackupMultilistRequest ¶
func (c *Client) NewBackupMultilistRequest(ctx context.Context, path string, payload *MultiListBackup, contentType string) (*http.Request, error)
NewBackupMultilistRequest create the request corresponding to the backup action endpoint of the multilist resource.
func (*Client) NewCloneListsRequest ¶
func (c *Client) NewCloneListsRequest(ctx context.Context, path string, payload *RankList, contentType string) (*http.Request, error)
NewCloneListsRequest create the request corresponding to the clone action endpoint of the lists resource.
func (*Client) NewCreateElementsRequest ¶
func (c *Client) NewCreateElementsRequest(ctx context.Context, path string, payload *Element, range_ *int, contentType string) (*http.Request, error)
NewCreateElementsRequest create the request corresponding to the create action endpoint of the elements resource.
func (*Client) NewCreateListsRequest ¶
func (c *Client) NewCreateListsRequest(ctx context.Context, path string, payload *RankList, replace *bool, contentType string) (*http.Request, error)
NewCreateListsRequest create the request corresponding to the create action endpoint of the lists resource.
func (*Client) NewCreateMultilistRequest ¶
func (c *Client) NewCreateMultilistRequest(ctx context.Context, path string, payload *ListPayloadQL, errorsOnly *bool, results *bool, contentType string) (*http.Request, error)
NewCreateMultilistRequest create the request corresponding to the create action endpoint of the multilist resource.
func (*Client) NewDeleteBackupRequest ¶
NewDeleteBackupRequest create the request corresponding to the delete action endpoint of the backup resource.
func (*Client) NewDeleteElementsRequest ¶
NewDeleteElementsRequest create the request corresponding to the delete action endpoint of the elements resource.
func (*Client) NewDeleteListsRequest ¶
NewDeleteListsRequest create the request corresponding to the delete action endpoint of the lists resource.
func (*Client) NewDeleteMultiElementsRequest ¶
func (c *Client) NewDeleteMultiElementsRequest(ctx context.Context, path string, elementIds []string) (*http.Request, error)
NewDeleteMultiElementsRequest create the request corresponding to the delete-multi action endpoint of the elements resource.
func (*Client) NewDeleteMultilistRequest ¶
func (c *Client) NewDeleteMultilistRequest(ctx context.Context, path string, allInSets []string, errorsOnly *bool, lists []string, matchMetadata *string) (*http.Request, error)
NewDeleteMultilistRequest create the request corresponding to the delete action endpoint of the multilist resource.
func (*Client) NewGetAllListsRequest ¶
func (c *Client) NewGetAllListsRequest(ctx context.Context, path string, afterID *string, beforeID *string, limit *int) (*http.Request, error)
NewGetAllListsRequest create the request corresponding to the get_all action endpoint of the lists resource.
func (*Client) NewGetAroundElementsRequest ¶
func (c *Client) NewGetAroundElementsRequest(ctx context.Context, path string, payload *MultiElement, range_ *int, contentType string) (*http.Request, error)
NewGetAroundElementsRequest create the request corresponding to the get-around action endpoint of the elements resource.
func (*Client) NewGetElementsRequest ¶
func (c *Client) NewGetElementsRequest(ctx context.Context, path string, range_ *int) (*http.Request, error)
NewGetElementsRequest create the request corresponding to the get action endpoint of the elements resource.
func (*Client) NewGetListsRequest ¶
func (c *Client) NewGetListsRequest(ctx context.Context, path string, topBottom *bool) (*http.Request, error)
NewGetListsRequest create the request corresponding to the get action endpoint of the lists resource.
func (*Client) NewGetMultiElementsRequest ¶
func (c *Client) NewGetMultiElementsRequest(ctx context.Context, path string, payload *MultiElement, contentType string) (*http.Request, error)
NewGetMultiElementsRequest create the request corresponding to the get-multi action endpoint of the elements resource.
func (*Client) NewGetMultilistRequest ¶
func (c *Client) NewGetMultilistRequest(ctx context.Context, path string, allInSets []string, lists []string, matchMetadata *string) (*http.Request, error)
NewGetMultilistRequest create the request corresponding to the get action endpoint of the multilist resource.
func (*Client) NewGetPercentileListsRequest ¶
func (c *Client) NewGetPercentileListsRequest(ctx context.Context, path string, fromTop *string, range_ *int) (*http.Request, error)
NewGetPercentileListsRequest create the request corresponding to the get-percentile action endpoint of the lists resource.
func (*Client) NewGetRangeListsRequest ¶
func (c *Client) NewGetRangeListsRequest(ctx context.Context, path string, fromBottom *int, fromTop *int, limit *int) (*http.Request, error)
NewGetRangeListsRequest create the request corresponding to the get-range action endpoint of the lists resource.
func (*Client) NewHealthHealthRequest ¶
NewHealthHealthRequest create the request corresponding to the health action endpoint of the health resource.
func (*Client) NewJWTJWTRequest ¶
func (c *Client) NewJWTJWTRequest(ctx context.Context, path string, scope string, expire *int, onlyElements *string, onlyLists *string) (*http.Request, error)
NewJWTJWTRequest create the request corresponding to the jwt action endpoint of the jwt resource.
func (*Client) NewPutElementsRequest ¶
func (c *Client) NewPutElementsRequest(ctx context.Context, path string, payload *Element, range_ *int, contentType string) (*http.Request, error)
NewPutElementsRequest create the request corresponding to the put action endpoint of the elements resource.
func (*Client) NewPutMultiElementsRequest ¶
func (c *Client) NewPutMultiElementsRequest(ctx context.Context, path string, payload PutMultiElementsPayload, results *bool, contentType string) (*http.Request, error)
NewPutMultiElementsRequest create the request corresponding to the put-multi action endpoint of the elements resource.
func (*Client) NewPutMultilistRequest ¶
func (c *Client) NewPutMultilistRequest(ctx context.Context, path string, payload *ListPayloadQL, errorsOnly *bool, results *bool, contentType string) (*http.Request, error)
NewPutMultilistRequest create the request corresponding to the put action endpoint of the multilist resource.
func (*Client) NewReindexListsRequest ¶
NewReindexListsRequest create the request corresponding to the reindex action endpoint of the lists resource.
func (*Client) NewReindexMultilistRequest ¶
func (c *Client) NewReindexMultilistRequest(ctx context.Context, path string, payload *ListQL, errorsOnly *bool, contentType string) (*http.Request, error)
NewReindexMultilistRequest create the request corresponding to the reindex action endpoint of the multilist resource.
func (*Client) NewRepairListsRequest ¶
func (c *Client) NewRepairListsRequest(ctx context.Context, path string, clear *bool) (*http.Request, error)
NewRepairListsRequest create the request corresponding to the repair action endpoint of the lists resource.
func (*Client) NewRestoreMultilistRequest ¶
func (c *Client) NewRestoreMultilistRequest(ctx context.Context, path string, keep *bool, listIDPrefix *string, listIDSuffix *string, src *string, srcFile *string) (*http.Request, error)
NewRestoreMultilistRequest create the request corresponding to the restore action endpoint of the multilist resource.
func (*Client) NewRootHealthRequest ¶
NewRootHealthRequest create the request corresponding to the root action endpoint of the health resource.
func (*Client) NewStatusBackupRequest ¶
NewStatusBackupRequest create the request corresponding to the status action endpoint of the backup resource.
func (*Client) NewVerifyListsRequest ¶
func (c *Client) NewVerifyListsRequest(ctx context.Context, path string, clear *bool, repair *bool) (*http.Request, error)
NewVerifyListsRequest create the request corresponding to the verify action endpoint of the lists resource.
func (*Client) NewVerifyMultilistRequest ¶
func (c *Client) NewVerifyMultilistRequest(ctx context.Context, path string, payload *ListQL, clear *bool, elements *bool, errorsOnly *bool, repair *bool, contentType string) (*http.Request, error)
NewVerifyMultilistRequest create the request corresponding to the verify action endpoint of the multilist resource.
func (*Client) PutElements ¶
func (c *Client) PutElements(ctx context.Context, path string, payload *Element, range_ *int, contentType string) (*http.Response, error)
Update element in list If element does not exist, it is created in list. Element ID in payload an url must match.
func (*Client) PutMultiElements ¶
func (c *Client) PutMultiElements(ctx context.Context, path string, payload PutMultiElementsPayload, results *bool, contentType string) (*http.Response, error)
Update Multiple Elements in list.If element does not exist, it is created in list. The returned "not_found" field will never be preset.
func (*Client) PutMultilist ¶
func (c *Client) PutMultilist(ctx context.Context, path string, payload *ListPayloadQL, errorsOnly *bool, results *bool, contentType string) (*http.Response, error)
Update multiple elements in lists
func (*Client) ReindexLists ¶
Recreates ID index on entire list
func (*Client) ReindexMultilist ¶
func (c *Client) ReindexMultilist(ctx context.Context, path string, payload *ListQL, errorsOnly *bool, contentType string) (*http.Response, error)
Reindex lists. If no lists, nor any search is specified all lists are reindexed.
func (*Client) RepairLists ¶
Repairs the list, by recreating all segments and indexes. All access to the list is blocked while operation runs.
func (*Client) RestoreMultilist ¶
func (c *Client) RestoreMultilist(ctx context.Context, path string, keep *bool, listIDPrefix *string, listIDSuffix *string, src *string, srcFile *string) (*http.Response, error)
Restore lists. Body must contain binary data with backup data, unless 'src' is specified.
func (*Client) RootHealth ¶
Ping server
func (*Client) SetJWTSigner ¶
SetJWTSigner sets the request signer for the jwt security scheme.
func (*Client) StatusBackup ¶
Return backup progress
type Element ¶
type Element struct { // ID of element ID uint64 `form:"id" json:"id" xml:"id"` // Custom payload. Stored untouched. On updates null means do not update. `{}` is the empty value. Payload json.RawMessage `form:"payload,omitempty" json:"payload,omitempty" xml:"payload,omitempty"` // Score of the element. Higher score gives higher placement. Score uint64 `form:"score" json:"score" xml:"score"` // Tie breaker, used if score matches for consistent sorting. Higher value = higher placement if score is equal. TieBreaker *uint32 `form:"tie_breaker,omitempty" json:"tie_breaker,omitempty" xml:"tie_breaker,omitempty"` }
Element user type.
type ListPayloadQL ¶
type ListPayloadQL struct { // Include all lists in these sets AllInSets []string `form:"all_in_sets,omitempty" json:"all_in_sets,omitempty" xml:"all_in_sets,omitempty"` // Include lists that match exact list names Lists []string `form:"lists,omitempty" json:"lists,omitempty" xml:"lists,omitempty"` // Include lists that match all values in metadata MatchMetadata map[string]string `form:"match_metadata,omitempty" json:"match_metadata,omitempty" xml:"match_metadata,omitempty"` // Payloads for create/update functions. // Will be ignored on deletes. Payload []*Element `form:"payload,omitempty" json:"payload,omitempty" xml:"payload,omitempty"` }
ListPayloadQL user type.
func (*ListPayloadQL) Validate ¶
func (ut *ListPayloadQL) Validate() (err error)
Validate validates the ListPayloadQL type instance.
type ListQL ¶
type ListQL struct { // Include all lists in these sets AllInSets []string `form:"all_in_sets,omitempty" json:"all_in_sets,omitempty" xml:"all_in_sets,omitempty"` // Include lists that match exact list names Lists []string `form:"lists,omitempty" json:"lists,omitempty" xml:"lists,omitempty"` // Include lists that match all values in metadata MatchMetadata map[string]string `form:"match_metadata,omitempty" json:"match_metadata,omitempty" xml:"match_metadata,omitempty"` }
ListQL user type.
type MultiElement ¶
type MultiElement struct { // IDs of elements ElementIds []uint64 `form:"element_ids" json:"element_ids" xml:"element_ids"` }
MultiElement user type.
func (*MultiElement) Validate ¶
func (ut *MultiElement) Validate() (err error)
Validate validates the MultiElement type instance.
type MultiListBackup ¶
type MultiListBackup struct { Destination *BackupDestination `form:"destination" json:"destination" xml:"destination"` Lists *ListQL `form:"lists" json:"lists" xml:"lists"` }
MultiListBackup user type.
func (*MultiListBackup) Validate ¶
func (ut *MultiListBackup) Validate() (err error)
Validate validates the MultiListBackup type instance.
type PutMultiElementsPayload ¶
type PutMultiElementsPayload []*Element
PutMultiElementsPayload is the elements put-multi action payload.
type RankList ¶
type RankList 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 `_-.` ID string `form:"id" json:"id" xml:"id"` // Load Index on server startup LoadIndex bool `form:"load_index" json:"load_index" xml:"load_index"` // Merge adjacent Segments with less than this number of entries MergeSize int `form:"merge_size" json:"merge_size" xml:"merge_size"` // Custom metadata. String to String hash. Metadata map[string]string `form:"metadata,omitempty" json:"metadata,omitempty" xml:"metadata,omitempty"` // Populate list with specified elements Populate []*Element `form:"populate,omitempty" json:"populate,omitempty" xml:"populate,omitempty"` // Set used for storage Set string `form:"set" json:"set" xml:"set"` // Split Segments larger than this number of entries SplitSize int `form:"split_size" json:"split_size" xml:"split_size"` }
RankList user type.
type RankdbBackupStatus ¶
type RankdbBackupStatus struct { // Will be true if backup was cancelled Cancelled bool `form:"cancelled" json:"cancelled" xml:"cancelled"` // Custom information provided by backup Custom map[string]string `form:"custom,omitempty" json:"custom,omitempty" xml:"custom,omitempty"` // Will be true when the backup has finished processing Done bool `form:"done" json:"done" xml:"done"` // Failed operations, indexed by list IDs Errors map[string]string `form:"errors,omitempty" json:"errors,omitempty" xml:"errors,omitempty"` // Time backup was finished Finished *time.Time `form:"finished,omitempty" json:"finished,omitempty" xml:"finished,omitempty"` // Number of lists to be backed up Lists int `form:"lists" json:"lists" xml:"lists"` // Number of lists backed up now ListsDone int `form:"lists_done" json:"lists_done" xml:"lists_done"` // Size of stored data Size int64 `form:"size" json:"size" xml:"size"` // Time backup was started Started time.Time `form:"started" json:"started" xml:"started"` // Storage used for backup Storage string `form:"storage" json:"storage" xml:"storage"` // URI of backed up content. Used for restore. URI string `form:"uri" json:"uri" xml:"uri"` }
Backup Information (default view)
Identifier: application/vnd.rankdb.backup_status+json; view=default
func (*RankdbBackupStatus) Validate ¶
func (mt *RankdbBackupStatus) Validate() (err error)
Validate validates the RankdbBackupStatus media type instance.
type RankdbBackupStatusFull ¶
type RankdbBackupStatusFull struct { // Will be true if backup was cancelled Cancelled bool `form:"cancelled" json:"cancelled" xml:"cancelled"` // Custom information provided by backup Custom map[string]string `form:"custom,omitempty" json:"custom,omitempty" xml:"custom,omitempty"` // Will be true when the backup has finished processing Done bool `form:"done" json:"done" xml:"done"` // Failed operations, indexed by list IDs Errors map[string]string `form:"errors,omitempty" json:"errors,omitempty" xml:"errors,omitempty"` // Time backup was finished Finished *time.Time `form:"finished,omitempty" json:"finished,omitempty" xml:"finished,omitempty"` // Number of lists to be backed up Lists int `form:"lists" json:"lists" xml:"lists"` // Number of lists backed up now ListsDone int `form:"lists_done" json:"lists_done" xml:"lists_done"` // Size of stored data Size int64 `form:"size" json:"size" xml:"size"` // Time backup was started Started time.Time `form:"started" json:"started" xml:"started"` // Storage used for backup Storage string `form:"storage" json:"storage" xml:"storage"` // Successful operations, list IDs Success []string `form:"success,omitempty" json:"success,omitempty" xml:"success,omitempty"` // URI of backed up content. Used for restore. URI string `form:"uri" json:"uri" xml:"uri"` }
Backup Information (full view)
Identifier: application/vnd.rankdb.backup_status+json; view=full
func (*RankdbBackupStatusFull) Validate ¶
func (mt *RankdbBackupStatusFull) Validate() (err error)
Validate validates the RankdbBackupStatusFull media type instance.
type RankdbBackupStatusTiny ¶
type RankdbBackupStatusTiny struct { // Will be true if backup was cancelled Cancelled bool `form:"cancelled" json:"cancelled" xml:"cancelled"` // Will be true when the backup has finished processing Done bool `form:"done" json:"done" xml:"done"` // Time backup was finished Finished *time.Time `form:"finished,omitempty" json:"finished,omitempty" xml:"finished,omitempty"` // Number of lists to be backed up Lists int `form:"lists" json:"lists" xml:"lists"` // Number of lists backed up now ListsDone int `form:"lists_done" json:"lists_done" xml:"lists_done"` // Size of stored data Size int64 `form:"size" json:"size" xml:"size"` // Time backup was started Started time.Time `form:"started" json:"started" xml:"started"` // URI of backed up content. Used for restore. URI string `form:"uri" json:"uri" xml:"uri"` }
Backup Information (tiny view)
Identifier: application/vnd.rankdb.backup_status+json; view=tiny
func (*RankdbBackupStatusTiny) Validate ¶
func (mt *RankdbBackupStatusTiny) Validate() (err error)
Validate validates the RankdbBackupStatusTiny media type instance.
type RankdbCallback ¶
type RankdbCallback struct { CallbackURL string `form:"callback_url" json:"callback_url" xml:"callback_url"` ID string `form:"id" json:"id" xml:"id"` }
Backup Information (default view)
Identifier: application/vnd.rankdb.callback+json; view=default
func (*RankdbCallback) Validate ¶
func (mt *RankdbCallback) Validate() (err error)
Validate validates the RankdbCallback media type instance.
type RankdbElement ¶
type RankdbElement struct { // Element rank in list from bottom. // Bottom element has value 0. FromBottom int `form:"from_bottom" json:"from_bottom" xml:"from_bottom"` // Element rank in list from top. // Top element has value 0. FromTop int `form:"from_top" json:"from_top" xml:"from_top"` // ID of element ID uint64 `form:"id" json:"id" xml:"id"` // 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 `form:"list_id" json:"list_id" xml:"list_id"` // Custom payload. Stored untouched. On updates null means do not update. `{}` is the empty value. Payload json.RawMessage `form:"payload" json:"payload" xml:"payload"` // Score of the element. Higher score gives higher placement. Score uint64 `form:"score" json:"score" xml:"score"` // Tie breaker, used if score matches for consistent sorting. Higher value = higher placement if score is equal. TieBreaker uint32 `form:"tie_breaker" json:"tie_breaker" xml:"tie_breaker"` // Date of last update UpdatedAt time.Time `form:"updated_at" json:"updated_at" xml:"updated_at"` }
List Element (default view)
Identifier: application/vnd.rankdb.element+json; view=default
func (*RankdbElement) Validate ¶
func (mt *RankdbElement) Validate() (err error)
Validate validates the RankdbElement media type instance.
type RankdbElementCollection ¶
type RankdbElementCollection []*RankdbElement
RankdbElementCollection is the media type for an array of RankdbElement (default view)
Identifier: application/vnd.rankdb.element+json; type=collection; view=default
func (RankdbElementCollection) Validate ¶
func (mt RankdbElementCollection) Validate() (err error)
Validate validates the RankdbElementCollection media type instance.
type RankdbElementFull ¶
type RankdbElementFull struct { // Element rank in list from bottom. // Bottom element has value 0. FromBottom int `form:"from_bottom" json:"from_bottom" xml:"from_bottom"` // Element rank in list from top. // Top element has value 0. FromTop int `form:"from_top" json:"from_top" xml:"from_top"` // ID of element ID uint64 `form:"id" json:"id" xml:"id"` // 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 `form:"list_id" json:"list_id" xml:"list_id"` // Local element rank in list from bottom when requesting sub-list. // Bottom element has value 0. LocalFromBottom *int `form:"local_from_bottom,omitempty" json:"local_from_bottom,omitempty" xml:"local_from_bottom,omitempty"` // Local element rank in list from top when requesting sub-list. // Top element has value 0. LocalFromTop *int `form:"local_from_top,omitempty" json:"local_from_top,omitempty" xml:"local_from_top,omitempty"` // Neighbors to current element Neighbors *struct { // Elements above the current element. // Ends with element just above current. Above RankdbElementCollection `form:"above,omitempty" json:"above,omitempty" xml:"above,omitempty"` // Elements below the current element. // Starts with element just below current. Below RankdbElementCollection `form:"below,omitempty" json:"below,omitempty" xml:"below,omitempty"` } `form:"neighbors,omitempty" json:"neighbors,omitempty" xml:"neighbors,omitempty"` // Custom payload. Stored untouched. On updates null means do not update. `{}` is the empty value. Payload json.RawMessage `form:"payload" json:"payload" xml:"payload"` // Score of the element. Higher score gives higher placement. Score uint64 `form:"score" json:"score" xml:"score"` // Tie breaker, used if score matches for consistent sorting. Higher value = higher placement if score is equal. TieBreaker uint32 `form:"tie_breaker" json:"tie_breaker" xml:"tie_breaker"` // Date of last update UpdatedAt time.Time `form:"updated_at" json:"updated_at" xml:"updated_at"` }
List Element (full view)
Identifier: application/vnd.rankdb.element+json; view=full
func (*RankdbElementFull) Validate ¶
func (mt *RankdbElementFull) Validate() (err error)
Validate validates the RankdbElementFull media type instance.
type RankdbElementFullCollection ¶
type RankdbElementFullCollection []*RankdbElementFull
RankdbElementCollection is the media type for an array of RankdbElement (full view)
Identifier: application/vnd.rankdb.element+json; type=collection; view=full
func (RankdbElementFullCollection) Validate ¶
func (mt RankdbElementFullCollection) Validate() (err error)
Validate validates the RankdbElementFullCollection media type instance.
type RankdbElementFullUpdate ¶
type RankdbElementFullUpdate struct { // Element rank in list from bottom. // Bottom element has value 0. FromBottom int `form:"from_bottom" json:"from_bottom" xml:"from_bottom"` // Element rank in list from top. // Top element has value 0. FromTop int `form:"from_top" json:"from_top" xml:"from_top"` // ID of element ID uint64 `form:"id" json:"id" xml:"id"` // 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 `form:"list_id" json:"list_id" xml:"list_id"` // Local element rank in list from bottom when requesting sub-list. // Bottom element has value 0. LocalFromBottom *int `form:"local_from_bottom,omitempty" json:"local_from_bottom,omitempty" xml:"local_from_bottom,omitempty"` // Local element rank in list from top when requesting sub-list. // Top element has value 0. LocalFromTop *int `form:"local_from_top,omitempty" json:"local_from_top,omitempty" xml:"local_from_top,omitempty"` // Neighbors to current element Neighbors *struct { // Elements above the current element. // Ends with element just above current. Above RankdbElementCollection `form:"above,omitempty" json:"above,omitempty" xml:"above,omitempty"` // Elements below the current element. // Starts with element just below current. Below RankdbElementCollection `form:"below,omitempty" json:"below,omitempty" xml:"below,omitempty"` } `form:"neighbors,omitempty" json:"neighbors,omitempty" xml:"neighbors,omitempty"` // Custom payload. Stored untouched. On updates null means do not update. `{}` is the empty value. Payload json.RawMessage `form:"payload" json:"payload" xml:"payload"` // Rank of element before update PreviousRank *RankdbElement `form:"previous_rank,omitempty" json:"previous_rank,omitempty" xml:"previous_rank,omitempty"` // Score of the element. Higher score gives higher placement. Score uint64 `form:"score" json:"score" xml:"score"` // Tie breaker, used if score matches for consistent sorting. Higher value = higher placement if score is equal. TieBreaker uint32 `form:"tie_breaker" json:"tie_breaker" xml:"tie_breaker"` // Date of last update UpdatedAt time.Time `form:"updated_at" json:"updated_at" xml:"updated_at"` }
List Element (full-update view)
Identifier: application/vnd.rankdb.element+json; view=full-update
func (*RankdbElementFullUpdate) Validate ¶
func (mt *RankdbElementFullUpdate) Validate() (err error)
Validate validates the RankdbElementFullUpdate media type instance.
type RankdbElementFullUpdateCollection ¶
type RankdbElementFullUpdateCollection []*RankdbElementFullUpdate
RankdbElementCollection is the media type for an array of RankdbElement (full-update view)
Identifier: application/vnd.rankdb.element+json; type=collection; view=full-update
func (RankdbElementFullUpdateCollection) Validate ¶
func (mt RankdbElementFullUpdateCollection) Validate() (err error)
Validate validates the RankdbElementFullUpdateCollection media type instance.
type RankdbElementTiny ¶
type RankdbElementTiny struct { // Element rank in list from bottom. // Bottom element has value 0. FromBottom int `form:"from_bottom" json:"from_bottom" xml:"from_bottom"` // Element rank in list from top. // Top element has value 0. FromTop int `form:"from_top" json:"from_top" xml:"from_top"` // ID of element ID uint64 `form:"id" json:"id" xml:"id"` // Custom payload. Stored untouched. On updates null means do not update. `{}` is the empty value. Payload json.RawMessage `form:"payload" json:"payload" xml:"payload"` // Score of the element. Higher score gives higher placement. Score uint64 `form:"score" json:"score" xml:"score"` }
List Element (tiny view)
Identifier: application/vnd.rankdb.element+json; view=tiny
func (*RankdbElementTiny) Validate ¶
func (mt *RankdbElementTiny) Validate() (err error)
Validate validates the RankdbElementTiny media type instance.
type RankdbElementTinyCollection ¶
type RankdbElementTinyCollection []*RankdbElementTiny
RankdbElementCollection is the media type for an array of RankdbElement (tiny view)
Identifier: application/vnd.rankdb.element+json; type=collection; view=tiny
func (RankdbElementTinyCollection) Validate ¶
func (mt RankdbElementTinyCollection) Validate() (err error)
Validate validates the RankdbElementTinyCollection media type instance.
type RankdbListopresult ¶
type RankdbListopresult struct { // Error, if any encountered Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` List *RankdbRanklist `form:"list,omitempty" json:"list,omitempty" xml:"list,omitempty"` }
Result of a list operation. Will contain either an error or a list. (default view)
Identifier: application/vnd.rankdb.listopresult+json; view=default
func (*RankdbListopresult) Validate ¶
func (mt *RankdbListopresult) Validate() (err error)
Validate validates the RankdbListopresult media type instance.
type RankdbListsresult ¶
type RankdbListsresult struct { Lists RankdbRanklistCollection `form:"lists" json:"lists" xml:"lists"` // The number of lists after the last element ListsAfter int `form:"lists_after" json:"lists_after" xml:"lists_after"` // The number of lists before the first element ListsBefore int `form:"lists_before" json:"lists_before" xml:"lists_before"` }
RankdbListsresult media type (default view)
Identifier: application/vnd.rankdb.listsresult+json; view=default
func (*RankdbListsresult) Validate ¶
func (mt *RankdbListsresult) Validate() (err error)
Validate validates the RankdbListsresult media type instance.
type RankdbMultielement ¶
type RankdbMultielement struct { // Elements that was found in the list, ordered by score. Found RankdbElementCollection `form:"found" json:"found" xml:"found"` // Elements that wasn't found in the list. Unordered. NotFound []uint64 `form:"not_found,omitempty" json:"not_found,omitempty" xml:"not_found,omitempty"` }
RankdbMultielement media type (default view)
Identifier: application/vnd.rankdb.multielement+json; view=default
func (*RankdbMultielement) Validate ¶
func (mt *RankdbMultielement) Validate() (err error)
Validate validates the RankdbMultielement media type instance.
type RankdbOperationSuccess ¶
type RankdbOperationSuccess struct { // If `results` parameter was true, the resulting element is returned here. Results RankdbElementTinyCollection `form:"results,omitempty" json:"results,omitempty" xml:"results,omitempty"` }
RankdbOperation_success media type (default view)
Identifier: application/vnd.rankdb.operation_success+json; view=default
func (*RankdbOperationSuccess) Validate ¶
func (mt *RankdbOperationSuccess) Validate() (err error)
Validate validates the RankdbOperationSuccess media type instance.
type RankdbRanklist ¶
type RankdbRanklist 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 `_-.` ID string `form:"id" json:"id" xml:"id"` // Load Index on server startup LoadIndex bool `form:"load_index" json:"load_index" xml:"load_index"` // Merge adjacent Segments with less than this number of entries MergeSize int `form:"merge_size" json:"merge_size" xml:"merge_size"` // Custom metadata. String to String hash. Metadata map[string]string `form:"metadata" json:"metadata" xml:"metadata"` // Set used for storage Set string `form:"set" json:"set" xml:"set"` // Split Segments larger than this number of entries SplitSize int `form:"split_size" json:"split_size" xml:"split_size"` }
Rank List (default view)
Identifier: application/vnd.rankdb.ranklist+json; view=default
func (*RankdbRanklist) Validate ¶
func (mt *RankdbRanklist) Validate() (err error)
Validate validates the RankdbRanklist media type instance.
type RankdbRanklistCollection ¶
type RankdbRanklistCollection []*RankdbRanklist
RankdbRanklistCollection is the media type for an array of RankdbRanklist (default view)
Identifier: application/vnd.rankdb.ranklist+json; type=collection; view=default
func (RankdbRanklistCollection) Validate ¶
func (mt RankdbRanklistCollection) Validate() (err error)
Validate validates the RankdbRanklistCollection media type instance.
type RankdbRanklistFull ¶
type RankdbRanklistFull struct { // Average number of elements per segment AvgSegmentElements float64 `form:"avg_segment_elements" json:"avg_segment_elements" xml:"avg_segment_elements"` BottomElement *RankdbElement `form:"bottom_element,omitempty" json:"bottom_element,omitempty" xml:"bottom_element,omitempty"` // Cache hits while segments have been loaded. CacheHits int `form:"cache_hits" json:"cache_hits" xml:"cache_hits"` // Cache misses while segments have been loaded. CacheMisses int `form:"cache_misses" json:"cache_misses" xml:"cache_misses"` // Cache hit percentage while segments have been loaded. CachePercent float64 `form:"cache_percent" json:"cache_percent" xml:"cache_percent"` // Number of elements in list Elements int `form:"elements" json:"elements" xml:"elements"` // 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 `_-.` ID string `form:"id" json:"id" xml:"id"` // Load Index on server startup LoadIndex bool `form:"load_index" json:"load_index" xml:"load_index"` // Merge adjacent Segments with less than this number of entries MergeSize int `form:"merge_size" json:"merge_size" xml:"merge_size"` // Custom metadata. String to String hash. Metadata map[string]string `form:"metadata" json:"metadata" xml:"metadata"` // Number of segment in list Segments int `form:"segments" json:"segments" xml:"segments"` // Set used for storage Set string `form:"set" json:"set" xml:"set"` // Split Segments larger than this number of entries SplitSize int `form:"split_size" json:"split_size" xml:"split_size"` // This element is only returned if 'top_bottom' parameter is set to true. TopElement *RankdbElement `form:"top_element,omitempty" json:"top_element,omitempty" xml:"top_element,omitempty"` }
Rank List (full view)
Identifier: application/vnd.rankdb.ranklist+json; view=full
func (*RankdbRanklistFull) Validate ¶
func (mt *RankdbRanklistFull) Validate() (err error)
Validate validates the RankdbRanklistFull media type instance.
type RankdbRanklistTiny ¶
type RankdbRanklistTiny 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 `_-.` ID string `form:"id" json:"id" xml:"id"` }
Rank List (tiny view)
Identifier: application/vnd.rankdb.ranklist+json; view=tiny
func (*RankdbRanklistTiny) Validate ¶
func (mt *RankdbRanklistTiny) Validate() (err error)
Validate validates the RankdbRanklistTiny media type instance.
type RankdbRanklistTinyCollection ¶
type RankdbRanklistTinyCollection []*RankdbRanklistTiny
RankdbRanklistCollection is the media type for an array of RankdbRanklist (tiny view)
Identifier: application/vnd.rankdb.ranklist+json; type=collection; view=tiny
func (RankdbRanklistTinyCollection) Validate ¶
func (mt RankdbRanklistTinyCollection) Validate() (err error)
Validate validates the RankdbRanklistTinyCollection media type instance.
type RankdbRestoreresult ¶
type RankdbRestoreresult struct { // Failed operations, indexed by list IDs Errors map[string]string `form:"errors" json:"errors" xml:"errors"` // Successful restore operations, indexed by list IDs Restored int `form:"restored" json:"restored" xml:"restored"` // Skipped lists, indexed by list IDs Skipped int `form:"skipped" json:"skipped" xml:"skipped"` }
RankdbRestoreresult media type (default view)
Identifier: application/vnd.rankdb.restoreresult+json; view=default
func (*RankdbRestoreresult) Validate ¶
func (mt *RankdbRestoreresult) Validate() (err error)
Validate validates the RankdbRestoreresult media type instance.
type RankdbResultlist ¶
type RankdbResultlist struct { // Failed operations, indexed by list IDs Errors map[string]string `form:"errors,omitempty" json:"errors,omitempty" xml:"errors,omitempty"` // Successful operations, indexed by list IDs Success map[string]*RankdbOperationSuccess `form:"success,omitempty" json:"success,omitempty" xml:"success,omitempty"` }
RankdbResultlist media type (default view)
Identifier: application/vnd.rankdb.resultlist+json; view=default
func (*RankdbResultlist) Validate ¶
func (mt *RankdbResultlist) Validate() (err error)
Validate validates the RankdbResultlist media type instance.
type RankdbSysinfo ¶
type RankdbSysinfo struct { // Element Cache Information ElementCache map[string]interface{} `form:"element_cache,omitempty" json:"element_cache,omitempty" xml:"element_cache,omitempty"` // Lazy saver cache information. LazySaver json.RawMessage `form:"lazy_saver,omitempty" json:"lazy_saver,omitempty" xml:"lazy_saver,omitempty"` // Memory Information Memory map[string]interface{} `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` }
System Info. The model is sparse and may contain other information. (default view)
Identifier: application/vnd.rankdb.sysinfo+json; view=default