catalog

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const APIName = "v1"

APIName is the name of the API as defined in the design.

View Source
const APIVersion = "1.0"

APIVersion is the version of the API as defined in the design.

View Source
const ServiceName = "catalog"

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{"List"}

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 MakeInternalError

func MakeInternalError(err error) *goa.ServiceError

MakeInternalError builds a goa.ServiceError from an error.

func NewListEndpoint

func NewListEndpoint(s Service) goa.Endpoint

NewListEndpoint returns an endpoint function that calls the method "List" of service "catalog".

Types

type Catalog

type Catalog struct {
	// ID is the unique id of the catalog
	ID uint
	// Name of catalog
	Name string
	// Type of catalog
	Type string
	// URL of catalog
	URL string
	// Provider of catalog
	Provider string
}

type Client

type Client struct {
	ListEndpoint goa.Endpoint
}

Client is the "catalog" service client.

func NewClient

func NewClient(list goa.Endpoint) *Client

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

func (*Client) List

func (c *Client) List(ctx context.Context) (res *ListResult, err error)

List calls the "List" endpoint of the "catalog" service. List may return the following errors:

  • "internal-error" (type *goa.ServiceError): Internal Server Error
  • error: internal error

type Endpoints

type Endpoints struct {
	List goa.Endpoint
}

Endpoints wraps the "catalog" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

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

func (*Endpoints) Use

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

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

type ListResult

type ListResult struct {
	Data []*Catalog
}

ListResult is the result type of the catalog service List method.

type Service

type Service interface {
	// List all Catalogs
	List(context.Context) (res *ListResult, err error)
}

The catalog service provides details about catalogs.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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