api

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Org will carry throughout the api and get tagged on resources

Functions

func NewServer

func NewServer(config common.Config) error

NewServer creates a new server and starts it

func TokenMiddleware

func TokenMiddleware(psk []byte, public map[string]string, h http.Handler) http.Handler

TokenMiddleware checks the tokens for non-public URLs

Types

type LogWriter

type LogWriter struct {
	http.ResponseWriter
}

LogWriter is an http.ResponseWriter

func (LogWriter) Write

func (w LogWriter) Write(p []byte) (n int, err error)

Write log message if http response writer returns an error

type ManagedInstanceDetails added in v0.4.0

type ManagedInstanceDetails struct {
	ID         string              `json:"id"`
	CreatedAt  string              `json:"created_at,omitempty"`
	ModifiedAt string              `json:"modified_at,omitempty"`
	Name       string              `json:"name"`
	Size       string              `json:"type,omitempty"`
	State      string              `json:"state"`
	Tags       []map[string]string `json:"tags"`
}

ManagedInstanceDetails defines the information about a managed instance

type ManagedInstanceListDetails added in v0.4.0

type ManagedInstanceListDetails struct {
	ID string `json:"id"`
}

Jump to

Keyboard shortcuts

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