defaultservice

package
v0.0.0-...-5a969d9 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "default_service"

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

View Source
var MethodNames = [1]string{"default"}

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 NewDefaultEndpoint

func NewDefaultEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint

NewDefaultEndpoint returns an endpoint function that calls the method "default" of service "default_service".

Types

type Auther

type Auther interface {
	// BasicAuth implements the authorization logic for the Basic security scheme.
	BasicAuth(ctx context.Context, user, pass string, schema *security.BasicScheme) (context.Context, error)
}

Auther defines the authorization functions to be implemented by the service.

type Client

type Client struct {
	DefaultEndpoint goa.Endpoint
}

Client is the "default_service" service client.

func NewClient

func NewClient(default_ goa.Endpoint) *Client

NewClient initializes a "default_service" service client given the endpoints.

func (*Client) Default

func (c *Client) Default(ctx context.Context, p *DefaultPayload) (err error)

Default calls the "default" endpoint of the "default_service" service.

type DefaultPayload

type DefaultPayload struct {
	Username string
	Password string
}

DefaultPayload is the payload type of the default_service service default method.

type Endpoints

type Endpoints struct {
	Default goa.Endpoint
}

Endpoints wraps the "default_service" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "default_service" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "default_service" service endpoints.

type Service

type Service interface {
	// The default service default_method is secured with basic authentication
	Default(context.Context, *DefaultPayload) (err error)
}

Service is the default_service service interface.

Jump to

Keyboard shortcuts

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