labels

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "labels"

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 labels"}

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 NewListLabelsEndpoint

func NewListLabelsEndpoint(s Service) goa.Endpoint

NewListLabelsEndpoint returns an endpoint function that calls the method "List labels" of service "labels".

func NewViewedLabels

func NewViewedLabels(res *Labels, view string) *labelsviews.Labels

NewViewedLabels initializes viewed result type Labels from result type Labels using the given view.

Types

type Client

type Client struct {
	ListLabelsEndpoint goa.Endpoint
}

Client is the "labels" service client.

func NewClient

func NewClient(listLabels goa.Endpoint) *Client

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

func (*Client) ListLabels

func (c *Client) ListLabels(ctx context.Context, p *ListLabelsPayload) (res *Labels, err error)

ListLabels calls the "List labels" endpoint of the "labels" service.

type Endpoints

type Endpoints struct {
	ListLabels goa.Endpoint
}

Endpoints wraps the "labels" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

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

func (*Endpoints) Use

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

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

type Labels

type Labels struct {
	// List of labels
	Labels []string
}

Labels is the result type of the labels service List labels method.

func NewLabels

func NewLabels(vres *labelsviews.Labels) *Labels

NewLabels initializes result type Labels from viewed result type Labels.

type ListLabelsPayload

type ListLabelsPayload struct {
	// Team of associated targets
	Team *string
	// Team list of associated targets, separated by commas
	Teams *string
	// Status of associated findings
	Status *string
	// Allows to get the list of associated findings for a specific date
	// (YYYY-MM-DD). This filter has preference over minDate and maxDate.
	AtDate *string
	// Minimum date filter for associated findings (YYYY-MM-DD). This filter only
	// applies when used in conjunction with status filter.
	MinDate *string
	// Maximum date filter for associated findings (YYYY-MM-DD). This filter only
	// applies when used in conjunction with status filter.
	MaxDate *string
	// A list of asset identifiers to filter by for associated targets
	Identifiers *string
}

ListLabelsPayload is the payload type of the labels service List labels method.

type Service

type Service interface {
	// ListLabels implements List labels.
	ListLabels(context.Context, *ListLabelsPayload) (res *Labels, err error)
}

Labels endpoint.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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