preauth

package
v0.9.29 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: BSD-2-Clause Imports: 4 Imported by: 3

Documentation

Overview

Package preauth implements persistent storage and retrieval of preauth requests

Index

Constants

This section is empty.

Variables

Database collection handle

Functions

func Delete

func Delete(id string) (err error)

Delete preauth by id

func Initialize

func Initialize()

Initialize is an explicit init. Requires db.Initialize Indexes are applied to the collection at this time.

Types

type PreAuth

type PreAuth struct {
	Id        string            `bson:"id" json:"id"`
	Type      string            `bson:"type" json:"type"`
	Nodes     []string          `bson:"nodes" json:"nodes"`
	Options   map[string]string `bson:"options" json:"options"`
	ValidTill time.Time         `bson:"validtill" json:"validtill"`
}

func Load

func Load(id string) (p *PreAuth, err error)

Load preauth by id

func New

func New(id string, t string, nids []string, options map[string]string) (p *PreAuth, err error)

New preauth takes the id, type, node ids, and a map of options

type PreAuthResponse added in v0.9.21

type PreAuthResponse struct {
	Url       string `json:"url"`
	ValidTill string `json:"validtill"`
	Format    string `json:"format"`
	Filename  string `json:"filename"`
	Files     int    `json:"files"`
	Size      int64  `json:"size"`
}

Jump to

Keyboard shortcuts

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