indexes

package
v0.0.0-...-1a1a679 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2019 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "indexes"

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 = [3]string{"list", "add", "remove"}

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 MakeInvalidURL

func MakeInvalidURL(err error) *goa.ServiceError

MakeInvalidURL builds a goa.ServiceError from an error.

func NewAddEndpoint

func NewAddEndpoint(s Service) goa.Endpoint

NewAddEndpoint returns an endpoint function that calls the method "add" of service "indexes".

func NewListEndpoint

func NewListEndpoint(s Service) goa.Endpoint

NewListEndpoint returns an endpoint function that calls the method "list" of service "indexes".

func NewRemoveEndpoint

func NewRemoveEndpoint(s Service) goa.Endpoint

NewRemoveEndpoint returns an endpoint function that calls the method "remove" of service "indexes".

func NewViewedOperation

func NewViewedOperation(res *Operation, view string) *indexesviews.Operation

NewViewedOperation initializes viewed result type Operation from result type Operation using the given view.

Types

type Client

type Client struct {
	ListEndpoint   goa.Endpoint
	AddEndpoint    goa.Endpoint
	RemoveEndpoint goa.Endpoint
}

Client is the "indexes" service client.

func NewClient

func NewClient(list, add, remove goa.Endpoint) *Client

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

func (*Client) Add

func (c *Client) Add(ctx context.Context, p *IndexPayload) (res *Operation, err error)

Add calls the "add" endpoint of the "indexes" service.

func (*Client) List

func (c *Client) List(ctx context.Context) (res []string, err error)

List calls the "list" endpoint of the "indexes" service.

func (*Client) Remove

func (c *Client) Remove(ctx context.Context, p *IndexPayload) (res *Operation, err error)

Remove calls the "remove" endpoint of the "indexes" service.

type Endpoints

type Endpoints struct {
	List   goa.Endpoint
	Add    goa.Endpoint
	Remove goa.Endpoint
}

Endpoints wraps the "indexes" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

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

func (*Endpoints) Use

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

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

type IndexPayload

type IndexPayload struct {
	// The url of the index file
	URL string
}

IndexPayload is the payload type of the indexes service add method.

type Operation

type Operation struct {
	// The status of the operation
	Status string
}

Operation is the result type of the indexes service add method.

func NewOperation

func NewOperation(vres *indexesviews.Operation) *Operation

NewOperation initializes result type Operation from viewed result type Operation.

type Service

type Service interface {
	// List implements list.
	List(context.Context) (res []string, err error)
	// Add implements add.
	Add(context.Context, *IndexPayload) (res *Operation, err error)
	// Remove implements remove.
	Remove(context.Context, *IndexPayload) (res *Operation, err error)
}

The indexes service manages the package_index files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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