rest

package
v0.0.0-...-2754675 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const ServerLatestVersionString = "v1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

func NewServer

func NewServer(
	config ServerConfig,
	appInfo app.Info,
	iamServerCore *iamserver.Core,
	webUIURLs *iam.WebUIURLs,
) (*Server, error)

func (*Server) IsAcceptingClients

func (srv *Server) IsAcceptingClients() bool

IsAcceptingClients conforms app.ServiceServer interface.

func (*Server) IsHealthy

func (srv *Server) IsHealthy() bool

IsHealthy conforms app.ServiceServer interface.

func (*Server) Serve

func (srv *Server) Serve() error

Serve conforms app.ServiceServer interface.

func (*Server) ServeHTTP

func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP conforms Go's HTTP Handler interface.

func (*Server) ServerName

func (srv *Server) ServerName() string

ServerName conforms app.ServiceServer interface.

func (*Server) Shutdown

func (srv *Server) Shutdown(ctx context.Context) error

Shutdown conforms app.ServiceServer interface.

type ServerConfig

type ServerConfig struct {
	ServePort int    `env:"SERVE_PORT"`
	ServePath string `env:"SERVE_PATH"`

	// SwaggerUIAssetsDir provides information where the Swagger UI files are
	// located. If left empty, the server won't serve the Swagger UI.
	SwaggerUIAssetsDir string `env:"SWAGGER_UI_ASSETS_DIR"`

	// V1 contains configuration for version 1 of the API service
	V1 *ServerV1Config `env:"V1"`
}

type ServerV1Config

type ServerV1Config struct {
	ServePath string `env:"SERVE_PATH"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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