Documentation
¶
Index ¶
- Variables
- type HandlerConf
- type Manager
- func (m *Manager) AddRoute(ctx context.Context, serverID string, req *RouteRequest) error
- func (m *Manager) CreateServer(ctx context.Context, req *ServerRequest) error
- func (m *Manager) DeleteRoute(ctx context.Context, serverID, routeID string) error
- func (m *Manager) DeleteServer(ctx context.Context, id string) error
- func (m *Manager) GetServer(ctx context.Context, id string) (*ServerResponse, error)
- func (m *Manager) ListRoutes(ctx context.Context, serverID string) ([]*RouteResponse, error)
- func (m *Manager) ListServers(ctx context.Context) ([]*ServerResponse, error)
- func (m *Manager) SetReadOnlyServerIDs(ids []string)
- func (m *Manager) UpdateRoute(ctx context.Context, serverID, routeID string, req *RouteRequest) error
- func (m *Manager) UpdateServer(ctx context.Context, req *ServerRequest) error
- type MatchConf
- type RouteRequest
- type RouteResponse
- type ServerRequest
- type ServerResponse
- type TLSConf
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConflict = errors.New("conflict")
View Source
var ErrNotFound = errors.New("not found")
View Source
var ErrReadOnly = errors.New("read-only")
Functions ¶
This section is empty.
Types ¶
type HandlerConf ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) CreateServer ¶
func (m *Manager) CreateServer(ctx context.Context, req *ServerRequest) error
func (*Manager) DeleteRoute ¶
func (*Manager) ListRoutes ¶
func (*Manager) ListServers ¶
func (m *Manager) ListServers(ctx context.Context) ([]*ServerResponse, error)
func (*Manager) SetReadOnlyServerIDs ¶
func (*Manager) UpdateRoute ¶
func (*Manager) UpdateServer ¶
func (m *Manager) UpdateServer(ctx context.Context, req *ServerRequest) error
type RouteRequest ¶
type RouteRequest struct {
ID string `json:"id"`
Order int `json:"order"`
Match MatchConf `json:"match"`
Handlers []HandlerConf `json:"handlers"`
}
type RouteResponse ¶
type RouteResponse struct {
ID string `json:"id"`
Order int `json:"order"`
Match MatchConf `json:"match"`
Handlers []HandlerConf `json:"handlers"`
}
type ServerRequest ¶
type ServerResponse ¶
Click to show internal directories.
Click to hide internal directories.