Documentation
¶
Overview ¶
THIS FILE IS AUTO GENERATED BY GK-CLI DO NOT EDIT!!
Index ¶
- func InstrumentingMiddleware(duration metrics.Histogram) endpoint.Middleware
- func LoggingMiddleware(logger log.Logger) endpoint.Middleware
- func MakeCreateEndpoint(s service.AccountsService) endpoint.Endpoint
- func MakeDepositAccountEndpoint(s service.AccountsService) endpoint.Endpoint
- func MakeDepositEndpoint(s service.AccountsService) endpoint.Endpoint
- func MakeDropEndpoint(s service.AccountsService) endpoint.Endpoint
- func MakeGetAccountEndpoint(s service.AccountsService) endpoint.Endpoint
- func MakeWithdrawAccountEndpoint(s service.AccountsService) endpoint.Endpoint
- func MakeWithdrawEndpoint(s service.AccountsService) endpoint.Endpoint
- type CreateRequest
- type CreateResponse
- type DepositAccountRequest
- type DepositAccountResponse
- type DepositRequest
- type DepositResponse
- type DropRequest
- type DropResponse
- type Endpoints
- func (e Endpoints) Create(ctx context.Context, account io.Account) (t io.Account, error error)
- func (e Endpoints) Deposit(ctx context.Context) (error error)
- func (e Endpoints) DepositAccount(ctx context.Context, deposit io.Deposit) (t io.Account, error error)
- func (e Endpoints) Drop(ctx context.Context) (error error)
- func (e Endpoints) GetAccount(ctx context.Context, uuid string) (t []io.Account, error error)
- func (e Endpoints) Withdraw(ctx context.Context) (error error)
- func (e Endpoints) WithdrawAccount(ctx context.Context, deposit io.Deposit) (t io.Account, error error)
- type Failure
- type GetAccountRequest
- type GetAccountResponse
- type WithdrawAccountRequest
- type WithdrawAccountResponse
- type WithdrawRequest
- type WithdrawResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstrumentingMiddleware ¶
func InstrumentingMiddleware(duration metrics.Histogram) endpoint.Middleware
InstrumentingMiddleware returns an endpoint middleware that records the duration of each invocation to the passed histogram. The middleware adds a single field: "success", which is "true" if no error is returned, and "false" otherwise.
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) endpoint.Middleware
LoggingMiddleware returns an endpoint middleware that logs the duration of each invocation, and the resulting error, if any.
func MakeCreateEndpoint ¶
func MakeCreateEndpoint(s service.AccountsService) endpoint.Endpoint
func MakeDepositAccountEndpoint ¶
func MakeDepositAccountEndpoint(s service.AccountsService) endpoint.Endpoint
func MakeDepositEndpoint ¶
func MakeDepositEndpoint(s service.AccountsService) endpoint.Endpoint
func MakeDropEndpoint ¶
func MakeDropEndpoint(s service.AccountsService) endpoint.Endpoint
func MakeGetAccountEndpoint ¶
func MakeGetAccountEndpoint(s service.AccountsService) endpoint.Endpoint
func MakeWithdrawAccountEndpoint ¶
func MakeWithdrawAccountEndpoint(s service.AccountsService) endpoint.Endpoint
func MakeWithdrawEndpoint ¶
func MakeWithdrawEndpoint(s service.AccountsService) endpoint.Endpoint
Types ¶
type CreateRequest ¶
type CreateResponse ¶
func (CreateResponse) Failed ¶
func (r CreateResponse) Failed() error
type DepositAccountRequest ¶
type DepositAccountResponse ¶
func (DepositAccountResponse) Failed ¶
func (r DepositAccountResponse) Failed() error
type DepositRequest ¶
type DepositRequest struct{}
type DepositResponse ¶
type DepositResponse struct {
Error error `json:"error"`
}
func (DepositResponse) Failed ¶
func (r DepositResponse) Failed() error
type DropRequest ¶
type DropRequest struct{}
type DropResponse ¶
type DropResponse struct {
Error error `json:"error"`
}
func (DropResponse) Failed ¶
func (r DropResponse) Failed() error
type Endpoints ¶
type Endpoints struct { DepositEndpoint endpoint.Endpoint WithdrawEndpoint endpoint.Endpoint DropEndpoint endpoint.Endpoint CreateEndpoint endpoint.Endpoint GetAccountEndpoint endpoint.Endpoint DepositAccountEndpoint endpoint.Endpoint WithdrawAccountEndpoint endpoint.Endpoint }
Endpoints collects all of the endpoints that compose a profile service. It's meant to be used as a helper struct, to collect all of the endpoints into a single parameter.
func New ¶
func New(s service.AccountsService, mdw map[string][]endpoint.Middleware) Endpoints
New returns a Endpoints struct that wraps the provided service, and wires in all of the expected endpoint middlewares
func (Endpoints) DepositAccount ¶
func (Endpoints) GetAccount ¶
type GetAccountRequest ¶
type GetAccountRequest struct {
Uuid string `json:"uuid"`
}
type GetAccountResponse ¶
func (GetAccountResponse) Failed ¶
func (r GetAccountResponse) Failed() error
type WithdrawAccountRequest ¶
type WithdrawAccountResponse ¶
func (WithdrawAccountResponse) Failed ¶
func (r WithdrawAccountResponse) Failed() error
type WithdrawRequest ¶
type WithdrawRequest struct{}
type WithdrawResponse ¶
type WithdrawResponse struct {
Error error `json:"error"`
}
func (WithdrawResponse) Failed ¶
func (r WithdrawResponse) Failed() error