handler

package
v0.0.0-...-5f71cfe Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Duration

type Duration struct {
	time.Duration
}

Duration is used strictly for JSON requests/responses due to duration marshalling issues

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) error

type Groups

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

Groups is a handler that returns groups of the account

func NewGroups

func NewGroups(accountManager server.AccountManager, authAudience string) *Groups

func (*Groups) CreateGroupHandler

func (h *Groups) CreateGroupHandler(w http.ResponseWriter, r *http.Request)

CreateGroupHandler handles group creation request

func (*Groups) DeleteGroupHandler

func (h *Groups) DeleteGroupHandler(w http.ResponseWriter, r *http.Request)

DeleteGroupHandler handles group deletion 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)

GetGroupHandler returns a group

func (*Groups) PatchGroupHandler

func (h *Groups) PatchGroupHandler(w http.ResponseWriter, r *http.Request)

PatchGroupHandler handles patch updates to a group identified by a given ID

func (*Groups) UpdateGroupHandler

func (h *Groups) UpdateGroupHandler(w http.ResponseWriter, r *http.Request)

UpdateGroupHandler handles update to a group identified by a given ID

type Peers

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

Peers is a handler that returns peers of the account

func NewPeers

func NewPeers(accountManager server.AccountManager, authAudience string) *Peers

func (*Peers) GetPeers

func (h *Peers) GetPeers(w http.ResponseWriter, r *http.Request)

func (*Peers) HandlePeer

func (h *Peers) HandlePeer(w http.ResponseWriter, r *http.Request)

type Rules

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

Rules is a handler that returns rules of the account

func NewRules

func NewRules(accountManager server.AccountManager, authAudience string) *Rules

func (*Rules) CreateRuleHandler

func (h *Rules) CreateRuleHandler(w http.ResponseWriter, r *http.Request)

CreateRuleHandler handles rule creation request

func (*Rules) DeleteRuleHandler

func (h *Rules) DeleteRuleHandler(w http.ResponseWriter, r *http.Request)

DeleteRuleHandler handles rule deletion 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)

GetRuleHandler handles a group Get request identified by ID

func (*Rules) PatchRuleHandler

func (h *Rules) PatchRuleHandler(w http.ResponseWriter, r *http.Request)

PatchRuleHandler handles patch updates to a rule identified by a given ID

func (*Rules) UpdateRuleHandler

func (h *Rules) UpdateRuleHandler(w http.ResponseWriter, r *http.Request)

UpdateRuleHandler handles update to a rule identified by a given ID

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

func (*SetupKeys) GetKeys

func (h *SetupKeys) GetKeys(w http.ResponseWriter, r *http.Request)

func (*SetupKeys) HandleKey

func (h *SetupKeys) HandleKey(w http.ResponseWriter, r *http.Request)

type UserHandler

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

func NewUserHandler

func NewUserHandler(accountManager server.AccountManager, authAudience string) *UserHandler

func (*UserHandler) GetUsers

func (h *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.

Jump to

Keyboard shortcuts

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