Documentation
¶
Index ¶
- type AccessToken
- type Endpoint
- type LinkedAccount
- type LinkedAccountHandler
- type LinkedAccountIter
- type LinkedCloud
- type LinkedCloudHandler
- type LinkedCloudIter
- type LinkedCloudsHandler
- type OAuth
- type Query
- type Store
- type Subscription
- type SubscriptionHandler
- type SubscriptionIter
- type SubscriptionQuery
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken string
func (AccessToken) GetSubject ¶
func (t AccessToken) GetSubject() (string, error)
func (AccessToken) String ¶
func (t AccessToken) String() string
type LinkedAccount ¶
func (LinkedAccount) RefreshTokens ¶
func (l LinkedAccount) RefreshTokens(ctx context.Context, s Store) (LinkedAccount, error)
type LinkedAccountHandler ¶
type LinkedAccountHandler interface {
Handle(ctx context.Context, iter LinkedAccountIter) (err error)
}
type LinkedAccountIter ¶
type LinkedAccountIter interface { Next(ctx context.Context, sub *LinkedAccount) bool Err() error }
type LinkedCloud ¶
type LinkedCloud struct { ID string `json:"ID"` Name string `json:"Name" envconfig:"NAME" required:"true"` ClientID string `json:"ClientId" envconfig:"CLIENT_ID" required:"true"` ClientSecret string `json:"ClientSecret" envconfig:"CLIENT_SECRET" required:"true"` Scopes []string `json:"Scopes" envconfig:"SCOPES" required:"true"` Endpoint Endpoint `json:"Endpoint"` Audience string `json:"Audience" envconfig:"AUDIENCE"` }
func (LinkedCloud) ToOAuth2Config ¶
func (l LinkedCloud) ToOAuth2Config() oauth2.Config
type LinkedCloudHandler ¶
type LinkedCloudHandler interface {
Handle(ctx context.Context, iter LinkedCloudIter) (err error)
}
type LinkedCloudIter ¶
type LinkedCloudIter interface { Next(ctx context.Context, sub *LinkedCloud) bool Err() error }
type LinkedCloudsHandler ¶
type LinkedCloudsHandler struct {
LinkedClouds []LinkedCloud
}
func (*LinkedCloudsHandler) Handle ¶
func (h *LinkedCloudsHandler) Handle(ctx context.Context, iter LinkedCloudIter) (err error)
type OAuth ¶
type OAuth struct { LinkedCloudID string AccessToken AccessToken RefreshToken string Expiry time.Time }
func (OAuth) GetAccessToken ¶
func (o OAuth) GetAccessToken() (AccessToken, error)
func (OAuth) IsValidAccessToken ¶
type Store ¶
type Store interface { UpdateLinkedCloud(ctx context.Context, sub LinkedCloud) error InsertLinkedCloud(ctx context.Context, sub LinkedCloud) error RemoveLinkedCloud(ctx context.Context, ConfigId string) error LoadLinkedClouds(ctx context.Context, query Query, h LinkedCloudHandler) error UpdateLinkedAccount(ctx context.Context, sub LinkedAccount) error InsertLinkedAccount(ctx context.Context, sub LinkedAccount) error RemoveLinkedAccount(ctx context.Context, LinkedAccountId string) error LoadLinkedAccounts(ctx context.Context, query Query, h LinkedAccountHandler) error LoadSubscriptions(ctx context.Context, query []SubscriptionQuery, h SubscriptionHandler) error FindOrCreateSubscription(ctx context.Context, sub Subscription) (Subscription, error) RemoveSubscriptions(ctx context.Context, query SubscriptionQuery) error }
type Subscription ¶
type SubscriptionHandler ¶
type SubscriptionHandler interface {
Handle(ctx context.Context, iter SubscriptionIter) (err error)
}
type SubscriptionIter ¶
type SubscriptionIter interface { Next(ctx context.Context, sub *Subscription) bool Err() error }
type SubscriptionQuery ¶
Click to show internal directories.
Click to hide internal directories.