Documentation ¶
Index ¶
- Constants
- type Duration
- type GroupPeerResponse
- type GroupRequest
- type GroupResponse
- type Groups
- func (h *Groups) CreateOrUpdateGroupHandler(w http.ResponseWriter, r *http.Request)
- func (h *Groups) DeleteGroupHandler(w http.ResponseWriter, r *http.Request)
- func (h *Groups) GetAllGroupsHandler(w http.ResponseWriter, r *http.Request)
- func (h *Groups) GetGroupHandler(w http.ResponseWriter, r *http.Request)
- type PeerRequest
- type PeerResponse
- type Peers
- type RuleGroupResponse
- type RuleRequest
- type RuleResponse
- type Rules
- func (h *Rules) CreateOrUpdateRuleHandler(w http.ResponseWriter, r *http.Request)
- func (h *Rules) DeleteRuleHandler(w http.ResponseWriter, r *http.Request)
- func (h *Rules) GetAllRulesHandler(w http.ResponseWriter, r *http.Request)
- func (h *Rules) GetRuleHandler(w http.ResponseWriter, r *http.Request)
- type SetupKeyRequest
- type SetupKeyResponse
- type SetupKeys
- type UserHandler
- type UserResponse
Constants ¶
const FlowBidirectString = "bidirect"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Duration ¶
Duration is used strictly for JSON requests/responses due to duration marshalling issues
func (Duration) MarshalJSON ¶
func (*Duration) UnmarshalJSON ¶
type GroupPeerResponse ¶
GroupPeerResponse is a response sent to the client
type GroupRequest ¶
GroupRequest to create or update group
type GroupResponse ¶
type GroupResponse struct { ID string Name string Peers []GroupPeerResponse `json:",omitempty"` }
GroupResponse is a response sent to the client
type Groups ¶
type Groups struct {
// contains filtered or unexported fields
}
Groups is a handler that returns groups of the account
func (*Groups) CreateOrUpdateGroupHandler ¶
func (h *Groups) CreateOrUpdateGroupHandler(w http.ResponseWriter, r *http.Request)
func (*Groups) DeleteGroupHandler ¶
func (h *Groups) DeleteGroupHandler(w http.ResponseWriter, r *http.Request)
func (*Groups) GetAllGroupsHandler ¶
func (h *Groups) GetAllGroupsHandler(w http.ResponseWriter, r *http.Request)
GetAllGroupsHandler list for the account
func (*Groups) GetGroupHandler ¶
func (h *Groups) GetGroupHandler(w http.ResponseWriter, r *http.Request)
type PeerRequest ¶
type PeerRequest struct {
Name string
}
PeerRequest is a request sent by the client
type PeerResponse ¶
type PeerResponse struct { Name string IP string Connected bool LastSeen time.Time OS string Version string }
PeerResponse is a response sent to the client
type Peers ¶
type Peers struct {
// contains filtered or unexported fields
}
Peers is a handler that returns peers of the account
func (*Peers) HandlePeer ¶
func (h *Peers) HandlePeer(w http.ResponseWriter, r *http.Request)
type RuleGroupResponse ¶
RuleGroupResponse is a response sent to the client
type RuleRequest ¶
RuleRequest to create or update rule
type RuleResponse ¶
type RuleResponse struct { ID string Name string Source []RuleGroupResponse Destination []RuleGroupResponse Flow string }
RuleResponse is a response sent to the client
type Rules ¶
type Rules struct {
// contains filtered or unexported fields
}
Rules is a handler that returns rules of the account
func (*Rules) CreateOrUpdateRuleHandler ¶
func (h *Rules) CreateOrUpdateRuleHandler(w http.ResponseWriter, r *http.Request)
func (*Rules) DeleteRuleHandler ¶
func (h *Rules) DeleteRuleHandler(w http.ResponseWriter, r *http.Request)
func (*Rules) GetAllRulesHandler ¶
func (h *Rules) GetAllRulesHandler(w http.ResponseWriter, r *http.Request)
GetAllRulesHandler list for the account
func (*Rules) GetRuleHandler ¶
func (h *Rules) GetRuleHandler(w http.ResponseWriter, r *http.Request)
type SetupKeyRequest ¶
type SetupKeyRequest struct { Name string Type server.SetupKeyType ExpiresIn *util.Duration Revoked bool }
SetupKeyRequest is a request sent by client. This object contains fields that can be modified
type SetupKeyResponse ¶
type SetupKeyResponse struct { Id string Key string Name string Expires time.Time Type server.SetupKeyType Valid bool Revoked bool UsedTimes int LastUsed time.Time State string }
SetupKeyResponse is a response sent to the client
type SetupKeys ¶
type SetupKeys struct {
// contains filtered or unexported fields
}
SetupKeys is a handler that returns a list of setup keys of the account
func NewSetupKeysHandler ¶
func NewSetupKeysHandler(accountManager server.AccountManager, authAudience string) *SetupKeys
type UserHandler ¶
type UserHandler struct {
// contains filtered or unexported fields
}
func NewUserHandler ¶
func NewUserHandler(accountManager server.AccountManager, authAudience string) *UserHandler
func (*UserHandler) GetUsers ¶
func (u *UserHandler) GetUsers(w http.ResponseWriter, r *http.Request)
GetUsers 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.