app_access_token

package
v0.0.0-...-ca90b05 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2022 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(store Store, manager Manager, now time.Time) (string, error)

Types

type Manager

type Manager interface {
	Validate(string) (bool, error)
	Request() (string, time.Time, error)
}

type NoopManager

type NoopManager struct {
	Token         string
	Expires       time.Time
	ValidateError error
	RequestError  error
}

func (*NoopManager) Request

func (m *NoopManager) Request() (string, time.Time, error)

func (*NoopManager) Validate

func (m *NoopManager) Validate(token string) (bool, error)

type NoopStore

type NoopStore struct {
	StoreError error
	LoadError  error
	Token      string
	Expires    time.Time
}

func (*NoopStore) Load

func (s *NoopStore) Load() (string, time.Time, error)

func (*NoopStore) Store

func (s *NoopStore) Store(token string, expires time.Time) error

type Store

type Store interface {
	Store(token string, expires time.Time) error
	Load() (string, time.Time, error)
}

func NewFileStore

func NewFileStore(path string) Store

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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