server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func CreateServer

func CreateServer(clients map[string]docker.Client, config Config) *http.Server

Types

type AuthProvider

type AuthProvider string
const (
	ProviderNone   AuthProvider = "none"
	ProviderSimple AuthProvider = "simple"
	ProviderBasic  AuthProvider = "basic"
)

type Authorization

type Authorization struct {
	Provider   AuthProvider
	Authorizer Authorizer
}

type Authorizer

type Authorizer interface {
	AuthMiddleware(http.Handler) http.Handler
	CreateToken(string, string) (string, error)
}

type Config

type Config struct {
	Base          string
	Addr          string
	Version       string
	Hostname      string
	Authorization Authorization
}

Config is a struct for configuring the web service

Jump to

Keyboard shortcuts

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