prism

package module
v0.0.0-...-3d294e8 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: MIT Imports: 15 Imported by: 4

README

prism

GoDoc Build Status Coverage Status

Status: development

Documentation

Overview

Package prism implements a reflection based rest api builder using its subpackages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryTransfer

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

func (*BinaryTransfer) Download

func (bt *BinaryTransfer) Download(name string, input io.ReadSeeker, finally func(), validFor time.Duration) string

func (*BinaryTransfer) DownloadFile

func (bt *BinaryTransfer) DownloadFile(path string, validFor time.Duration) (string, error)

type Builder

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

func New

func New() Builder

func (Builder) API

func (b Builder) API(label string, apiFunc func(a *api.API, bt *BinaryTransfer)) Builder

func (Builder) AuthConfig

func (b Builder) AuthConfig(config apiauth.Config) Builder

func (Builder) AuthDB

func (b Builder) AuthDB(authDB *bbolt.DB) Builder

func (Builder) Build

func (b Builder) Build() (*Prism, error)

func (Builder) Description

func (b Builder) Description(description string) Builder

func (Builder) Host

func (b Builder) Host(host string) Builder

func (Builder) Schemes

func (b Builder) Schemes(schemes ...string) Builder

func (Builder) Title

func (b Builder) Title(title string) Builder

type Prism

type Prism struct {
	User    *apiauth.Authorizer
	Admin   *apiauth.Authorizer
	Handler http.Handler
}

Directories

Path Synopsis
_examples
Package api implements reflection based http.Handler generation.
Package api implements reflection based http.Handler generation.
Package apiauth provides persistent authorization based on boltdb.
Package apiauth provides persistent authorization based on boltdb.
Package apidoc implements reflection based api documentation using the OpenAPI 2.0 specification (Swagger).
Package apidoc implements reflection based api documentation using the OpenAPI 2.0 specification (Swagger).
Package swaggerui provides a http.Handler to serve apidoc.Documentation with swagger-ui (v3.19.4).
Package swaggerui provides a http.Handler to serve apidoc.Documentation with swagger-ui (v3.19.4).

Jump to

Keyboard shortcuts

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