api

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Router *mux.Router
	// contains filtered or unexported fields
}

API provides a struct to wrap the api around

func Setup

func Setup(ctx context.Context, r *mux.Router, permissionsStore PermissionsStore) *API

Setup function sets up the api and returns an api

func (*API) GetRoleHandler added in v0.3.0

func (api *API) GetRoleHandler(w http.ResponseWriter, req *http.Request)

GetRoleHandler is a handler that gets a role by its ID from MongoDB

type PermissionsStore added in v0.3.0

type PermissionsStore interface {
	Checker(ctx context.Context, state *healthcheck.CheckState) error
	Close(ctx context.Context) error
	GetRole(ctx context.Context, id string) (*models.Role, error)
}

PermissionsStore defines the behaviour of a PermissionsStore

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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