api

package
v0.0.0-...-fa7ace5 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDuplicate                  = fmt.Errorf("record already exists")
	ErrForeignKeyConstraintFailed = fmt.Errorf("a record could not be found from linked table (constraint failed)")
	ErrTablesMissing              = fmt.Errorf("database has not been setup correctly on the server")
	ErrUnknown                    = fmt.Errorf("unknown error occured")
)

Functions

This section is empty.

Types

type API

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

func NewAPI

func NewAPI(conn *db.Queries) API

func (*API) AddAccountRole

func (a *API) AddAccountRole(ctx echo.Context) error

func (*API) AddResourceRole

func (a *API) AddResourceRole(ctx echo.Context) error

func (*API) AdminAuthentication

func (a *API) AdminAuthentication(password string) echo.MiddlewareFunc

func (*API) CreateAccount

func (a *API) CreateAccount(ctx echo.Context) error

func (*API) CreateResource

func (a *API) CreateResource(ctx echo.Context) error

func (*API) CreateRole

func (a *API) CreateRole(ctx echo.Context) error

func (*API) ErrorHandler

func (a *API) ErrorHandler(err error, ctx echo.Context)

func (*API) NotFound

func (a *API) NotFound(ctx echo.Context) error

Jump to

Keyboard shortcuts

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