api

package
v0.0.0-...-90b39c7 Latest Latest
Warning

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

Go to latest
Published: May 26, 2018 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package api handles the creation and configuration of all API resource routes.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidPayload = errors.New("invalid payload")
)

Functions

func Cors

func Cors(next http.Handler) http.Handler

func NewRouter

func NewRouter(ds datastore.Store, tp auth.TokenProvider) http.Handler

NewRouter creates an API router based on the parameter datastore and token provider. It registers and configures all necessary routes.

Types

type Role

type Role string

Role is an identifier for a group of assigned grants.

type RoleGrant

type RoleGrant string

Role grant is an identifier for the right to perform an action.

type ValidatablePayload

type ValidatablePayload interface {
	Validate() error
}

Jump to

Keyboard shortcuts

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