Documentation ¶
Overview ¶
Package token provides utilities for storing and retrieving data from a local file store.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTokenExpired is returned from Get when a token is past its expiration. ErrTokenExpired = errors.New("expired") // ErrNotExist is returned when a token doesn't exist. ErrNotExist = errors.New("does not exist") )
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store can store and retrieve tokens from the local file system.
func NewFileStore ¶
NewFileStore returns a token store that stores tokens on disk relative to a given root. All files will have 0600 permissions. That is, they are only readable by the user putting them on disk.
Paths passed to storage methods must be valid filesystem paths. Paths also must be file paths, not directories.
Click to show internal directories.
Click to hide internal directories.