app

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountAppsController

func MountAppsController(service *goa.Service, ctrl AppsController)

MountAppsController "mounts" a Apps resource controller on the given service.

func MountSwaggerController

func MountSwaggerController(service *goa.Service, ctrl SwaggerController)

MountSwaggerController "mounts" a Swagger resource controller on the given service.

Types

type AppCredentialsPayload

type AppCredentialsPayload struct {
	// The app ID
	ID string `form:"id" json:"id" yaml:"id" xml:"id"`
	// The app secret
	Secret string `form:"secret" json:"secret" yaml:"secret" xml:"secret"`
}

App ID+secret credentials

func (*AppCredentialsPayload) Validate

func (ut *AppCredentialsPayload) Validate() (err error)

Validate validates the AppCredentialsPayload type instance.

type AppPayload

type AppPayload struct {
	// Description of the app
	Description *string `form:"description,omitempty" json:"description,omitempty" yaml:"description,omitempty" xml:"description,omitempty"`
	// App domain
	Domain *string `form:"domain,omitempty" json:"domain,omitempty" yaml:"domain,omitempty" xml:"domain,omitempty"`
	// Name of the app
	Name string `form:"name" json:"name" yaml:"name" xml:"name"`
}

Payload for the client apps

func (*AppPayload) Validate

func (ut *AppPayload) Validate() (err error)

Validate validates the AppPayload type instance.

type Apps

type Apps struct {
	// Description of the app
	Description string `form:"description" json:"description" yaml:"description" xml:"description"`
	// App domain
	Domain string `form:"domain" json:"domain" yaml:"domain" xml:"domain"`
	// Unique app ID
	ID string `form:"id" json:"id" yaml:"id" xml:"id"`
	// Name of the app
	Name string `form:"name" json:"name" yaml:"name" xml:"name"`
	// User ID
	Owner string `form:"owner" json:"owner" yaml:"owner" xml:"owner"`
	// Time when app is registered
	RegisteredAt int `form:"registeredAt" json:"registeredAt" yaml:"registeredAt" xml:"registeredAt"`
}

apps media type (default view)

Identifier: application/vnd.goa.apps+json; view=default

func (*Apps) Validate

func (mt *Apps) Validate() (err error)

Validate validates the Apps media type instance.

type AppsController

type AppsController interface {
	goa.Muxer
	DeleteApp(*DeleteAppAppsContext) error
	Get(*GetAppsContext) error
	GetMyApps(*GetMyAppsAppsContext) error
	GetUserApps(*GetUserAppsAppsContext) error
	RegenerateClientSecret(*RegenerateClientSecretAppsContext) error
	RegisterApp(*RegisterAppAppsContext) error
	UpdateApp(*UpdateAppAppsContext) error
	VerifyApp(*VerifyAppAppsContext) error
}

AppsController is the controller interface for the Apps actions.

type DeleteAppAppsContext

type DeleteAppAppsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	AppID string
}

DeleteAppAppsContext provides the apps deleteApp action context.

func NewDeleteAppAppsContext

func NewDeleteAppAppsContext(ctx context.Context, r *http.Request, service *goa.Service) (*DeleteAppAppsContext, error)

NewDeleteAppAppsContext parses the incoming request URL and body, performs validations and creates the context used by the apps controller deleteApp action.

func (*DeleteAppAppsContext) BadRequest

func (ctx *DeleteAppAppsContext) BadRequest(r error) error

BadRequest sends a HTTP response with status code 400.

func (*DeleteAppAppsContext) InternalServerError

func (ctx *DeleteAppAppsContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*DeleteAppAppsContext) NotFound

func (ctx *DeleteAppAppsContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*DeleteAppAppsContext) OK

func (ctx *DeleteAppAppsContext) OK(resp []byte) error

OK sends a HTTP response with status code 200.

type GetAppsContext

type GetAppsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	AppID string
}

GetAppsContext provides the apps get action context.

func NewGetAppsContext

func NewGetAppsContext(ctx context.Context, r *http.Request, service *goa.Service) (*GetAppsContext, error)

NewGetAppsContext parses the incoming request URL and body, performs validations and creates the context used by the apps controller get action.

func (*GetAppsContext) BadRequest

func (ctx *GetAppsContext) BadRequest(r error) error

BadRequest sends a HTTP response with status code 400.

func (*GetAppsContext) InternalServerError

func (ctx *GetAppsContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*GetAppsContext) NotFound

func (ctx *GetAppsContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*GetAppsContext) OK

func (ctx *GetAppsContext) OK(r *Apps) error

OK sends a HTTP response with status code 200.

type GetMyAppsAppsContext

type GetMyAppsAppsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
}

GetMyAppsAppsContext provides the apps getMyApps action context.

func NewGetMyAppsAppsContext

func NewGetMyAppsAppsContext(ctx context.Context, r *http.Request, service *goa.Service) (*GetMyAppsAppsContext, error)

NewGetMyAppsAppsContext parses the incoming request URL and body, performs validations and creates the context used by the apps controller getMyApps action.

func (*GetMyAppsAppsContext) InternalServerError

func (ctx *GetMyAppsAppsContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*GetMyAppsAppsContext) NotFound

func (ctx *GetMyAppsAppsContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*GetMyAppsAppsContext) OK

func (ctx *GetMyAppsAppsContext) OK(resp []byte) error

OK sends a HTTP response with status code 200.

type GetUserAppsAppsContext

type GetUserAppsAppsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	UserID string
}

GetUserAppsAppsContext provides the apps getUserApps action context.

func NewGetUserAppsAppsContext

func NewGetUserAppsAppsContext(ctx context.Context, r *http.Request, service *goa.Service) (*GetUserAppsAppsContext, error)

NewGetUserAppsAppsContext parses the incoming request URL and body, performs validations and creates the context used by the apps controller getUserApps action.

func (*GetUserAppsAppsContext) InternalServerError

func (ctx *GetUserAppsAppsContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*GetUserAppsAppsContext) NotFound

func (ctx *GetUserAppsAppsContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*GetUserAppsAppsContext) OK

func (ctx *GetUserAppsAppsContext) OK(resp []byte) error

OK sends a HTTP response with status code 200.

type RegApps

type RegApps struct {
	// App ID
	ID string `form:"id" json:"id" yaml:"id" xml:"id"`
	// Client secret
	Secret string `form:"secret" json:"secret" yaml:"secret" xml:"secret"`
}

reg-apps media type (default view)

Identifier: application/vnd.goa.reg.apps+json; view=default

func (*RegApps) Validate

func (mt *RegApps) Validate() (err error)

Validate validates the RegApps media type instance.

type RegenerateClientSecretAppsContext

type RegenerateClientSecretAppsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	AppID string
}

RegenerateClientSecretAppsContext provides the apps regenerateClientSecret action context.

func NewRegenerateClientSecretAppsContext

func NewRegenerateClientSecretAppsContext(ctx context.Context, r *http.Request, service *goa.Service) (*RegenerateClientSecretAppsContext, error)

NewRegenerateClientSecretAppsContext parses the incoming request URL and body, performs validations and creates the context used by the apps controller regenerateClientSecret action.

func (*RegenerateClientSecretAppsContext) BadRequest

func (ctx *RegenerateClientSecretAppsContext) BadRequest(r error) error

BadRequest sends a HTTP response with status code 400.

func (*RegenerateClientSecretAppsContext) InternalServerError

func (ctx *RegenerateClientSecretAppsContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*RegenerateClientSecretAppsContext) NotFound

NotFound sends a HTTP response with status code 404.

func (*RegenerateClientSecretAppsContext) OK

OK sends a HTTP response with status code 200.

type RegisterAppAppsContext

type RegisterAppAppsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Payload *AppPayload
}

RegisterAppAppsContext provides the apps registerApp action context.

func NewRegisterAppAppsContext

func NewRegisterAppAppsContext(ctx context.Context, r *http.Request, service *goa.Service) (*RegisterAppAppsContext, error)

NewRegisterAppAppsContext parses the incoming request URL and body, performs validations and creates the context used by the apps controller registerApp action.

func (*RegisterAppAppsContext) BadRequest

func (ctx *RegisterAppAppsContext) BadRequest(r error) error

BadRequest sends a HTTP response with status code 400.

func (*RegisterAppAppsContext) Created

func (ctx *RegisterAppAppsContext) Created(r *RegApps) error

Created sends a HTTP response with status code 201.

func (*RegisterAppAppsContext) InternalServerError

func (ctx *RegisterAppAppsContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

type SwaggerController

type SwaggerController interface {
	goa.Muxer
	goa.FileServer
}

SwaggerController is the controller interface for the Swagger actions.

type UpdateAppAppsContext

type UpdateAppAppsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	AppID   string
	Payload *AppPayload
}

UpdateAppAppsContext provides the apps updateApp action context.

func NewUpdateAppAppsContext

func NewUpdateAppAppsContext(ctx context.Context, r *http.Request, service *goa.Service) (*UpdateAppAppsContext, error)

NewUpdateAppAppsContext parses the incoming request URL and body, performs validations and creates the context used by the apps controller updateApp action.

func (*UpdateAppAppsContext) BadRequest

func (ctx *UpdateAppAppsContext) BadRequest(r error) error

BadRequest sends a HTTP response with status code 400.

func (*UpdateAppAppsContext) InternalServerError

func (ctx *UpdateAppAppsContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*UpdateAppAppsContext) NotFound

func (ctx *UpdateAppAppsContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*UpdateAppAppsContext) OK

func (ctx *UpdateAppAppsContext) OK(r *Apps) error

OK sends a HTTP response with status code 200.

type VerifyAppAppsContext

type VerifyAppAppsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Payload *AppCredentialsPayload
}

VerifyAppAppsContext provides the apps verifyApp action context.

func NewVerifyAppAppsContext

func NewVerifyAppAppsContext(ctx context.Context, r *http.Request, service *goa.Service) (*VerifyAppAppsContext, error)

NewVerifyAppAppsContext parses the incoming request URL and body, performs validations and creates the context used by the apps controller verifyApp action.

func (*VerifyAppAppsContext) InternalServerError

func (ctx *VerifyAppAppsContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*VerifyAppAppsContext) NotFound

func (ctx *VerifyAppAppsContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*VerifyAppAppsContext) OK

func (ctx *VerifyAppAppsContext) OK(r *Apps) error

OK sends a HTTP response with status code 200.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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