handlers

package
v0.0.0-...-c50d277 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func API

func API(shutdown chan os.Signal, log *log.Logger, db driver.Database) http.Handler

API constructs an http.Handler with all application routes defined.

Types

type Activity

type Activity struct {
	// contains filtered or unexported fields
}

Activity represents the Activity API method handler set.

func (*Activity) Create

func (a *Activity) Create(ctx context.Context, w http.ResponseWriter, r *http.Request) error

Create decodes the body of a request to create a new activity. The full activity with generated fields is sent back in the response.

func (*Activity) List

List gets all existing activities in the system.

func (*Activity) Retrieve

func (a *Activity) Retrieve(ctx context.Context, w http.ResponseWriter, r *http.Request) error

Retrieve returns the specified activity from the system.

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

Agent represents the Agent API method handler set.

func (*Agent) Create

func (a *Agent) Create(ctx context.Context, w http.ResponseWriter, r *http.Request) error

Create decodes the body of a request to create a new agent. The full agent with generated fields is sent back in the response.

func (*Agent) List

func (a *Agent) List(ctx context.Context, w http.ResponseWriter, r *http.Request) error

List gets all existing products in the system.

func (*Agent) Retrieve

func (a *Agent) Retrieve(ctx context.Context, w http.ResponseWriter, r *http.Request) error

Retrieve returns the specified product from the system.

type Check

type Check struct {
	// contains filtered or unexported fields
}

Check provides support for orchestration health checks.

func (*Check) Health

func (c *Check) Health(ctx context.Context, w http.ResponseWriter, r *http.Request) error

Health validates the service is healthy and ready to accept requests.

type Entity

type Entity struct {
	// contains filtered or unexported fields
}

Entity represents the Agent API method handler set.

func (*Entity) Create

func (e *Entity) Create(ctx context.Context, w http.ResponseWriter, r *http.Request) error

Create decodes the body of a request to create a new entity. The full entity with generated fields is sent back in the response.

func (*Entity) List

func (e *Entity) List(ctx context.Context, w http.ResponseWriter, r *http.Request) error

List gets all existing entities in the system.

func (*Entity) Retrieve

func (e *Entity) Retrieve(ctx context.Context, w http.ResponseWriter, r *http.Request) error

Retrieve returns the specified entity from the system.

Jump to

Keyboard shortcuts

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