Documentation
¶
Index ¶
- Constants
- Variables
- func MakeBadRequest(err error) *goa.ServiceError
- func MakeForbidden(err error) *goa.ServiceError
- func MakeNotFound(err error) *goa.ServiceError
- func MakeUnauthorized(err error) *goa.ServiceError
- func NewHealthEndpointEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewUploadBackupEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewViewedBackupCheck(res *BackupCheck, view string) *adminviews.BackupCheck
- func NewViewedHealth(res *Health, view string) *adminviews.Health
- type Auther
- type BackupCheck
- type Client
- type Endpoints
- type Health
- type HealthPayload
- type QueueHealth
- type Service
- type UploadBackupPayload
- type UploadBackupRequestData
Constants ¶
const ServiceName = "admin"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [2]string{"health", "upload backup"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func MakeBadRequest ¶
func MakeBadRequest(err error) *goa.ServiceError
MakeBadRequest builds a goa.ServiceError from an error.
func MakeForbidden ¶
func MakeForbidden(err error) *goa.ServiceError
MakeForbidden builds a goa.ServiceError from an error.
func MakeNotFound ¶
func MakeNotFound(err error) *goa.ServiceError
MakeNotFound builds a goa.ServiceError from an error.
func MakeUnauthorized ¶
func MakeUnauthorized(err error) *goa.ServiceError
MakeUnauthorized builds a goa.ServiceError from an error.
func NewHealthEndpointEndpoint ¶
func NewHealthEndpointEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewHealthEndpointEndpoint returns an endpoint function that calls the method "health" of service "admin".
func NewUploadBackupEndpoint ¶
func NewUploadBackupEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewUploadBackupEndpoint returns an endpoint function that calls the method "upload backup" of service "admin".
func NewViewedBackupCheck ¶
func NewViewedBackupCheck(res *BackupCheck, view string) *adminviews.BackupCheck
NewViewedBackupCheck initializes viewed result type BackupCheck from result type BackupCheck using the given view.
func NewViewedHealth ¶
func NewViewedHealth(res *Health, view string) *adminviews.Health
NewViewedHealth initializes viewed result type Health from result type Health using the given view.
Types ¶
type Auther ¶
type Auther interface { // JWTAuth implements the authorization logic for the JWT security scheme. JWTAuth(ctx context.Context, token string, schema *security.JWTScheme) (context.Context, error) }
Auther defines the authorization functions to be implemented by the service.
type BackupCheck ¶
type BackupCheck struct { DeviceName *string DeviceID *string GenerationID *string Records []int32 Errors []string }
BackupCheck is the result type of the admin service upload backup method.
func NewBackupCheck ¶
func NewBackupCheck(vres *adminviews.BackupCheck) *BackupCheck
NewBackupCheck initializes result type BackupCheck from viewed result type BackupCheck.
type Client ¶
Client is the "admin" service client.
func (*Client) HealthEndpoint ¶
HealthEndpoint calls the "health" endpoint of the "admin" service.
func (*Client) UploadBackup ¶
func (c *Client) UploadBackup(ctx context.Context, p *UploadBackupPayload, req io.ReadCloser) (res *BackupCheck, err error)
UploadBackup calls the "upload backup" endpoint of the "admin" service.
type Endpoints ¶
Endpoints wraps the "admin" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "admin" service with endpoints.
type Health ¶
type Health struct {
Queue *QueueHealth
}
Health is the result type of the admin service health method.
func NewHealth ¶
func NewHealth(vres *adminviews.Health) *Health
NewHealth initializes result type Health from viewed result type Health.
type HealthPayload ¶
type HealthPayload struct {
Auth string
}
HealthPayload is the payload type of the admin service health method.
type QueueHealth ¶
type Service ¶
type Service interface { // Health implements health. HealthEndpoint(context.Context, *HealthPayload) (res *Health, err error) // UploadBackup implements upload backup. UploadBackup(context.Context, *UploadBackupPayload, io.ReadCloser) (res *BackupCheck, err error) }
Service is the admin service interface.
type UploadBackupPayload ¶
UploadBackupPayload is the payload type of the admin service upload backup method.
type UploadBackupRequestData ¶
type UploadBackupRequestData struct { // Payload is the method payload. Payload *UploadBackupPayload // Body streams the HTTP request body. Body io.ReadCloser }
UploadBackupRequestData holds both the payload and the HTTP request body reader of the "upload backup" method.