Documentation ¶
Overview ¶
Package admin implements a server which serves a REST API and a web application to allow performing satellite administration tasks.
NOTE this is work in progress and will eventually replace the current satellite administration server implemented in the parent package, hence this package name is the same than its parent because it will simplify the replace once it's ready.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrExampleAPI = errs.Class("admin example api")
var Error = errs.Class("satellite-admin")
Error is the error class that wraps all the errors returned by this package.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
StaticDir string `` /* 181-byte string literal not displayed */
}
Config defines configuration for the satellite administration server.
type ExampleHandler ¶
type ExampleHandler struct {
// contains filtered or unexported fields
}
ExampleHandler is an api handler that implements all Example API endpoints functionality.
func NewExample ¶
func NewExample(log *zap.Logger, mon *monkit.Scope, service ExampleService, router *mux.Router, auth api.Auth) *ExampleHandler
type ExampleService ¶
type ParentRouter ¶
ParentRouter is mux.Router with its full path prefix.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves the API endpoints and the web application to allow preforming satellite administration tasks.
func NewServer ¶
func NewServer(log *zap.Logger, listener net.Listener, parentRouter *ParentRouter, config Config) *Server
NewServer creates a satellite administration server instance with the provided dependencies and configurations.
When listener is nil, Server.Run is a noop.
When parentRouter is nil it creates a new Router to attach the server endpoints, otherwise , it attaches them to the provided one, allowing to expose its functionality through another server.
Directories ¶
Path | Synopsis |
---|---|
Package main defines the satellite administration API through the API generator and generates source code of the API server handlers and clients and the documentation markdown document.
|
Package main defines the satellite administration API through the API generator and generates source code of the API server handlers and clients and the documentation markdown document. |