Documentation
¶
Index ¶
- func MountBackupController(service *goa.Service, ctrl BackupController)
- func MountElementsController(service *goa.Service, ctrl ElementsController)
- func MountHealthController(service *goa.Service, ctrl HealthController)
- func MountJWTController(service *goa.Service, ctrl JWTController)
- func MountListsController(service *goa.Service, ctrl ListsController)
- func MountMultilistController(service *goa.Service, ctrl MultilistController)
- func MountStaticController(service *goa.Service, ctrl StaticController)
- func NewJWTSecurity() *goa.JWTSecurity
- func UseJWTMiddleware(service *goa.Service, middleware goa.Middleware)
- type BackupController
- type BackupDestination
- type BackupMultilistContext
- type CloneListsContext
- type CreateElementsContext
- func (ctx *CreateElementsContext) BadRequest(r error) error
- func (ctx *CreateElementsContext) Conflict(r error) error
- func (ctx *CreateElementsContext) NotFound(r error) error
- func (ctx *CreateElementsContext) OKFull(r *RankdbElementFull) error
- func (ctx *CreateElementsContext) Unauthorized(r error) error
- type CreateListsContext
- type CreateMultilistContext
- type DeleteBackupContext
- type DeleteElementsContext
- type DeleteListsContext
- type DeleteMultiElementsContext
- type DeleteMultilistContext
- type Element
- type ElementsController
- type GetAllListsContext
- type GetAroundElementsContext
- type GetElementsContext
- type GetListsContext
- type GetMultiElementsContext
- type GetMultilistContext
- type GetPercentileListsContext
- type GetRangeListsContext
- func (ctx *GetRangeListsContext) BadRequest(r error) error
- func (ctx *GetRangeListsContext) NotFound(r error) error
- func (ctx *GetRangeListsContext) OK(r RankdbElementCollection) error
- func (ctx *GetRangeListsContext) OKFull(r RankdbElementFullCollection) error
- func (ctx *GetRangeListsContext) OKFullUpdate(r RankdbElementFullUpdateCollection) error
- func (ctx *GetRangeListsContext) OKTiny(r RankdbElementTinyCollection) error
- func (ctx *GetRangeListsContext) Unauthorized(r error) error
- type HealthController
- type HealthHealthContext
- type JWTController
- type JWTJWTContext
- type ListPayloadQL
- type ListQL
- type ListsController
- type MultiElement
- type MultiListBackup
- type MultilistController
- type PutElementsContext
- type PutMultiElementsContext
- type PutMultiElementsPayload
- type PutMultilistContext
- 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
- type ReindexListsContext
- type ReindexMultilistContext
- type RepairListsContext
- type RestoreMultilistContext
- type RootHealthContext
- type StaticController
- type StatusBackupContext
- func (ctx *StatusBackupContext) NotFound(r error) error
- func (ctx *StatusBackupContext) OK(r *RankdbBackupStatus) error
- func (ctx *StatusBackupContext) OKFull(r *RankdbBackupStatusFull) error
- func (ctx *StatusBackupContext) OKTiny(r *RankdbBackupStatusTiny) error
- func (ctx *StatusBackupContext) Unauthorized(r error) error
- type VerifyListsContext
- type VerifyMultilistContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MountBackupController ¶
func MountBackupController(service *goa.Service, ctrl BackupController)
MountBackupController "mounts" a Backup resource controller on the given service.
func MountElementsController ¶
func MountElementsController(service *goa.Service, ctrl ElementsController)
MountElementsController "mounts" a Elements resource controller on the given service.
func MountHealthController ¶
func MountHealthController(service *goa.Service, ctrl HealthController)
MountHealthController "mounts" a Health resource controller on the given service.
func MountJWTController ¶
func MountJWTController(service *goa.Service, ctrl JWTController)
MountJWTController "mounts" a JWT resource controller on the given service.
func MountListsController ¶
func MountListsController(service *goa.Service, ctrl ListsController)
MountListsController "mounts" a Lists resource controller on the given service.
func MountMultilistController ¶
func MountMultilistController(service *goa.Service, ctrl MultilistController)
MountMultilistController "mounts" a Multilist resource controller on the given service.
func MountStaticController ¶
func MountStaticController(service *goa.Service, ctrl StaticController)
MountStaticController "mounts" a Static resource controller on the given service.
func NewJWTSecurity ¶
func NewJWTSecurity() *goa.JWTSecurity
NewJWTSecurity creates a jwt security definition.
func UseJWTMiddleware ¶
func UseJWTMiddleware(service *goa.Service, middleware goa.Middleware)
UseJWTMiddleware mounts the jwt auth middleware onto the service.
Types ¶
type BackupController ¶
type BackupController interface {
goa.Muxer
Delete(*DeleteBackupContext) error
Status(*StatusBackupContext) error
}
BackupController is the controller interface for the Backup actions.
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" yaml:"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 `` /* 154-byte string literal not displayed */
// 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 `` /* 154-byte string literal not displayed */
// Specifies the destination type of the backup. Can be 'file' 'download', 's3' or 'server'
Type string `form:"type" json:"type" yaml:"type" xml:"type"`
}
BackupDestination user type.
func (*BackupDestination) Validate ¶
func (ut *BackupDestination) Validate() (err error)
Validate validates the BackupDestination type instance.
type BackupMultilistContext ¶
type BackupMultilistContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
Payload *MultiListBackup
}
BackupMultilistContext provides the multilist backup action context.
func NewBackupMultilistContext ¶
func NewBackupMultilistContext(ctx context.Context, r *http.Request, service *goa.Service) (*BackupMultilistContext, error)
NewBackupMultilistContext parses the incoming request URL and body, performs validations and creates the context used by the multilist controller backup action.
func (*BackupMultilistContext) BadRequest ¶
func (ctx *BackupMultilistContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*BackupMultilistContext) Created ¶
func (ctx *BackupMultilistContext) Created(r *RankdbCallback) error
Created sends a HTTP response with status code 201.
func (*BackupMultilistContext) OK ¶
func (ctx *BackupMultilistContext) OK(resp []byte) error
OK sends a HTTP response with status code 200.
func (*BackupMultilistContext) Unauthorized ¶
func (ctx *BackupMultilistContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type CloneListsContext ¶
type CloneListsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
ListID string
Payload *RankList
}
CloneListsContext provides the lists clone action context.
func NewCloneListsContext ¶
func NewCloneListsContext(ctx context.Context, r *http.Request, service *goa.Service) (*CloneListsContext, error)
NewCloneListsContext parses the incoming request URL and body, performs validations and creates the context used by the lists controller clone action.
func (*CloneListsContext) BadRequest ¶
func (ctx *CloneListsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*CloneListsContext) Conflict ¶
func (ctx *CloneListsContext) Conflict(r error) error
Conflict sends a HTTP response with status code 409.
func (*CloneListsContext) NotFound ¶
func (ctx *CloneListsContext) NotFound(r error) error
NotFound sends a HTTP response with status code 404.
func (*CloneListsContext) OKFull ¶
func (ctx *CloneListsContext) OKFull(r *RankdbRanklistFull) error
OKFull sends a HTTP response with status code 200.
func (*CloneListsContext) Unauthorized ¶
func (ctx *CloneListsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type CreateElementsContext ¶
type CreateElementsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
ListID string
Range int
Payload *Element
}
CreateElementsContext provides the elements create action context.
func NewCreateElementsContext ¶
func NewCreateElementsContext(ctx context.Context, r *http.Request, service *goa.Service) (*CreateElementsContext, error)
NewCreateElementsContext parses the incoming request URL and body, performs validations and creates the context used by the elements controller create action.
func (*CreateElementsContext) BadRequest ¶
func (ctx *CreateElementsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*CreateElementsContext) Conflict ¶
func (ctx *CreateElementsContext) Conflict(r error) error
Conflict sends a HTTP response with status code 409.
func (*CreateElementsContext) NotFound ¶
func (ctx *CreateElementsContext) NotFound(r error) error
NotFound sends a HTTP response with status code 404.
func (*CreateElementsContext) OKFull ¶
func (ctx *CreateElementsContext) OKFull(r *RankdbElementFull) error
OKFull sends a HTTP response with status code 200.
func (*CreateElementsContext) Unauthorized ¶
func (ctx *CreateElementsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type CreateListsContext ¶
type CreateListsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
Replace bool
Payload *RankList
}
CreateListsContext provides the lists create action context.
func NewCreateListsContext ¶
func NewCreateListsContext(ctx context.Context, r *http.Request, service *goa.Service) (*CreateListsContext, error)
NewCreateListsContext parses the incoming request URL and body, performs validations and creates the context used by the lists controller create action.
func (*CreateListsContext) BadRequest ¶
func (ctx *CreateListsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*CreateListsContext) Conflict ¶
func (ctx *CreateListsContext) Conflict(r error) error
Conflict sends a HTTP response with status code 409.
func (*CreateListsContext) OKFull ¶
func (ctx *CreateListsContext) OKFull(r *RankdbRanklistFull) error
OKFull sends a HTTP response with status code 200.
func (*CreateListsContext) Unauthorized ¶
func (ctx *CreateListsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type CreateMultilistContext ¶
type CreateMultilistContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
ErrorsOnly bool
Results bool
Payload *ListPayloadQL
}
CreateMultilistContext provides the multilist create action context.
func NewCreateMultilistContext ¶
func NewCreateMultilistContext(ctx context.Context, r *http.Request, service *goa.Service) (*CreateMultilistContext, error)
NewCreateMultilistContext parses the incoming request URL and body, performs validations and creates the context used by the multilist controller create action.
func (*CreateMultilistContext) BadRequest ¶
func (ctx *CreateMultilistContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*CreateMultilistContext) OK ¶
func (ctx *CreateMultilistContext) OK(r *RankdbResultlist) error
OK sends a HTTP response with status code 200.
func (*CreateMultilistContext) Unauthorized ¶
func (ctx *CreateMultilistContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type DeleteBackupContext ¶
type DeleteBackupContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
BackupID string
}
DeleteBackupContext provides the backup delete action context.
func NewDeleteBackupContext ¶
func NewDeleteBackupContext(ctx context.Context, r *http.Request, service *goa.Service) (*DeleteBackupContext, error)
NewDeleteBackupContext parses the incoming request URL and body, performs validations and creates the context used by the backup controller delete action.
func (*DeleteBackupContext) NoContent ¶
func (ctx *DeleteBackupContext) NoContent() error
NoContent sends a HTTP response with status code 204.
func (*DeleteBackupContext) NotFound ¶
func (ctx *DeleteBackupContext) NotFound(r error) error
NotFound sends a HTTP response with status code 404.
func (*DeleteBackupContext) Unauthorized ¶
func (ctx *DeleteBackupContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type DeleteElementsContext ¶
type DeleteElementsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
ElementID string
ListID string
}
DeleteElementsContext provides the elements delete action context.
func NewDeleteElementsContext ¶
func NewDeleteElementsContext(ctx context.Context, r *http.Request, service *goa.Service) (*DeleteElementsContext, error)
NewDeleteElementsContext parses the incoming request URL and body, performs validations and creates the context used by the elements controller delete action.
func (*DeleteElementsContext) BadRequest ¶
func (ctx *DeleteElementsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*DeleteElementsContext) NoContent ¶
func (ctx *DeleteElementsContext) NoContent() error
NoContent sends a HTTP response with status code 204.
func (*DeleteElementsContext) NotFound ¶
func (ctx *DeleteElementsContext) NotFound(r error) error
NotFound sends a HTTP response with status code 404.
func (*DeleteElementsContext) Unauthorized ¶
func (ctx *DeleteElementsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type DeleteListsContext ¶
type DeleteListsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
ListID string
}
DeleteListsContext provides the lists delete action context.
func NewDeleteListsContext ¶
func NewDeleteListsContext(ctx context.Context, r *http.Request, service *goa.Service) (*DeleteListsContext, error)
NewDeleteListsContext parses the incoming request URL and body, performs validations and creates the context used by the lists controller delete action.
func (*DeleteListsContext) BadRequest ¶
func (ctx *DeleteListsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*DeleteListsContext) NoContent ¶
func (ctx *DeleteListsContext) NoContent() error
NoContent sends a HTTP response with status code 204.
func (*DeleteListsContext) Unauthorized ¶
func (ctx *DeleteListsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type DeleteMultiElementsContext ¶
type DeleteMultiElementsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
ElementIds []string
ListID string
}
DeleteMultiElementsContext provides the elements delete-multi action context.
func NewDeleteMultiElementsContext ¶
func NewDeleteMultiElementsContext(ctx context.Context, r *http.Request, service *goa.Service) (*DeleteMultiElementsContext, error)
NewDeleteMultiElementsContext parses the incoming request URL and body, performs validations and creates the context used by the elements controller delete-multi action.
func (*DeleteMultiElementsContext) BadRequest ¶
func (ctx *DeleteMultiElementsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*DeleteMultiElementsContext) NoContent ¶
func (ctx *DeleteMultiElementsContext) NoContent() error
NoContent sends a HTTP response with status code 204.
func (*DeleteMultiElementsContext) NotFound ¶
func (ctx *DeleteMultiElementsContext) NotFound(r error) error
NotFound sends a HTTP response with status code 404.
func (*DeleteMultiElementsContext) Unauthorized ¶
func (ctx *DeleteMultiElementsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type DeleteMultilistContext ¶
type DeleteMultilistContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
AllInSets []string
ElementID string
ErrorsOnly bool
Lists []string
MatchMetadata *string
}
DeleteMultilistContext provides the multilist delete action context.
func NewDeleteMultilistContext ¶
func NewDeleteMultilistContext(ctx context.Context, r *http.Request, service *goa.Service) (*DeleteMultilistContext, error)
NewDeleteMultilistContext parses the incoming request URL and body, performs validations and creates the context used by the multilist controller delete action.
func (*DeleteMultilistContext) BadRequest ¶
func (ctx *DeleteMultilistContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*DeleteMultilistContext) OK ¶
func (ctx *DeleteMultilistContext) OK(r *RankdbResultlist) error
OK sends a HTTP response with status code 200.
func (*DeleteMultilistContext) Unauthorized ¶
func (ctx *DeleteMultilistContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type Element ¶
type Element struct {
// ID of element
ID uint64 `form:"id" json:"id" yaml:"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" yaml:"payload,omitempty" xml:"payload,omitempty"`
// Score of the element. Higher score gives higher placement.
Score uint64 `form:"score" json:"score" yaml:"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" yaml:"tie_breaker,omitempty" xml:"tie_breaker,omitempty"`
}
Element user type.
type ElementsController ¶
type ElementsController interface {
goa.Muxer
Create(*CreateElementsContext) error
Delete(*DeleteElementsContext) error
DeleteMulti(*DeleteMultiElementsContext) error
Get(*GetElementsContext) error
GetAround(*GetAroundElementsContext) error
GetMulti(*GetMultiElementsContext) error
Put(*PutElementsContext) error
PutMulti(*PutMultiElementsContext) error
}
ElementsController is the controller interface for the Elements actions.
type GetAllListsContext ¶
type GetAllListsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
AfterID string
BeforeID string
Limit int
}
GetAllListsContext provides the lists get_all action context.
func NewGetAllListsContext ¶
func NewGetAllListsContext(ctx context.Context, r *http.Request, service *goa.Service) (*GetAllListsContext, error)
NewGetAllListsContext parses the incoming request URL and body, performs validations and creates the context used by the lists controller get_all action.
func (*GetAllListsContext) BadRequest ¶
func (ctx *GetAllListsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*GetAllListsContext) OK ¶
func (ctx *GetAllListsContext) OK(r *RankdbListsresult) error
OK sends a HTTP response with status code 200.
func (*GetAllListsContext) Unauthorized ¶
func (ctx *GetAllListsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type GetAroundElementsContext ¶
type GetAroundElementsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
ElementID string
ListID string
Range int
Payload *MultiElement
}
GetAroundElementsContext provides the elements get-around action context.
func NewGetAroundElementsContext ¶
func NewGetAroundElementsContext(ctx context.Context, r *http.Request, service *goa.Service) (*GetAroundElementsContext, error)
NewGetAroundElementsContext parses the incoming request URL and body, performs validations and creates the context used by the elements controller get-around action.
func (*GetAroundElementsContext) BadRequest ¶
func (ctx *GetAroundElementsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*GetAroundElementsContext) NotFound ¶
func (ctx *GetAroundElementsContext) NotFound(r error) error
NotFound sends a HTTP response with status code 404.
func (*GetAroundElementsContext) OKFull ¶
func (ctx *GetAroundElementsContext) OKFull(r *RankdbElementFull) error
OKFull sends a HTTP response with status code 200.
func (*GetAroundElementsContext) Unauthorized ¶
func (ctx *GetAroundElementsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type GetElementsContext ¶
type GetElementsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
ElementID string
ListID string
Range int
}
GetElementsContext provides the elements get action context.
func NewGetElementsContext ¶
func NewGetElementsContext(ctx context.Context, r *http.Request, service *goa.Service) (*GetElementsContext, error)
NewGetElementsContext parses the incoming request URL and body, performs validations and creates the context used by the elements controller get action.
func (*GetElementsContext) BadRequest ¶
func (ctx *GetElementsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*GetElementsContext) NotFound ¶
func (ctx *GetElementsContext) NotFound(r error) error
NotFound sends a HTTP response with status code 404.
func (*GetElementsContext) OKFull ¶
func (ctx *GetElementsContext) OKFull(r *RankdbElementFull) error
OKFull sends a HTTP response with status code 200.
func (*GetElementsContext) Unauthorized ¶
func (ctx *GetElementsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type GetListsContext ¶
type GetListsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
ListID string
TopBottom bool
}
GetListsContext provides the lists get action context.
func NewGetListsContext ¶
func NewGetListsContext(ctx context.Context, r *http.Request, service *goa.Service) (*GetListsContext, error)
NewGetListsContext parses the incoming request URL and body, performs validations and creates the context used by the lists controller get action.
func (*GetListsContext) BadRequest ¶
func (ctx *GetListsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*GetListsContext) NotFound ¶
func (ctx *GetListsContext) NotFound(r error) error
NotFound sends a HTTP response with status code 404.
func (*GetListsContext) OKFull ¶
func (ctx *GetListsContext) OKFull(r *RankdbRanklistFull) error
OKFull sends a HTTP response with status code 200.
func (*GetListsContext) Unauthorized ¶
func (ctx *GetListsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type GetMultiElementsContext ¶
type GetMultiElementsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
ListID string
Payload *MultiElement
}
GetMultiElementsContext provides the elements get-multi action context.
func NewGetMultiElementsContext ¶
func NewGetMultiElementsContext(ctx context.Context, r *http.Request, service *goa.Service) (*GetMultiElementsContext, error)
NewGetMultiElementsContext parses the incoming request URL and body, performs validations and creates the context used by the elements controller get-multi action.
func (*GetMultiElementsContext) BadRequest ¶
func (ctx *GetMultiElementsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*GetMultiElementsContext) NotFound ¶
func (ctx *GetMultiElementsContext) NotFound(r error) error
NotFound sends a HTTP response with status code 404.
func (*GetMultiElementsContext) OK ¶
func (ctx *GetMultiElementsContext) OK(r *RankdbMultielement) error
OK sends a HTTP response with status code 200.
func (*GetMultiElementsContext) Unauthorized ¶
func (ctx *GetMultiElementsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type GetMultilistContext ¶
type GetMultilistContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
AllInSets []string
ElementID string
Lists []string
MatchMetadata *string
}
GetMultilistContext provides the multilist get action context.
func NewGetMultilistContext ¶
func NewGetMultilistContext(ctx context.Context, r *http.Request, service *goa.Service) (*GetMultilistContext, error)
NewGetMultilistContext parses the incoming request URL and body, performs validations and creates the context used by the multilist controller get action.
func (*GetMultilistContext) BadRequest ¶
func (ctx *GetMultilistContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*GetMultilistContext) OK ¶
func (ctx *GetMultilistContext) OK(r *RankdbResultlist) error
OK sends a HTTP response with status code 200.
func (*GetMultilistContext) Unauthorized ¶
func (ctx *GetMultilistContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type GetPercentileListsContext ¶
type GetPercentileListsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
FromTop string
ListID string
Range int
}
GetPercentileListsContext provides the lists get-percentile action context.
func NewGetPercentileListsContext ¶
func NewGetPercentileListsContext(ctx context.Context, r *http.Request, service *goa.Service) (*GetPercentileListsContext, error)
NewGetPercentileListsContext parses the incoming request URL and body, performs validations and creates the context used by the lists controller get-percentile action.
func (*GetPercentileListsContext) BadRequest ¶
func (ctx *GetPercentileListsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*GetPercentileListsContext) NotFound ¶
func (ctx *GetPercentileListsContext) NotFound(r error) error
NotFound sends a HTTP response with status code 404.
func (*GetPercentileListsContext) OKFull ¶
func (ctx *GetPercentileListsContext) OKFull(r *RankdbElementFull) error
OKFull sends a HTTP response with status code 200.
func (*GetPercentileListsContext) Unauthorized ¶
func (ctx *GetPercentileListsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type GetRangeListsContext ¶
type GetRangeListsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
FromBottom *int
FromTop *int
Limit int
ListID string
}
GetRangeListsContext provides the lists get-range action context.
func NewGetRangeListsContext ¶
func NewGetRangeListsContext(ctx context.Context, r *http.Request, service *goa.Service) (*GetRangeListsContext, error)
NewGetRangeListsContext parses the incoming request URL and body, performs validations and creates the context used by the lists controller get-range action.
func (*GetRangeListsContext) BadRequest ¶
func (ctx *GetRangeListsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*GetRangeListsContext) NotFound ¶
func (ctx *GetRangeListsContext) NotFound(r error) error
NotFound sends a HTTP response with status code 404.
func (*GetRangeListsContext) OK ¶
func (ctx *GetRangeListsContext) OK(r RankdbElementCollection) error
OK sends a HTTP response with status code 200.
func (*GetRangeListsContext) OKFull ¶
func (ctx *GetRangeListsContext) OKFull(r RankdbElementFullCollection) error
OKFull sends a HTTP response with status code 200.
func (*GetRangeListsContext) OKFullUpdate ¶
func (ctx *GetRangeListsContext) OKFullUpdate(r RankdbElementFullUpdateCollection) error
OKFullUpdate sends a HTTP response with status code 200.
func (*GetRangeListsContext) OKTiny ¶
func (ctx *GetRangeListsContext) OKTiny(r RankdbElementTinyCollection) error
OKTiny sends a HTTP response with status code 200.
func (*GetRangeListsContext) Unauthorized ¶
func (ctx *GetRangeListsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type HealthController ¶
type HealthController interface {
goa.Muxer
Health(*HealthHealthContext) error
Root(*RootHealthContext) error
}
HealthController is the controller interface for the Health actions.
type HealthHealthContext ¶
type HealthHealthContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
}
HealthHealthContext provides the health health action context.
func NewHealthHealthContext ¶
func NewHealthHealthContext(ctx context.Context, r *http.Request, service *goa.Service) (*HealthHealthContext, error)
NewHealthHealthContext parses the incoming request URL and body, performs validations and creates the context used by the health controller health action.
func (*HealthHealthContext) OK ¶
func (ctx *HealthHealthContext) OK(r *RankdbSysinfo) error
OK sends a HTTP response with status code 200.
func (*HealthHealthContext) Unauthorized ¶
func (ctx *HealthHealthContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type JWTController ¶
type JWTController interface {
goa.Muxer
JWT(*JWTJWTContext) error
}
JWTController is the controller interface for the JWT actions.
type JWTJWTContext ¶
type JWTJWTContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
Expire int
OnlyElements *string
OnlyLists *string
Scope string
}
JWTJWTContext provides the jwt jwt action context.
func NewJWTJWTContext ¶
func NewJWTJWTContext(ctx context.Context, r *http.Request, service *goa.Service) (*JWTJWTContext, error)
NewJWTJWTContext parses the incoming request URL and body, performs validations and creates the context used by the jwt controller jwt action.
func (*JWTJWTContext) OK ¶
func (ctx *JWTJWTContext) OK(resp []byte) error
OK sends a HTTP response with status code 200.
func (*JWTJWTContext) Unauthorized ¶
func (ctx *JWTJWTContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type ListPayloadQL ¶
type ListPayloadQL struct {
// Include all lists in these sets
AllInSets []string `form:"all_in_sets,omitempty" json:"all_in_sets,omitempty" yaml:"all_in_sets,omitempty" xml:"all_in_sets,omitempty"`
// Include lists that match exact list names
Lists []string `form:"lists,omitempty" json:"lists,omitempty" yaml:"lists,omitempty" xml:"lists,omitempty"`
// Include lists that match all values in metadata
MatchMetadata map[string]string `` /* 126-byte string literal not displayed */
// Payloads for create/update functions.
// Will be ignored on deletes.
Payload []*Element `form:"payload,omitempty" json:"payload,omitempty" yaml:"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" yaml:"all_in_sets,omitempty" xml:"all_in_sets,omitempty"`
// Include lists that match exact list names
Lists []string `form:"lists,omitempty" json:"lists,omitempty" yaml:"lists,omitempty" xml:"lists,omitempty"`
// Include lists that match all values in metadata
MatchMetadata map[string]string `` /* 126-byte string literal not displayed */
}
ListQL user type.
type ListsController ¶
type ListsController interface {
goa.Muxer
Clone(*CloneListsContext) error
Create(*CreateListsContext) error
Delete(*DeleteListsContext) error
Get(*GetListsContext) error
GetPercentile(*GetPercentileListsContext) error
GetRange(*GetRangeListsContext) error
GetAll(*GetAllListsContext) error
Reindex(*ReindexListsContext) error
Repair(*RepairListsContext) error
Verify(*VerifyListsContext) error
}
ListsController is the controller interface for the Lists actions.
type MultiElement ¶
type MultiElement struct {
// IDs of elements
ElementIds []uint64 `form:"element_ids" json:"element_ids" yaml:"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" yaml:"destination" xml:"destination"`
Lists *ListQL `form:"lists" json:"lists" yaml:"lists" xml:"lists"`
}
MultiListBackup user type.
func (*MultiListBackup) Validate ¶
func (ut *MultiListBackup) Validate() (err error)
Validate validates the MultiListBackup type instance.
type MultilistController ¶
type MultilistController interface {
goa.Muxer
Backup(*BackupMultilistContext) error
Create(*CreateMultilistContext) error
Delete(*DeleteMultilistContext) error
Get(*GetMultilistContext) error
Put(*PutMultilistContext) error
Reindex(*ReindexMultilistContext) error
Restore(*RestoreMultilistContext) error
Verify(*VerifyMultilistContext) error
}
MultilistController is the controller interface for the Multilist actions.
type PutElementsContext ¶
type PutElementsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
ElementID string
ListID string
Range int
Payload *Element
}
PutElementsContext provides the elements put action context.
func NewPutElementsContext ¶
func NewPutElementsContext(ctx context.Context, r *http.Request, service *goa.Service) (*PutElementsContext, error)
NewPutElementsContext parses the incoming request URL and body, performs validations and creates the context used by the elements controller put action.
func (*PutElementsContext) BadRequest ¶
func (ctx *PutElementsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*PutElementsContext) NotFound ¶
func (ctx *PutElementsContext) NotFound(r error) error
NotFound sends a HTTP response with status code 404.
func (*PutElementsContext) OKFullUpdate ¶
func (ctx *PutElementsContext) OKFullUpdate(r *RankdbElementFullUpdate) error
OKFullUpdate sends a HTTP response with status code 200.
func (*PutElementsContext) Unauthorized ¶
func (ctx *PutElementsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type PutMultiElementsContext ¶
type PutMultiElementsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
ListID string
Results bool
Payload PutMultiElementsPayload
}
PutMultiElementsContext provides the elements put-multi action context.
func NewPutMultiElementsContext ¶
func NewPutMultiElementsContext(ctx context.Context, r *http.Request, service *goa.Service) (*PutMultiElementsContext, error)
NewPutMultiElementsContext parses the incoming request URL and body, performs validations and creates the context used by the elements controller put-multi action.
func (*PutMultiElementsContext) BadRequest ¶
func (ctx *PutMultiElementsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*PutMultiElementsContext) NotFound ¶
func (ctx *PutMultiElementsContext) NotFound(r error) error
NotFound sends a HTTP response with status code 404.
func (*PutMultiElementsContext) OK ¶
func (ctx *PutMultiElementsContext) OK(r *RankdbMultielement) error
OK sends a HTTP response with status code 200.
func (*PutMultiElementsContext) Unauthorized ¶
func (ctx *PutMultiElementsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type PutMultiElementsPayload ¶
type PutMultiElementsPayload []*Element
PutMultiElementsPayload is the elements put-multi action payload.
func (PutMultiElementsPayload) Validate ¶
func (payload PutMultiElementsPayload) Validate() (err error)
Validate runs the validation rules defined in the design.
type PutMultilistContext ¶
type PutMultilistContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
ErrorsOnly bool
Results bool
Payload *ListPayloadQL
}
PutMultilistContext provides the multilist put action context.
func NewPutMultilistContext ¶
func NewPutMultilistContext(ctx context.Context, r *http.Request, service *goa.Service) (*PutMultilistContext, error)
NewPutMultilistContext parses the incoming request URL and body, performs validations and creates the context used by the multilist controller put action.
func (*PutMultilistContext) BadRequest ¶
func (ctx *PutMultilistContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*PutMultilistContext) OK ¶
func (ctx *PutMultilistContext) OK(r *RankdbResultlist) error
OK sends a HTTP response with status code 200.
func (*PutMultilistContext) Unauthorized ¶
func (ctx *PutMultilistContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
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" yaml:"id" xml:"id"`
// Load Index on server startup
LoadIndex bool `form:"load_index" json:"load_index" yaml:"load_index" xml:"load_index"`
// Merge adjacent Segments with less than this number of entries
MergeSize int `form:"merge_size" json:"merge_size" yaml:"merge_size" xml:"merge_size"`
// Custom metadata. String to String hash.
Metadata map[string]string `form:"metadata,omitempty" json:"metadata,omitempty" yaml:"metadata,omitempty" xml:"metadata,omitempty"`
// Populate list with specified elements
Populate []*Element `form:"populate,omitempty" json:"populate,omitempty" yaml:"populate,omitempty" xml:"populate,omitempty"`
// Set used for storage
Set string `form:"set" json:"set" yaml:"set" xml:"set"`
// Split Segments larger than this number of entries
SplitSize int `form:"split_size" json:"split_size" yaml:"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" yaml:"cancelled" xml:"cancelled"`
// Custom information provided by backup
Custom map[string]string `form:"custom,omitempty" json:"custom,omitempty" yaml:"custom,omitempty" xml:"custom,omitempty"`
// Will be true when the backup has finished processing
Done bool `form:"done" json:"done" yaml:"done" xml:"done"`
// Failed operations, indexed by list IDs
Errors map[string]string `form:"errors,omitempty" json:"errors,omitempty" yaml:"errors,omitempty" xml:"errors,omitempty"`
// Time backup was finished
Finished *time.Time `form:"finished,omitempty" json:"finished,omitempty" yaml:"finished,omitempty" xml:"finished,omitempty"`
// Number of lists to be backed up
Lists int `form:"lists" json:"lists" yaml:"lists" xml:"lists"`
// Number of lists backed up now
ListsDone int `form:"lists_done" json:"lists_done" yaml:"lists_done" xml:"lists_done"`
// Size of stored data
Size int64 `form:"size" json:"size" yaml:"size" xml:"size"`
// Time backup was started
Started time.Time `form:"started" json:"started" yaml:"started" xml:"started"`
// Storage used for backup
Storage string `form:"storage" json:"storage" yaml:"storage" xml:"storage"`
// URI of backed up content. Used for restore.
URI string `form:"uri" json:"uri" yaml:"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" yaml:"cancelled" xml:"cancelled"`
// Custom information provided by backup
Custom map[string]string `form:"custom,omitempty" json:"custom,omitempty" yaml:"custom,omitempty" xml:"custom,omitempty"`
// Will be true when the backup has finished processing
Done bool `form:"done" json:"done" yaml:"done" xml:"done"`
// Failed operations, indexed by list IDs
Errors map[string]string `form:"errors,omitempty" json:"errors,omitempty" yaml:"errors,omitempty" xml:"errors,omitempty"`
// Time backup was finished
Finished *time.Time `form:"finished,omitempty" json:"finished,omitempty" yaml:"finished,omitempty" xml:"finished,omitempty"`
// Number of lists to be backed up
Lists int `form:"lists" json:"lists" yaml:"lists" xml:"lists"`
// Number of lists backed up now
ListsDone int `form:"lists_done" json:"lists_done" yaml:"lists_done" xml:"lists_done"`
// Size of stored data
Size int64 `form:"size" json:"size" yaml:"size" xml:"size"`
// Time backup was started
Started time.Time `form:"started" json:"started" yaml:"started" xml:"started"`
// Storage used for backup
Storage string `form:"storage" json:"storage" yaml:"storage" xml:"storage"`
// Successful operations, list IDs
Success []string `form:"success,omitempty" json:"success,omitempty" yaml:"success,omitempty" xml:"success,omitempty"`
// URI of backed up content. Used for restore.
URI string `form:"uri" json:"uri" yaml:"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" yaml:"cancelled" xml:"cancelled"`
// Will be true when the backup has finished processing
Done bool `form:"done" json:"done" yaml:"done" xml:"done"`
// Time backup was finished
Finished *time.Time `form:"finished,omitempty" json:"finished,omitempty" yaml:"finished,omitempty" xml:"finished,omitempty"`
// Number of lists to be backed up
Lists int `form:"lists" json:"lists" yaml:"lists" xml:"lists"`
// Number of lists backed up now
ListsDone int `form:"lists_done" json:"lists_done" yaml:"lists_done" xml:"lists_done"`
// Size of stored data
Size int64 `form:"size" json:"size" yaml:"size" xml:"size"`
// Time backup was started
Started time.Time `form:"started" json:"started" yaml:"started" xml:"started"`
// URI of backed up content. Used for restore.
URI string `form:"uri" json:"uri" yaml:"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" yaml:"callback_url" xml:"callback_url"`
ID string `form:"id" json:"id" yaml:"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" yaml:"from_bottom" xml:"from_bottom"`
// Element rank in list from top.
// Top element has value 0.
FromTop int `form:"from_top" json:"from_top" yaml:"from_top" xml:"from_top"`
// ID of element
ID uint64 `form:"id" json:"id" yaml:"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" yaml:"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" yaml:"payload" xml:"payload"`
// Score of the element. Higher score gives higher placement.
Score uint64 `form:"score" json:"score" yaml:"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" yaml:"tie_breaker" xml:"tie_breaker"`
// Date of last update
UpdatedAt time.Time `form:"updated_at" json:"updated_at" yaml:"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" yaml:"from_bottom" xml:"from_bottom"`
// Element rank in list from top.
// Top element has value 0.
FromTop int `form:"from_top" json:"from_top" yaml:"from_top" xml:"from_top"`
// ID of element
ID uint64 `form:"id" json:"id" yaml:"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" yaml:"list_id" xml:"list_id"`
// Local element rank in list from bottom when requesting sub-list.
// Bottom element has value 0.
LocalFromBottom *int `` /* 138-byte string literal not displayed */
// Local element rank in list from top when requesting sub-list.
// Top element has value 0.
LocalFromTop *int `` /* 126-byte string literal not displayed */
// 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" yaml:"above,omitempty" xml:"above,omitempty"`
// Elements below the current element.
// Starts with element just below current.
Below RankdbElementCollection `form:"below,omitempty" json:"below,omitempty" yaml:"below,omitempty" xml:"below,omitempty"`
} `form:"neighbors,omitempty" json:"neighbors,omitempty" yaml:"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" yaml:"payload" xml:"payload"`
// Score of the element. Higher score gives higher placement.
Score uint64 `form:"score" json:"score" yaml:"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" yaml:"tie_breaker" xml:"tie_breaker"`
// Date of last update
UpdatedAt time.Time `form:"updated_at" json:"updated_at" yaml:"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" yaml:"from_bottom" xml:"from_bottom"`
// Element rank in list from top.
// Top element has value 0.
FromTop int `form:"from_top" json:"from_top" yaml:"from_top" xml:"from_top"`
// ID of element
ID uint64 `form:"id" json:"id" yaml:"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" yaml:"list_id" xml:"list_id"`
// Local element rank in list from bottom when requesting sub-list.
// Bottom element has value 0.
LocalFromBottom *int `` /* 138-byte string literal not displayed */
// Local element rank in list from top when requesting sub-list.
// Top element has value 0.
LocalFromTop *int `` /* 126-byte string literal not displayed */
// 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" yaml:"above,omitempty" xml:"above,omitempty"`
// Elements below the current element.
// Starts with element just below current.
Below RankdbElementCollection `form:"below,omitempty" json:"below,omitempty" yaml:"below,omitempty" xml:"below,omitempty"`
} `form:"neighbors,omitempty" json:"neighbors,omitempty" yaml:"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" yaml:"payload" xml:"payload"`
// Rank of element before update
PreviousRank *RankdbElement `form:"previous_rank,omitempty" json:"previous_rank,omitempty" yaml:"previous_rank,omitempty" xml:"previous_rank,omitempty"`
// Score of the element. Higher score gives higher placement.
Score uint64 `form:"score" json:"score" yaml:"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" yaml:"tie_breaker" xml:"tie_breaker"`
// Date of last update
UpdatedAt time.Time `form:"updated_at" json:"updated_at" yaml:"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" yaml:"from_bottom" xml:"from_bottom"`
// Element rank in list from top.
// Top element has value 0.
FromTop int `form:"from_top" json:"from_top" yaml:"from_top" xml:"from_top"`
// ID of element
ID uint64 `form:"id" json:"id" yaml:"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" yaml:"payload" xml:"payload"`
// Score of the element. Higher score gives higher placement.
Score uint64 `form:"score" json:"score" yaml:"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" yaml:"error,omitempty" xml:"error,omitempty"`
List *RankdbRanklist `form:"list,omitempty" json:"list,omitempty" yaml:"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" yaml:"lists" xml:"lists"`
// The number of lists after the last element
ListsAfter int `form:"lists_after" json:"lists_after" yaml:"lists_after" xml:"lists_after"`
// The number of lists before the first element
ListsBefore int `form:"lists_before" json:"lists_before" yaml:"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" yaml:"found" xml:"found"`
// Elements that wasn't found in the list. Unordered.
NotFound []uint64 `form:"not_found,omitempty" json:"not_found,omitempty" yaml:"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" yaml:"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" yaml:"id" xml:"id"`
// Load Index on server startup
LoadIndex bool `form:"load_index" json:"load_index" yaml:"load_index" xml:"load_index"`
// Merge adjacent Segments with less than this number of entries
MergeSize int `form:"merge_size" json:"merge_size" yaml:"merge_size" xml:"merge_size"`
// Custom metadata. String to String hash.
Metadata map[string]string `form:"metadata" json:"metadata" yaml:"metadata" xml:"metadata"`
// Set used for storage
Set string `form:"set" json:"set" yaml:"set" xml:"set"`
// Split Segments larger than this number of entries
SplitSize int `form:"split_size" json:"split_size" yaml:"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" yaml:"avg_segment_elements" xml:"avg_segment_elements"`
BottomElement *RankdbElement `` /* 126-byte string literal not displayed */
// Cache hits while segments have been loaded.
CacheHits int `form:"cache_hits" json:"cache_hits" yaml:"cache_hits" xml:"cache_hits"`
// Cache misses while segments have been loaded.
CacheMisses int `form:"cache_misses" json:"cache_misses" yaml:"cache_misses" xml:"cache_misses"`
// Cache hit percentage while segments have been loaded.
CachePercent float64 `form:"cache_percent" json:"cache_percent" yaml:"cache_percent" xml:"cache_percent"`
// Number of elements in list
Elements int `form:"elements" json:"elements" yaml:"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" yaml:"id" xml:"id"`
// Load Index on server startup
LoadIndex bool `form:"load_index" json:"load_index" yaml:"load_index" xml:"load_index"`
// Merge adjacent Segments with less than this number of entries
MergeSize int `form:"merge_size" json:"merge_size" yaml:"merge_size" xml:"merge_size"`
// Custom metadata. String to String hash.
Metadata map[string]string `form:"metadata" json:"metadata" yaml:"metadata" xml:"metadata"`
// Number of segment in list
Segments int `form:"segments" json:"segments" yaml:"segments" xml:"segments"`
// Set used for storage
Set string `form:"set" json:"set" yaml:"set" xml:"set"`
// Split Segments larger than this number of entries
SplitSize int `form:"split_size" json:"split_size" yaml:"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" yaml:"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" yaml:"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" yaml:"errors" xml:"errors"`
// Successful restore operations, indexed by list IDs
Restored int `form:"restored" json:"restored" yaml:"restored" xml:"restored"`
// Skipped lists, indexed by list IDs
Skipped int `form:"skipped" json:"skipped" yaml:"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" yaml:"errors,omitempty" xml:"errors,omitempty"`
// Successful operations, indexed by list IDs
Success map[string]*RankdbOperationSuccess `form:"success,omitempty" json:"success,omitempty" yaml:"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" yaml:"element_cache,omitempty" xml:"element_cache,omitempty"`
// Lazy saver cache information.
LazySaver json.RawMessage `form:"lazy_saver,omitempty" json:"lazy_saver,omitempty" yaml:"lazy_saver,omitempty" xml:"lazy_saver,omitempty"`
// Memory Information
Memory map[string]interface{} `form:"memory,omitempty" json:"memory,omitempty" yaml:"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
type ReindexListsContext ¶
type ReindexListsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
ListID string
}
ReindexListsContext provides the lists reindex action context.
func NewReindexListsContext ¶
func NewReindexListsContext(ctx context.Context, r *http.Request, service *goa.Service) (*ReindexListsContext, error)
NewReindexListsContext parses the incoming request URL and body, performs validations and creates the context used by the lists controller reindex action.
func (*ReindexListsContext) BadRequest ¶
func (ctx *ReindexListsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ReindexListsContext) NotFound ¶
func (ctx *ReindexListsContext) NotFound(r error) error
NotFound sends a HTTP response with status code 404.
func (*ReindexListsContext) OKFull ¶
func (ctx *ReindexListsContext) OKFull(r *RankdbRanklistFull) error
OKFull sends a HTTP response with status code 200.
func (*ReindexListsContext) Unauthorized ¶
func (ctx *ReindexListsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type ReindexMultilistContext ¶
type ReindexMultilistContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
ErrorsOnly bool
Payload *ListQL
}
ReindexMultilistContext provides the multilist reindex action context.
func NewReindexMultilistContext ¶
func NewReindexMultilistContext(ctx context.Context, r *http.Request, service *goa.Service) (*ReindexMultilistContext, error)
NewReindexMultilistContext parses the incoming request URL and body, performs validations and creates the context used by the multilist controller reindex action.
func (*ReindexMultilistContext) BadRequest ¶
func (ctx *ReindexMultilistContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ReindexMultilistContext) OK ¶
func (ctx *ReindexMultilistContext) OK(r *RankdbResultlist) error
OK sends a HTTP response with status code 200.
func (*ReindexMultilistContext) Unauthorized ¶
func (ctx *ReindexMultilistContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type RepairListsContext ¶
type RepairListsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
Clear bool
ListID string
}
RepairListsContext provides the lists repair action context.
func NewRepairListsContext ¶
func NewRepairListsContext(ctx context.Context, r *http.Request, service *goa.Service) (*RepairListsContext, error)
NewRepairListsContext parses the incoming request URL and body, performs validations and creates the context used by the lists controller repair action.
func (*RepairListsContext) BadRequest ¶
func (ctx *RepairListsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*RepairListsContext) NotFound ¶
func (ctx *RepairListsContext) NotFound(r error) error
NotFound sends a HTTP response with status code 404.
func (*RepairListsContext) OK ¶
func (ctx *RepairListsContext) OK(r *RankdbListopresult) error
OK sends a HTTP response with status code 200.
func (*RepairListsContext) Unauthorized ¶
func (ctx *RepairListsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type RestoreMultilistContext ¶
type RestoreMultilistContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
Keep bool
ListIDPrefix *string
ListIDSuffix *string
Src string
SrcFile string
}
RestoreMultilistContext provides the multilist restore action context.
func NewRestoreMultilistContext ¶
func NewRestoreMultilistContext(ctx context.Context, r *http.Request, service *goa.Service) (*RestoreMultilistContext, error)
NewRestoreMultilistContext parses the incoming request URL and body, performs validations and creates the context used by the multilist controller restore action.
func (*RestoreMultilistContext) BadRequest ¶
func (ctx *RestoreMultilistContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*RestoreMultilistContext) OK ¶
func (ctx *RestoreMultilistContext) OK(r *RankdbRestoreresult) error
OK sends a HTTP response with status code 200.
func (*RestoreMultilistContext) Unauthorized ¶
func (ctx *RestoreMultilistContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type RootHealthContext ¶
type RootHealthContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
}
RootHealthContext provides the health root action context.
func NewRootHealthContext ¶
func NewRootHealthContext(ctx context.Context, r *http.Request, service *goa.Service) (*RootHealthContext, error)
NewRootHealthContext parses the incoming request URL and body, performs validations and creates the context used by the health controller root action.
func (*RootHealthContext) OK ¶
func (ctx *RootHealthContext) OK(resp []byte) error
OK sends a HTTP response with status code 200.
func (*RootHealthContext) Unauthorized ¶
func (ctx *RootHealthContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type StaticController ¶
type StaticController interface {
goa.Muxer
goa.FileServer
}
StaticController is the controller interface for the Static actions.
type StatusBackupContext ¶
type StatusBackupContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
BackupID string
}
StatusBackupContext provides the backup status action context.
func NewStatusBackupContext ¶
func NewStatusBackupContext(ctx context.Context, r *http.Request, service *goa.Service) (*StatusBackupContext, error)
NewStatusBackupContext parses the incoming request URL and body, performs validations and creates the context used by the backup controller status action.
func (*StatusBackupContext) NotFound ¶
func (ctx *StatusBackupContext) NotFound(r error) error
NotFound sends a HTTP response with status code 404.
func (*StatusBackupContext) OK ¶
func (ctx *StatusBackupContext) OK(r *RankdbBackupStatus) error
OK sends a HTTP response with status code 200.
func (*StatusBackupContext) OKFull ¶
func (ctx *StatusBackupContext) OKFull(r *RankdbBackupStatusFull) error
OKFull sends a HTTP response with status code 200.
func (*StatusBackupContext) OKTiny ¶
func (ctx *StatusBackupContext) OKTiny(r *RankdbBackupStatusTiny) error
OKTiny sends a HTTP response with status code 200.
func (*StatusBackupContext) Unauthorized ¶
func (ctx *StatusBackupContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type VerifyListsContext ¶
type VerifyListsContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
Clear bool
ListID string
Repair bool
}
VerifyListsContext provides the lists verify action context.
func NewVerifyListsContext ¶
func NewVerifyListsContext(ctx context.Context, r *http.Request, service *goa.Service) (*VerifyListsContext, error)
NewVerifyListsContext parses the incoming request URL and body, performs validations and creates the context used by the lists controller verify action.
func (*VerifyListsContext) BadRequest ¶
func (ctx *VerifyListsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*VerifyListsContext) NotFound ¶
func (ctx *VerifyListsContext) NotFound(r error) error
NotFound sends a HTTP response with status code 404.
func (*VerifyListsContext) OK ¶
func (ctx *VerifyListsContext) OK(r *RankdbListopresult) error
OK sends a HTTP response with status code 200.
func (*VerifyListsContext) Unauthorized ¶
func (ctx *VerifyListsContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.
type VerifyMultilistContext ¶
type VerifyMultilistContext struct {
context.Context
*goa.ResponseData
*goa.RequestData
Clear bool
Elements bool
ErrorsOnly bool
Repair bool
Payload *ListQL
}
VerifyMultilistContext provides the multilist verify action context.
func NewVerifyMultilistContext ¶
func NewVerifyMultilistContext(ctx context.Context, r *http.Request, service *goa.Service) (*VerifyMultilistContext, error)
NewVerifyMultilistContext parses the incoming request URL and body, performs validations and creates the context used by the multilist controller verify action.
func (*VerifyMultilistContext) BadRequest ¶
func (ctx *VerifyMultilistContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*VerifyMultilistContext) OK ¶
func (ctx *VerifyMultilistContext) OK(r *RankdbResultlist) error
OK sends a HTTP response with status code 200.
func (*VerifyMultilistContext) Unauthorized ¶
func (ctx *VerifyMultilistContext) Unauthorized(r error) error
Unauthorized sends a HTTP response with status code 401.