Documentation
¶
Index ¶
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 Events ¶
type Events struct {
Devices []events.EventType `json:"Devices"`
Device []events.EventType `json:"Device"`
Resource []events.EventType `json:"Resource"`
StaticDeviceEvents bool `json:"StaticDeviceEvents"`
}
func (Events) NeedPullDevice ¶
func (Events) NeedPullDevices ¶
func (Events) NeedPullResources ¶
type LinkedAccount ¶
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" bson:"_id"`
Name string `json:"Name"`
OAuth oauth.Config `json:"OAuth"`
SupportedSubscriptionsEvents Events `json:"SupportedSubscriptionEvents"`
Endpoint Endpoint `json:"Endpoint"`
}
func (LinkedCloud) CtxWithHTTPClient ¶
func (l LinkedCloud) CtxWithHTTPClient(ctx context.Context) context.Context
func (LinkedCloud) GetHTTPClient ¶
func (l LinkedCloud) GetHTTPClient() *http.Client
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 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
}
type Token ¶
type Token struct {
AccessToken AccessToken
RefreshToken string
Expiry time.Time
}
func (Token) GetAccessToken ¶
func (o Token) GetAccessToken() (AccessToken, error)
func (Token) IsValidAccessToken ¶
Click to show internal directories.
Click to hide internal directories.