handler

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindByLinkId

func FindByLinkId(id string) (data string, err error)

func GenerateLinkId

func GenerateLinkId(data string) (id string, err error)

func Get

func Get(w io.Writer, _ *http.Request) (err error)
func GetByLink(w io.Writer, r *http.Request) (err error)

func GetKeysInJson

func GetKeysInJson(w io.Writer, r *http.Request) (err error)

func GetKeysInJsonArray

func GetKeysInJsonArray(w io.Writer, r *http.Request) (err error)

func Handler

func Handler(w http.ResponseWriter, r *http.Request)

func Load

func Load(lastID bson.ObjectId, limit int) (keys map[string]pub, err error)

func PutKey

func PutKey(p Request) (err error)

Types

type PspkStore

type PspkStore struct {
	Title string
	Keys  map[string]pub
}

type Request

type Request struct {
	ID     bson.ObjectId `json:"id,omitempty" bson:"_id,omitempty"`
	Name   string        `json:"name,omitempty" bson:"name"`
	Key    string        `json:"key,omitempty" bson:"key"`
	Method string        `json:"method,omitempty" bson:"-"`
	Data   string        `json:"data,omitempty" bson:"-"`
}

func ByName

func ByName(name string) (p Request, err error)

func FindByName

func FindByName(name string, r *http.Request) (result []Request, err error)

func LoadArray

func LoadArray(lastID bson.ObjectId, limit int) (keys []Request, err error)

Jump to

Keyboard shortcuts

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