utils

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0 Imports: 11 Imported by: 1

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 GetRandomIdentifier

func GetRandomIdentifier() (string, error)

Types

type PeacemakrAuthenticator

type PeacemakrAuthenticator struct {
	auth.Authenticator
}

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

func GetInMemPersister

func GetInMemPersister() Persister

Recommended that this not be used except for local testing

Jump to

Keyboard shortcuts

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