pspk

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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAgent     = "pspk-client/1.0.0"
	NameKey       = "name_key"
	NameSearchKey = "name_regex"
	LinkKey       = "link"
	OutputKey     = "output"
	LastIDKEy     = "last_key"
	LimitKey      = "limit"
	QRCodeKey     = "qr_code"
)

Variables

This section is empty.

Functions

func New

func New(basePath string) *pspk

Types

type GetAllOptions

type GetAllOptions struct {
	NameKey   string `url:"name_key,omitempty"`
	NameRegex string `url:"name_regex,omitempty"`
	Output    string `url:"output,omitempty"`
	LastKey   string `url:"last_key,omitempty"`
	Limit     int    `url:"limit,omitempty"`
}

type Key

type Key struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Key  string `json:"key"`
}

type PSPK

type PSPK interface {
	Publish(name string, key []byte) error
	Load(name string) ([]byte, error)
	GenerateLink(string) (string, error)
	DownloadByLink(string) (string, error)
	GetAll(opts GetAllOptions) ([]Key, error)
}

Jump to

Keyboard shortcuts

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