Documentation
¶
Index ¶
- Variables
- func CancelWithRequest(ctx context.Context, req *http.Request) context.Context
- func DatadogTx() goa.Middleware
- func HasAccessToElement(ctx context.Context, ids ...rankdb.ElementID) error
- func HasAccessToList(ctx context.Context, ids ...rankdb.ListID) error
- func InitDatadog(ctx context.Context, o DatadogOptions)
- func InitNewRelic(ctx context.Context, o NewRelicOptions)
- func LoadJWTPublicKeys() ([]*rsa.PublicKey, error)
- func NewJWTMiddleware() (goa.Middleware, error)
- func NewRelicTx() goa.Middleware
- func SetLogger() goa.Middleware
- func ShutdownMiddleware(h goa.Handler) goa.Handler
- func StartServer(ctx context.Context, confData io.Reader, lr *logrus.Logger) error
- func StartServices(logger goa.LogAdapter, ctx context.Context)
- func UpdateRequest(ctx context.Context) (done func(), err error)
- type BackupController
- type DatadogOptions
- type ElementsController
- func (c *ElementsController) Create(ctx *app.CreateElementsContext) error
- func (c *ElementsController) Delete(ctx *app.DeleteElementsContext) error
- func (c *ElementsController) DeleteMulti(ctx *app.DeleteMultiElementsContext) error
- func (c *ElementsController) Get(ctx *app.GetElementsContext) error
- func (c *ElementsController) GetAround(ctx *app.GetAroundElementsContext) error
- func (c *ElementsController) GetMulti(ctx *app.GetMultiElementsContext) error
- func (c *ElementsController) Put(ctx *app.PutElementsContext) error
- func (c *ElementsController) PutMulti(ctx *app.PutMultiElementsContext) error
- type HealthController
- type JWTController
- type ListsController
- func (c *ListsController) Clone(ctx *app.CloneListsContext) error
- func (c *ListsController) Create(ctx *app.CreateListsContext) error
- func (c *ListsController) Delete(ctx *app.DeleteListsContext) error
- func (c *ListsController) Get(ctx *app.GetListsContext) error
- func (c *ListsController) GetAll(ctx *app.GetAllListsContext) error
- func (c *ListsController) GetPercentile(ctx *app.GetPercentileListsContext) error
- func (c *ListsController) GetRange(ctx *app.GetRangeListsContext) error
- func (c *ListsController) Reindex(ctx *app.ReindexListsContext) error
- func (c *ListsController) Repair(ctx *app.RepairListsContext) error
- func (c *ListsController) Verify(ctx *app.VerifyListsContext) error
- type MultilistController
- func (c *MultilistController) Backup(ctx *app.BackupMultilistContext) error
- func (c *MultilistController) Create(ctx *app.CreateMultilistContext) error
- func (c *MultilistController) Delete(ctx *app.DeleteMultilistContext) error
- func (c *MultilistController) Get(ctx *app.GetMultilistContext) error
- func (c *MultilistController) Put(ctx *app.PutMultilistContext) error
- func (c *MultilistController) Reindex(ctx *app.ReindexMultilistContext) error
- func (c *MultilistController) Restore(ctx *app.RestoreMultilistContext) error
- func (c *MultilistController) Verify(ctx *app.VerifyMultilistContext) error
- type NewRelicOptions
- type StaticController
Constants ¶
This section is empty.
Variables ¶
var ( // ErrConflict is returned when a conflict is detected. ErrConflict = goa.NewErrorClass("conflict", 409) )
Functions ¶
func CancelWithRequest ¶
func DatadogTx ¶ added in v1.0.9
func DatadogTx() goa.Middleware
DatadogTx creates a request datadog middleware.
func HasAccessToElement ¶
HasAccessToElement returns true Not optimized for big lists of IDs.
func InitDatadog ¶ added in v1.0.9
func InitDatadog(ctx context.Context, o DatadogOptions)
func InitNewRelic ¶
func InitNewRelic(ctx context.Context, o NewRelicOptions)
func LoadJWTPublicKeys ¶
LoadJWTPublicKeys loads PEM encoded RSA public keys used to validate and decrypt the JWT.
func NewJWTMiddleware ¶
func NewJWTMiddleware() (goa.Middleware, error)
NewJWTMiddleware creates a middleware that checks for the presence of a JWT Authorization header and validates its content. A real app would probably use goa's JWT security middleware instead.
Note: the code below assumes the example is compiled against the master branch of goa. If compiling against goa v1 the call to jwt.New needs to be:
middleware := jwt.New(keys, ForceFail(), app.NewJWTSecurity())
func NewRelicTx ¶
func NewRelicTx() goa.Middleware
NewRelicTx creates a request new relic middleware. If verbose is true then the middlware logs the request and response bodies.
func ShutdownMiddleware ¶
ShutdownMiddleware rejects request once shutdown starts.
func StartServer ¶
func StartServices ¶
func StartServices(logger goa.LogAdapter, ctx context.Context)
func UpdateRequest ¶
Types ¶
type BackupController ¶
type BackupController struct {
*goa.Controller
}
BackupController implements the backup resource.
func NewBackupController ¶
func NewBackupController(service *goa.Service) *BackupController
NewBackupController creates a backup controller.
func (*BackupController) Delete ¶
func (c *BackupController) Delete(ctx *app.DeleteBackupContext) error
Delete runs the delete action.
func (*BackupController) Status ¶
func (c *BackupController) Status(ctx *app.StatusBackupContext) error
Status runs the status action.
type DatadogOptions ¶ added in v1.0.9
type DatadogOptions struct {
Enabled bool
}
type ElementsController ¶
type ElementsController struct {
*goa.Controller
}
ElementsController implements the list-elements resource.
func NewElementsController ¶
func NewElementsController(service *goa.Service) *ElementsController
NewElementsController creates a list-elements controller.
func (*ElementsController) Create ¶
func (c *ElementsController) Create(ctx *app.CreateElementsContext) error
Create runs the create action.
func (*ElementsController) Delete ¶
func (c *ElementsController) Delete(ctx *app.DeleteElementsContext) error
Delete runs the delete action.
func (*ElementsController) DeleteMulti ¶
func (c *ElementsController) DeleteMulti(ctx *app.DeleteMultiElementsContext) error
DeleteMulti runs the delete action.
func (*ElementsController) Get ¶
func (c *ElementsController) Get(ctx *app.GetElementsContext) error
Get runs the get action.
func (*ElementsController) GetAround ¶
func (c *ElementsController) GetAround(ctx *app.GetAroundElementsContext) error
GetNear runs the get-near action.
func (*ElementsController) GetMulti ¶
func (c *ElementsController) GetMulti(ctx *app.GetMultiElementsContext) error
GetMulti runs the get-multi action.
func (*ElementsController) Put ¶
func (c *ElementsController) Put(ctx *app.PutElementsContext) error
Put runs the put action.
func (*ElementsController) PutMulti ¶
func (c *ElementsController) PutMulti(ctx *app.PutMultiElementsContext) error
Put runs the put action.
type HealthController ¶
type HealthController struct { *goa.Controller // contains filtered or unexported fields }
HealthController implements the health resource.
func NewHealthController ¶
func NewHealthController(service *goa.Service) *HealthController
NewHealthController creates a health controller.
func (*HealthController) Health ¶
func (c *HealthController) Health(ctx *app.HealthHealthContext) error
Health runs the health action.
func (*HealthController) Root ¶
func (c *HealthController) Root(ctx *app.RootHealthContext) error
Root allows to ping the server.
type JWTController ¶
type JWTController struct { *goa.Controller // contains filtered or unexported fields }
JWTController implements the jwt resource.
func NewJWTController ¶
func NewJWTController(service *goa.Service) (*JWTController, error)
NewJWTController creates a jwt controller.
func (*JWTController) JWT ¶
func (c *JWTController) JWT(ctx *app.JWTJWTContext) error
JWT runs the jwt action.
type ListsController ¶
type ListsController struct {
*goa.Controller
}
ListsController implements the lists resource.
func NewListsController ¶
func NewListsController(service *goa.Service) *ListsController
NewListsController creates a lists controller.
func (*ListsController) Clone ¶
func (c *ListsController) Clone(ctx *app.CloneListsContext) error
Clone runs the clone action.
func (*ListsController) Create ¶
func (c *ListsController) Create(ctx *app.CreateListsContext) error
Create runs the create action.
func (*ListsController) Delete ¶
func (c *ListsController) Delete(ctx *app.DeleteListsContext) error
Delete runs the delete action.
func (*ListsController) Get ¶
func (c *ListsController) Get(ctx *app.GetListsContext) error
Get runs the get action.
func (*ListsController) GetAll ¶
func (c *ListsController) GetAll(ctx *app.GetAllListsContext) error
GetAll runs the get_all action.
func (*ListsController) GetPercentile ¶
func (c *ListsController) GetPercentile(ctx *app.GetPercentileListsContext) error
GetPercentile runs the get-percentile action.
func (*ListsController) GetRange ¶
func (c *ListsController) GetRange(ctx *app.GetRangeListsContext) error
GetRange runs the get-range action.
func (*ListsController) Reindex ¶
func (c *ListsController) Reindex(ctx *app.ReindexListsContext) error
Reindex runs the reindex action.
func (*ListsController) Repair ¶
func (c *ListsController) Repair(ctx *app.RepairListsContext) error
Reindex runs the reindex action.
func (*ListsController) Verify ¶
func (c *ListsController) Verify(ctx *app.VerifyListsContext) error
Verify runs the verify action.
type MultilistController ¶
type MultilistController struct {
*goa.Controller
}
MultilistController implements the multilist-elements resource.
func NewMultilistElementsController ¶
func NewMultilistElementsController(service *goa.Service) *MultilistController
NewMultilistElementsController creates a multilist-elements controller.
func (*MultilistController) Backup ¶
func (c *MultilistController) Backup(ctx *app.BackupMultilistContext) error
Create runs the create action.
func (*MultilistController) Create ¶
func (c *MultilistController) Create(ctx *app.CreateMultilistContext) error
Create runs the create action.
func (*MultilistController) Delete ¶
func (c *MultilistController) Delete(ctx *app.DeleteMultilistContext) error
Delete runs the delete action.
func (*MultilistController) Get ¶
func (c *MultilistController) Get(ctx *app.GetMultilistContext) error
Get runs the get action.
func (*MultilistController) Put ¶
func (c *MultilistController) Put(ctx *app.PutMultilistContext) error
Put runs the put action.
func (*MultilistController) Reindex ¶
func (c *MultilistController) Reindex(ctx *app.ReindexMultilistContext) error
Reindex runs the reindex action.
func (*MultilistController) Restore ¶
func (c *MultilistController) Restore(ctx *app.RestoreMultilistContext) error
Create runs the create action.
func (*MultilistController) Verify ¶
func (c *MultilistController) Verify(ctx *app.VerifyMultilistContext) error
Create runs the create action.
type NewRelicOptions ¶
type StaticController ¶
type StaticController struct {
*goa.Controller
}
StaticController implements the static resource.
func NewStaticController ¶
func NewStaticController(service *goa.Service) *StaticController
NewStaticController creates a static controller.