types

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConnTLSUserKey is the key used to reference the Disco user extracted from
	// the client TLS certificate and stored in the HTTP request context.
	ConnTLSUserKey = "connTLSUser"
)

Variables

This section is empty.

Functions

func ErrBadRequest

func ErrBadRequest(err error) render.Renderer

func ErrInternal

func ErrInternal(err error) render.Renderer

func ErrNotFound

func ErrNotFound(err error) render.Renderer

func ErrUnauthorized

func ErrUnauthorized(msg string) render.Renderer

Types

type RemoteJoinResponse

type RemoteJoinResponse struct {
	*Response
	// Encrypted payload in JSON format, encoded in base58
	Data string `json:"data"`
}

type RemoteJoinResponsePayload

type RemoteJoinResponsePayload struct {
	TLSCACert     string `json:"tls_ca_cert"`
	TLSServerSAN  string `json:"tls_server_san"`
	TLSClientCert []byte `json:"tls_client_cert"`
	TLSClientKey  []byte `json:"tls_client_key"`
}

type RenderFunc

type RenderFunc func(w http.ResponseWriter, r *http.Request) error

type Response

type Response struct {
	StatusCode int    `json:"statusCode"`
	Status     string `json:"status"`
	Error      string `json:"error,omitempty"`
}

func (*Response) Render

func (e *Response) Render(w http.ResponseWriter, r *http.Request) error

type StoreGetRequest

type StoreGetRequest struct {
	Key       string
	Namespace string
}

type StoreKeysRequest

type StoreKeysRequest struct {
	Namespace string
	Prefix    string
}

type StoreKeysResponse

type StoreKeysResponse struct {
	*Response
	Data map[string][]string `json:"keys"`
}

type StoreSetRequest

type StoreSetRequest struct {
	Key       string
	Value     []byte
	Namespace string
}

type StoreSetResponse

type StoreSetResponse struct {
	*Response
}

Jump to

Keyboard shortcuts

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