Documentation ¶
Index ¶
- func APIHandler(accountManager s.AccountManager, jwtValidator jwtclaims.JWTValidator, ...) (http.Handler, error)
- type AccountsHandler
- type AuthCfg
- type DNSSettingsHandler
- type EventsHandler
- type GroupsHandler
- func (h *GroupsHandler) CreateGroup(w http.ResponseWriter, r *http.Request)
- func (h *GroupsHandler) DeleteGroup(w http.ResponseWriter, r *http.Request)
- func (h *GroupsHandler) GetAllGroups(w http.ResponseWriter, r *http.Request)
- func (h *GroupsHandler) GetGroup(w http.ResponseWriter, r *http.Request)
- func (h *GroupsHandler) UpdateGroup(w http.ResponseWriter, r *http.Request)
- type NameserversHandler
- func (h *NameserversHandler) CreateNameserverGroup(w http.ResponseWriter, r *http.Request)
- func (h *NameserversHandler) DeleteNameserverGroup(w http.ResponseWriter, r *http.Request)
- func (h *NameserversHandler) GetAllNameservers(w http.ResponseWriter, r *http.Request)
- func (h *NameserversHandler) GetNameserverGroup(w http.ResponseWriter, r *http.Request)
- func (h *NameserversHandler) UpdateNameserverGroup(w http.ResponseWriter, r *http.Request)
- type PATHandler
- type PeersHandler
- type Policies
- func (h *Policies) CreatePolicy(w http.ResponseWriter, r *http.Request)
- func (h *Policies) DeletePolicy(w http.ResponseWriter, r *http.Request)
- func (h *Policies) GetAllPolicies(w http.ResponseWriter, r *http.Request)
- func (h *Policies) GetPolicy(w http.ResponseWriter, r *http.Request)
- func (h *Policies) UpdatePolicy(w http.ResponseWriter, r *http.Request)
- type RoutesHandler
- func (h *RoutesHandler) CreateRoute(w http.ResponseWriter, r *http.Request)
- func (h *RoutesHandler) DeleteRoute(w http.ResponseWriter, r *http.Request)
- func (h *RoutesHandler) GetAllRoutes(w http.ResponseWriter, r *http.Request)
- func (h *RoutesHandler) GetRoute(w http.ResponseWriter, r *http.Request)
- func (h *RoutesHandler) UpdateRoute(w http.ResponseWriter, r *http.Request)
- type RulesHandler
- func (h *RulesHandler) CreateRule(w http.ResponseWriter, r *http.Request)
- func (h *RulesHandler) DeleteRule(w http.ResponseWriter, r *http.Request)
- func (h *RulesHandler) GetAllRules(w http.ResponseWriter, r *http.Request)
- func (h *RulesHandler) GetRule(w http.ResponseWriter, r *http.Request)
- func (h *RulesHandler) UpdateRule(w http.ResponseWriter, r *http.Request)
- type SetupKeysHandler
- func (h *SetupKeysHandler) CreateSetupKey(w http.ResponseWriter, r *http.Request)
- func (h *SetupKeysHandler) GetAllSetupKeys(w http.ResponseWriter, r *http.Request)
- func (h *SetupKeysHandler) GetSetupKey(w http.ResponseWriter, r *http.Request)
- func (h *SetupKeysHandler) UpdateSetupKey(w http.ResponseWriter, r *http.Request)
- type UsersHandler
- func (h *UsersHandler) CreateUser(w http.ResponseWriter, r *http.Request)
- func (h *UsersHandler) DeleteUser(w http.ResponseWriter, r *http.Request)
- func (h *UsersHandler) GetAllUsers(w http.ResponseWriter, r *http.Request)
- func (h *UsersHandler) InviteUser(w http.ResponseWriter, r *http.Request)
- func (h *UsersHandler) UpdateUser(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIHandler ¶
func APIHandler(accountManager s.AccountManager, jwtValidator jwtclaims.JWTValidator, appMetrics telemetry.AppMetrics, authCfg AuthCfg) (http.Handler, error)
APIHandler creates the Management service HTTP API handler registering all the available endpoints.
Types ¶
type AccountsHandler ¶
type AccountsHandler struct {
// contains filtered or unexported fields
}
AccountsHandler is a handler that handles the server.Account HTTP endpoints
func NewAccountsHandler ¶
func NewAccountsHandler(accountManager server.AccountManager, authCfg AuthCfg) *AccountsHandler
NewAccountsHandler creates a new AccountsHandler HTTP handler
func (*AccountsHandler) DeleteAccount ¶
func (h *AccountsHandler) DeleteAccount(w http.ResponseWriter, r *http.Request)
DeleteAccount is a HTTP DELETE handler to delete an account
func (*AccountsHandler) GetAllAccounts ¶
func (h *AccountsHandler) GetAllAccounts(w http.ResponseWriter, r *http.Request)
GetAllAccounts is HTTP GET handler that returns a list of accounts. Effectively returns just a single account.
func (*AccountsHandler) UpdateAccount ¶
func (h *AccountsHandler) UpdateAccount(w http.ResponseWriter, r *http.Request)
UpdateAccount is HTTP PUT handler that updates the provided account. Updates only account settings (server.Settings)
type DNSSettingsHandler ¶
type DNSSettingsHandler struct {
// contains filtered or unexported fields
}
DNSSettingsHandler is a handler that returns the DNS settings of the account
func NewDNSSettingsHandler ¶
func NewDNSSettingsHandler(accountManager server.AccountManager, authCfg AuthCfg) *DNSSettingsHandler
NewDNSSettingsHandler returns a new instance of DNSSettingsHandler handler
func (*DNSSettingsHandler) GetDNSSettings ¶
func (h *DNSSettingsHandler) GetDNSSettings(w http.ResponseWriter, r *http.Request)
GetDNSSettings returns the DNS settings for the account
func (*DNSSettingsHandler) UpdateDNSSettings ¶
func (h *DNSSettingsHandler) UpdateDNSSettings(w http.ResponseWriter, r *http.Request)
UpdateDNSSettings handles update to DNS settings of an account
type EventsHandler ¶
type EventsHandler struct {
// contains filtered or unexported fields
}
EventsHandler HTTP handler
func NewEventsHandler ¶
func NewEventsHandler(accountManager server.AccountManager, authCfg AuthCfg) *EventsHandler
NewEventsHandler creates a new EventsHandler HTTP handler
func (*EventsHandler) GetAllEvents ¶
func (h *EventsHandler) GetAllEvents(w http.ResponseWriter, r *http.Request)
GetAllEvents list of the given account
type GroupsHandler ¶
type GroupsHandler struct {
// contains filtered or unexported fields
}
GroupsHandler is a handler that returns groups of the account
func NewGroupsHandler ¶
func NewGroupsHandler(accountManager server.AccountManager, authCfg AuthCfg) *GroupsHandler
NewGroupsHandler creates a new GroupsHandler HTTP handler
func (*GroupsHandler) CreateGroup ¶
func (h *GroupsHandler) CreateGroup(w http.ResponseWriter, r *http.Request)
CreateGroup handles group creation request
func (*GroupsHandler) DeleteGroup ¶
func (h *GroupsHandler) DeleteGroup(w http.ResponseWriter, r *http.Request)
DeleteGroup handles group deletion request
func (*GroupsHandler) GetAllGroups ¶
func (h *GroupsHandler) GetAllGroups(w http.ResponseWriter, r *http.Request)
GetAllGroups list for the account
func (*GroupsHandler) GetGroup ¶
func (h *GroupsHandler) GetGroup(w http.ResponseWriter, r *http.Request)
GetGroup returns a group
func (*GroupsHandler) UpdateGroup ¶
func (h *GroupsHandler) UpdateGroup(w http.ResponseWriter, r *http.Request)
UpdateGroup handles update to a group identified by a given ID
type NameserversHandler ¶
type NameserversHandler struct {
// contains filtered or unexported fields
}
NameserversHandler is the nameserver group handler of the account
func NewNameserversHandler ¶
func NewNameserversHandler(accountManager server.AccountManager, authCfg AuthCfg) *NameserversHandler
NewNameserversHandler returns a new instance of NameserversHandler handler
func (*NameserversHandler) CreateNameserverGroup ¶
func (h *NameserversHandler) CreateNameserverGroup(w http.ResponseWriter, r *http.Request)
CreateNameserverGroup handles nameserver group creation request
func (*NameserversHandler) DeleteNameserverGroup ¶
func (h *NameserversHandler) DeleteNameserverGroup(w http.ResponseWriter, r *http.Request)
DeleteNameserverGroup handles nameserver group deletion request
func (*NameserversHandler) GetAllNameservers ¶
func (h *NameserversHandler) GetAllNameservers(w http.ResponseWriter, r *http.Request)
GetAllNameservers returns the list of nameserver groups for the account
func (*NameserversHandler) GetNameserverGroup ¶
func (h *NameserversHandler) GetNameserverGroup(w http.ResponseWriter, r *http.Request)
GetNameserverGroup handles a nameserver group Get request identified by ID
func (*NameserversHandler) UpdateNameserverGroup ¶
func (h *NameserversHandler) UpdateNameserverGroup(w http.ResponseWriter, r *http.Request)
UpdateNameserverGroup handles update to a nameserver group identified by a given ID
type PATHandler ¶
type PATHandler struct {
// contains filtered or unexported fields
}
PATHandler is the nameserver group handler of the account
func NewPATsHandler ¶
func NewPATsHandler(accountManager server.AccountManager, authCfg AuthCfg) *PATHandler
NewPATsHandler creates a new PATHandler HTTP handler
func (*PATHandler) CreateToken ¶
func (h *PATHandler) CreateToken(w http.ResponseWriter, r *http.Request)
CreateToken is HTTP POST handler that creates a personal access token for the given user
func (*PATHandler) DeleteToken ¶
func (h *PATHandler) DeleteToken(w http.ResponseWriter, r *http.Request)
DeleteToken is HTTP DELETE handler that deletes a personal access token for the given user
func (*PATHandler) GetAllTokens ¶
func (h *PATHandler) GetAllTokens(w http.ResponseWriter, r *http.Request)
GetAllTokens is HTTP GET handler that returns a list of all personal access tokens for the given user
func (*PATHandler) GetToken ¶
func (h *PATHandler) GetToken(w http.ResponseWriter, r *http.Request)
GetToken is HTTP GET handler that returns a personal access token for the given user
type PeersHandler ¶
type PeersHandler struct {
// contains filtered or unexported fields
}
PeersHandler is a handler that returns peers of the account
func NewPeersHandler ¶
func NewPeersHandler(accountManager server.AccountManager, authCfg AuthCfg) *PeersHandler
NewPeersHandler creates a new PeersHandler HTTP handler
func (*PeersHandler) GetAllPeers ¶
func (h *PeersHandler) GetAllPeers(w http.ResponseWriter, r *http.Request)
GetAllPeers returns a list of all peers associated with a provided account
func (*PeersHandler) HandlePeer ¶
func (h *PeersHandler) HandlePeer(w http.ResponseWriter, r *http.Request)
HandlePeer handles all peer requests for GET, PUT and DELETE operations
type Policies ¶
type Policies struct {
// contains filtered or unexported fields
}
Policies is a handler that returns policy of the account
func NewPoliciesHandler ¶
func NewPoliciesHandler(accountManager server.AccountManager, authCfg AuthCfg) *Policies
NewPoliciesHandler creates a new Policies handler
func (*Policies) CreatePolicy ¶
func (h *Policies) CreatePolicy(w http.ResponseWriter, r *http.Request)
CreatePolicy handles policy creation request
func (*Policies) DeletePolicy ¶
func (h *Policies) DeletePolicy(w http.ResponseWriter, r *http.Request)
DeletePolicy handles policy deletion request
func (*Policies) GetAllPolicies ¶
func (h *Policies) GetAllPolicies(w http.ResponseWriter, r *http.Request)
GetAllPolicies list for the account
func (*Policies) GetPolicy ¶
func (h *Policies) GetPolicy(w http.ResponseWriter, r *http.Request)
GetPolicy handles a group Get request identified by ID
func (*Policies) UpdatePolicy ¶
func (h *Policies) UpdatePolicy(w http.ResponseWriter, r *http.Request)
UpdatePolicy handles update to a policy identified by a given ID
type RoutesHandler ¶
type RoutesHandler struct {
// contains filtered or unexported fields
}
RoutesHandler is the routes handler of the account
func NewRoutesHandler ¶
func NewRoutesHandler(accountManager server.AccountManager, authCfg AuthCfg) *RoutesHandler
NewRoutesHandler returns a new instance of RoutesHandler handler
func (*RoutesHandler) CreateRoute ¶
func (h *RoutesHandler) CreateRoute(w http.ResponseWriter, r *http.Request)
CreateRoute handles route creation request
func (*RoutesHandler) DeleteRoute ¶
func (h *RoutesHandler) DeleteRoute(w http.ResponseWriter, r *http.Request)
DeleteRoute handles route deletion request
func (*RoutesHandler) GetAllRoutes ¶
func (h *RoutesHandler) GetAllRoutes(w http.ResponseWriter, r *http.Request)
GetAllRoutes returns the list of routes for the account
func (*RoutesHandler) GetRoute ¶
func (h *RoutesHandler) GetRoute(w http.ResponseWriter, r *http.Request)
GetRoute handles a route Get request identified by ID
func (*RoutesHandler) UpdateRoute ¶
func (h *RoutesHandler) UpdateRoute(w http.ResponseWriter, r *http.Request)
UpdateRoute handles update to a route identified by a given ID
type RulesHandler ¶
type RulesHandler struct {
// contains filtered or unexported fields
}
RulesHandler is a handler that returns rules of the account
func NewRulesHandler ¶
func NewRulesHandler(accountManager server.AccountManager, authCfg AuthCfg) *RulesHandler
NewRulesHandler creates a new RulesHandler HTTP handler
func (*RulesHandler) CreateRule ¶
func (h *RulesHandler) CreateRule(w http.ResponseWriter, r *http.Request)
CreateRule handles rule creation request
func (*RulesHandler) DeleteRule ¶
func (h *RulesHandler) DeleteRule(w http.ResponseWriter, r *http.Request)
DeleteRule handles rule deletion request
func (*RulesHandler) GetAllRules ¶
func (h *RulesHandler) GetAllRules(w http.ResponseWriter, r *http.Request)
GetAllRules list for the account
func (*RulesHandler) GetRule ¶
func (h *RulesHandler) GetRule(w http.ResponseWriter, r *http.Request)
GetRule handles a group Get request identified by ID
func (*RulesHandler) UpdateRule ¶
func (h *RulesHandler) UpdateRule(w http.ResponseWriter, r *http.Request)
UpdateRule handles update to a rule identified by a given ID
type SetupKeysHandler ¶
type SetupKeysHandler struct {
// contains filtered or unexported fields
}
SetupKeysHandler is a handler that returns a list of setup keys of the account
func NewSetupKeysHandler ¶
func NewSetupKeysHandler(accountManager server.AccountManager, authCfg AuthCfg) *SetupKeysHandler
NewSetupKeysHandler creates a new SetupKeysHandler HTTP handler
func (*SetupKeysHandler) CreateSetupKey ¶
func (h *SetupKeysHandler) CreateSetupKey(w http.ResponseWriter, r *http.Request)
CreateSetupKey is a POST requests that creates a new SetupKey
func (*SetupKeysHandler) GetAllSetupKeys ¶
func (h *SetupKeysHandler) GetAllSetupKeys(w http.ResponseWriter, r *http.Request)
GetAllSetupKeys is a GET request that returns a list of SetupKey
func (*SetupKeysHandler) GetSetupKey ¶
func (h *SetupKeysHandler) GetSetupKey(w http.ResponseWriter, r *http.Request)
GetSetupKey is a GET request to get a SetupKey by ID
func (*SetupKeysHandler) UpdateSetupKey ¶
func (h *SetupKeysHandler) UpdateSetupKey(w http.ResponseWriter, r *http.Request)
UpdateSetupKey is a PUT request to update server.SetupKey
type UsersHandler ¶
type UsersHandler struct {
// contains filtered or unexported fields
}
UsersHandler is a handler that returns users of the account
func NewUsersHandler ¶
func NewUsersHandler(accountManager server.AccountManager, authCfg AuthCfg) *UsersHandler
NewUsersHandler creates a new UsersHandler HTTP handler
func (*UsersHandler) CreateUser ¶
func (h *UsersHandler) CreateUser(w http.ResponseWriter, r *http.Request)
CreateUser creates a User in the system with a status "invited" (effectively this is a user invite).
func (*UsersHandler) DeleteUser ¶
func (h *UsersHandler) DeleteUser(w http.ResponseWriter, r *http.Request)
DeleteUser is a DELETE request to delete a user
func (*UsersHandler) GetAllUsers ¶
func (h *UsersHandler) GetAllUsers(w http.ResponseWriter, r *http.Request)
GetAllUsers returns a list of users of the account this user belongs to. It also gathers additional user data (like email and name) from the IDP manager.
func (*UsersHandler) InviteUser ¶
func (h *UsersHandler) InviteUser(w http.ResponseWriter, r *http.Request)
InviteUser resend invitations to users who haven't activated their accounts, prior to the expiration period.
func (*UsersHandler) UpdateUser ¶
func (h *UsersHandler) UpdateUser(w http.ResponseWriter, r *http.Request)
UpdateUser is a PUT requests to update User data
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package api provides primitives to interact with the openapi HTTP API.
|
Package api provides primitives to interact with the openapi HTTP API. |