Documentation ¶
Index ¶
- type Endpoint
- type Events
- type LinkedAccount
- type LinkedAccountData
- func (d LinkedAccountData) HasOrigin() bool
- func (d LinkedAccountData) HasTarget() bool
- func (d LinkedAccountData) Origin() oauth2.Token
- func (d LinkedAccountData) SetOrigin(originCloud oauth2.Token) LinkedAccountData
- func (d LinkedAccountData) SetTarget(targetCloud oauth2.Token) LinkedAccountData
- func (d LinkedAccountData) Target() oauth2.Token
- type LinkedAccountDataFlags
- type LinkedAccountHandler
- type LinkedAccountIter
- type LinkedCloud
- type LinkedCloudHandler
- type LinkedCloudIter
- type LinkedCloudsHandler
- type Query
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 LinkedAccount struct { ID string `bson:"_id"` LinkedCloudID string `bson:"linkedcloudid"` UserID string Data LinkedAccountData }
type LinkedAccountData ¶
type LinkedAccountData struct { OriginCloud oauth2.Token TargetCloud oauth2.Token State LinkedAccountDataFlags }
func MakeLinkedAccountData ¶
func MakeLinkedAccountData(originCloud, targetCloud oauth2.Token) LinkedAccountData
Create linked data with existing origin cloud and target cloud account
func (LinkedAccountData) HasOrigin ¶
func (d LinkedAccountData) HasOrigin() bool
func (LinkedAccountData) HasTarget ¶
func (d LinkedAccountData) HasTarget() bool
func (LinkedAccountData) Origin ¶
func (d LinkedAccountData) Origin() oauth2.Token
func (LinkedAccountData) SetOrigin ¶
func (d LinkedAccountData) SetOrigin(originCloud oauth2.Token) LinkedAccountData
func (LinkedAccountData) SetTarget ¶
func (d LinkedAccountData) SetTarget(targetCloud oauth2.Token) LinkedAccountData
func (LinkedAccountData) Target ¶
func (d LinkedAccountData) Target() oauth2.Token
type LinkedAccountDataFlags ¶
type LinkedAccountDataFlags uint8
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"` SupportedSubscriptionEvents Events `json:"supportedSubscriptionEvents"` Endpoint Endpoint `json:"endpoint"` }
func (LinkedCloud) CtxWithHTTPClient ¶
func (l LinkedCloud) CtxWithHTTPClient(ctx context.Context, tracerProvider trace.TracerProvider) context.Context
func (LinkedCloud) GetHTTPClient ¶
func (l LinkedCloud) GetHTTPClient(tracerProvider trace.TracerProvider) *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 Close(ctx context.Context) error }
Click to show internal directories.
Click to hide internal directories.