Documentation ¶
Index ¶
- type CalendarAuth
- type Client
- type Credentials
- type EncryptedFile
- type OAuth2Object
- type OAuthHandler
- type Storage
- type Tenant
- type YamlStorage
- func (y *YamlStorage) ReadCalendarAuth(calendarID string) (*CalendarAuth, error)
- func (y *YamlStorage) RemoveCalendarAuth(calendarID string) error
- func (y *YamlStorage) Setup(config config.AuthStorage, encryptionPassphrase string) error
- func (y *YamlStorage) WriteCalendarAuth(newCal CalendarAuth) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CalendarAuth ¶
type CalendarAuth struct { CalendarID string OAuth2 OAuth2Object }
type Credentials ¶
type EncryptedFile ¶
type EncryptedFile struct {
// contains filtered or unexported fields
}
EncryptedFile offers
func NewEncryptedFile ¶
func NewEncryptedFile(file io.ReadWriter, passphrase string) *EncryptedFile
NewEncryptedFile takes the upstream io.ReadWriteCloser and a passphrase to setup an EncryptedFile The actual encryption or decryption setup will happen lazy on the first read or write
func (*EncryptedFile) Close ¶
func (e *EncryptedFile) Close() error
Close implements the io.Closer interface If ever data was encrypted, this closes the encryption stream
type OAuth2Object ¶
type OAuthHandler ¶
type OAuthHandler struct {
// contains filtered or unexported fields
}
func NewOAuthHandler ¶
func NewOAuthHandler(config oauth2.Config, bindPort uint) (*OAuthHandler, error)
func (*OAuthHandler) Configuration ¶
func (l *OAuthHandler) Configuration() *oauth2.Config
func (*OAuthHandler) Listen ¶
func (l *OAuthHandler) Listen(ctx context.Context) error
Listen is meant to be called as goroutine. Once your handler has finished, just cancel the context and the http server will shut down.
func (*OAuthHandler) Token ¶
func (l *OAuthHandler) Token() *oauth2.Token
type Storage ¶
type Storage interface { WriteCalendarAuth(CalendarAuth) (bool, error) ReadCalendarAuth(calendarID string) (*CalendarAuth, error) RemoveCalendarAuth(calendarID string) error Setup(config config.AuthStorage, encryptionPassphrase string) error }
func StorageFactory ¶
type YamlStorage ¶
type YamlStorage struct { StoragePath string StorageEncryptionKey string // Holds the decrypted CalendarAuth Config in memory, so the file does not have to be read multiple times CachedAuth []CalendarAuth }
func (*YamlStorage) ReadCalendarAuth ¶
func (y *YamlStorage) ReadCalendarAuth(calendarID string) (*CalendarAuth, error)
func (*YamlStorage) RemoveCalendarAuth ¶
func (y *YamlStorage) RemoveCalendarAuth(calendarID string) error
func (*YamlStorage) Setup ¶
func (y *YamlStorage) Setup(config config.AuthStorage, encryptionPassphrase string) error
func (*YamlStorage) WriteCalendarAuth ¶
func (y *YamlStorage) WriteCalendarAuth(newCal CalendarAuth) (bool, error)
Click to show internal directories.
Click to hide internal directories.