handlers

package
v0.0.0-...-614d85d Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAccessKey

func CreateAccessKey(c echo.Context) error

CreateAccessKey is the boilerplate code to call AccessKeyHandler::Create

func ListAccessKeys

func ListAccessKeys(c echo.Context) error

ListAccessKeys is the boilerplate code to call AccessKeyHandler::List

func QueryAccessKey

func QueryAccessKey(c echo.Context) error

QueryAccessKey handles API to query secret data from an access key

func Response

func Response(c echo.Context, code int, msg string) error

func RevokeAccessKey

func RevokeAccessKey(c echo.Context) error

RevokeAccessKey is the boilerplate code to call AccessKeyHandler::Revoke

Types

type AccessKeyHandler

type AccessKeyHandler interface {
	// Create handles API creating a new access key
	Create(c echo.Context) error

	// List handles API listing all access keys of a user
	List(c echo.Context) error

	// Remove handles API removing a given access key
	Revoke(c echo.Context) error
}

AccessKeyHandler contains methods to manage access keys

func NewAccessKeyHandler

func NewAccessKeyHandler(ks store.KeyStore) AccessKeyHandler

NewAccessKeyHandler returns an object implemented AccessKeyHandler

Jump to

Keyboard shortcuts

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