handlers

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Expose

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

Expose handler is responsible for exposing new endpoints

func NewExpose

func NewExpose(client shipyard.RemoteConnectionClient, l hclog.Logger) *Expose

NewExpose creates a new Expose handler

func (*Expose) ServeHTTP

func (c *Expose) ServeHTTP(rw http.ResponseWriter, r *http.Request)

ServeHTTP implements the http.Handler interface

type ExposeRequest

type ExposeRequest struct {
	Name                string `json:"name" validate:"required"`
	SourcePort          int    `json:"source_port" validate:"required"`
	RemoteConnectorAddr string `json:"remote_connector_addr" validate:"required"`
	DestinationAddr     string `json:"destination_addr" validate:"required"`
	Type                string `json:"type" validate:"oneof=local remote"`
}

ExposeRequest is the JSON request for the Create handler

func (*ExposeRequest) Validate

func (c *ExposeRequest) Validate() error

Validate the struct and return an error if invalid

type GenerateCertificate added in v0.4.0

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

func NewGenerateCertificate added in v0.4.0

func NewGenerateCertificate(l hclog.Logger, pathCACert, pathCAKey string) *GenerateCertificate

func (*GenerateCertificate) ServeHTTP added in v0.4.0

func (gc *GenerateCertificate) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type Health

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

func NewHealth

func NewHealth(l hclog.Logger) *Health

func (*Health) ServeHTTP

func (h *Health) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type List

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

func NewList

func NewList(client shipyard.RemoteConnectionClient, l hclog.Logger) *List

NewExpose creates a new Expose handler

func (*List) ServeHTTP

func (l *List) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type Remove

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

func NewRemove

func NewRemove(client shipyard.RemoteConnectionClient, l hclog.Logger) *Remove

NewExpose creates a new Expose handler

func (*Remove) ServeHTTP

func (re *Remove) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type Service

type Service struct {
	ID                  string `json:"id" validate:"required"`
	Name                string `json:"name" validate:"required"`
	SourcePort          int    `json:"source_port" validate:"required"`
	RemoteConnectorAddr string `json:"remote_connector_addr" validate:"required"`
	DestinationAddr     string `json:"destination_addr" validate:"required"`
	Type                string `json:"type" validate:"oneof=local remote"`
	Status              string `json:"status"`
}

Jump to

Keyboard shortcuts

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