controllers

package
v0.0.0-...-277766b Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIIndexHandler

func APIIndexHandler(c echo.Context) error

func IndexHandler

func IndexHandler(c echo.Context) error

func LogoutHandler

func LogoutHandler(c echo.Context) error

func NewAPIAccountListHandler

func NewAPIAccountListHandler(s models.AccountStore) echo.HandlerFunc

func NewAPIConsoleRedirectHandler

func NewAPIConsoleRedirectHandler(a *AWSAPI, fe string) echo.HandlerFunc

func NewAPICredentialsHandler

func NewAPICredentialsHandler(a *AWSAPI) echo.HandlerFunc

func NewAPIRegionListHandler

func NewAPIRegionListHandler(a *AWSAPI) echo.HandlerFunc

func NewAPIUserListHandler

func NewAPIUserListHandler(s models.UserStore) echo.HandlerFunc

Types

type APIAccountHandler

type APIAccountHandler struct {
	Store      models.AccountStore
	AdminStore models.AccountStore
}

func (*APIAccountHandler) HandleDelete

func (h *APIAccountHandler) HandleDelete(c echo.Context) error

func (*APIAccountHandler) HandleGet

func (h *APIAccountHandler) HandleGet(c echo.Context) error

func (*APIAccountHandler) HandlePost

func (h *APIAccountHandler) HandlePost(c echo.Context) error

func (*APIAccountHandler) HandlePut

func (h *APIAccountHandler) HandlePut(c echo.Context) error

func (*APIAccountHandler) Register

func (h *APIAccountHandler) Register(prefix, postPrefix string, r glecho.URLRouter, mw ...echo.MiddlewareFunc)

type APIAccountListHandler

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

func (*APIAccountListHandler) HandleV1

func (h *APIAccountListHandler) HandleV1(c echo.Context) error

HandleV1 returns a list of JSON account objects

func (*APIAccountListHandler) HandleV2

func (h *APIAccountListHandler) HandleV2(c echo.Context) error

HandleV2 returns a map of lists of account objects. the key to the map is the short name of the cloud provider.

type APIConsoleRedirectHandler

type APIConsoleRedirectHandler struct {
	FederationIssuerEndpoint string
	*AWSAPI
}

func (*APIConsoleRedirectHandler) Handle

func (h *APIConsoleRedirectHandler) Handle(c echo.Context) error

type APICredentialsHandler

type APICredentialsHandler struct {
	*AWSAPI
}

func (*APICredentialsHandler) HandleBashV2

func (h *APICredentialsHandler) HandleBashV2(c echo.Context) error

func (*APICredentialsHandler) HandleINIV2

func (h *APICredentialsHandler) HandleINIV2(c echo.Context) error

func (*APICredentialsHandler) HandleJSONV1

func (h *APICredentialsHandler) HandleJSONV1(c echo.Context) error

func (*APICredentialsHandler) HandlePSLV2

func (h *APICredentialsHandler) HandlePSLV2(c echo.Context) error

type APIRegionListHandler

type APIRegionListHandler struct {
	*AWSAPI
	// contains filtered or unexported fields
}

func (*APIRegionListHandler) Handle

func (h *APIRegionListHandler) Handle(c echo.Context) error

type APIUserHandler

type APIUserHandler struct {
	Store models.UserStore
}

func (*APIUserHandler) HandleDelete

func (h *APIUserHandler) HandleDelete(c echo.Context) error

func (*APIUserHandler) HandleGet

func (h *APIUserHandler) HandleGet(c echo.Context) error

func (*APIUserHandler) HandlePost

func (h *APIUserHandler) HandlePost(c echo.Context) error

func (*APIUserHandler) HandlePut

func (h *APIUserHandler) HandlePut(c echo.Context) error

func (*APIUserHandler) Register

func (h *APIUserHandler) Register(prefix, postPrefix string, r glecho.URLRouter, mw ...echo.MiddlewareFunc)

type APIUserListHandler

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

func (*APIUserListHandler) Handle

func (h *APIUserListHandler) Handle(c echo.Context) error

type AWSAPI

type AWSAPI struct {
	Store   models.AccountStore
	Secrets secrets.Client
	// contains filtered or unexported fields
}

AWSAPI is a capability that all handlers talking to the AWS APIs should use. This capability does common permission checks and populates a request context with user, account, and AWS API information.

func (*AWSAPI) GetContext

func (h *AWSAPI) GetContext(c echo.Context) (*requestContext, error)

GetContext checks that the user is authenticated and is authorized to access the requested AWS account. This should be the very first call in any handler that will eventually call the AWS APIs. Errors returned from this method are echo responses and can be returned directly to the client.

func (*AWSAPI) Preload

func (h *AWSAPI) Preload(ctx context.Context) []error

Preload enumerates all managed accounts and pre-loads all of the clients into the cache.

This exists because there is replication delay of around 5-10 seconds for IAM users into other regions so these should be created as early in the process lifecycle as possible.

Jump to

Keyboard shortcuts

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