webserver

package
v0.0.0-...-a9e6e50 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CraftToken

func CraftToken(username string) string

CraftToken returns the auth token for a user.

func EchoEngine

func EchoEngine(ctrl Controller) *echo.Echo

EchoEngine instantiates the wep server.

func GetPathInt

func GetPathInt(c echo.Context, name string) (int, error)

func PrintRoutes

func PrintRoutes(e *echo.Echo)

PrintRoutes prints the Echo engin exposed routes.

Types

type Catalog

type Catalog struct {
	ID        string     `json:"id"`
	Name      string     `json:"name"`
	Type      string     `json:"type"`
	Endpoints []Endpoint `json:"endpoints"`
}

type Controller

type Controller struct {
	Version  string
	Logger   logger.Logger
	Database database.Client
	Storage  storage.Backend
	//
	Tenant   string
	Domain   string
	Username string
	Password string
}

A Controller is an Iversion Of Control pattern used to init the server package.

type Endpoint

type Endpoint struct {
	ID        string             `json:"id"`
	RegionID  string             `json:"region_id"`
	URL       string             `json:"url"`
	Region    string             `json:"region"`
	Interface swift.EndpointType `json:"interface"`
}

type Token

type Token struct {
	ExpiresAt string    `json:"expires_at"`
	IssuedAt  string    `json:"issued_at"`
	Catalog   []Catalog `json:"catalog"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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