utils

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomString

func GenerateRandomString(s int) (string, error)

GenerateRandomString returns a URL-safe, base64 encoded securely generated random string. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.

func GetAuthWriter

func GetAuthWriter(apiKey string) runtime.ClientAuthInfoWriter

func GetRandomIdentifier

func GetRandomIdentifier() (string, error)

Types

type PeacemakrAuthenticator

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

func (*PeacemakrAuthenticator) AuthenticateRequest

func (a *PeacemakrAuthenticator) AuthenticateRequest(req runtime.ClientRequest, f strfmt.Registry) error

type Persister

type Persister interface {
	Save(key, value string) error
	Load(key string) (string, error)
	Exists(key string) bool
}

func GetDiskPersister

func GetDiskPersister(path string) Persister

Jump to

Keyboard shortcuts

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