Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTokenNotFound = errors.New("token not found")
Functions ¶
This section is empty.
Types ¶
type Destination ¶
type Destination struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
URL string `json:"url"`
}
Destination represents a destination for a stream.
type FileStore ¶
type FileStore struct {
// contains filtered or unexported fields
}
FileStore is a file-based store for persistent application state. It will probably be replaced with sqlite3 at some point.
FileStore is not thread-safe and should always be used from a single goroutine.
type State ¶
type State struct {
Destinations []Destination `json:"destinations"`
}
State is the storable persistent state.
type TokenStore ¶ added in v0.0.15
type TokenStore struct {
// contains filtered or unexported fields
}
TokenStore is a store which persistently stores tokens in the filesystem.
It will probably be replaced with sqlite3 at some point. All methods are safe for use from multiple goroutines.
func NewTokenStore ¶ added in v0.0.15
func NewTokenStore(dataDir string, logger *slog.Logger) *TokenStore
NewTokenStore creates a new TokenStore instance with the specified data directory and logger.
func (*TokenStore) Delete ¶ added in v0.0.15
func (s *TokenStore) Delete(key string) error
Delete removes a value from the store by its key.
Click to show internal directories.
Click to hide internal directories.