Documentation ¶
Index ¶
- Constants
- type Account
- type Credentials
- type File
- type Folder
- type Item
- type Items
- type Login
- func (sf *Login) CreateFolder(ctx context.Context, name, parentFolderId string) (Folder, error)
- func (sf Login) CreateRequestShare(ctx context.Context, parentFolderId string) (Share, error)
- func (sf Login) CreateSendShare(ctx context.Context, files []File) (Share, error)
- func (sf Login) CreateShare(ctx context.Context, toCreate Share) (Share, error)
- func (sf *Login) CreateSubscription(ctx context.Context, toCreate WebhookSubscription) (WebhookSubscription, error)
- func (sf *Login) DeleteSubscription(ctx context.Context, subscriptionID string) error
- func (sf *Login) GetChildren(ctx context.Context, parentFolderId string) ([]Item, error)
- func (sf *Login) Subscribe(ctx context.Context, folder Folder, callbackURL string, eventTypes ...string) (WebhookSubscription, error)
- func (sf Login) UpdateSendShare(ctx context.Context, share Share, files []File) (Share, error)
- func (sf Login) UpdateShare(ctx context.Context, toUpdate Share) (Share, error)
- type Share
- type SubscribedResource
- type SubscribedResourceEvent
- type SubscriptionContext
- type SubscriptionEvent
- type WebhookSubscription
- type WebhookSubscriptionEvent
Constants ¶
View Source
const ( ResourceTypeFile = "File" ResourceTypeFolder = "Folder" OperationNameUpload = "Upload" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Subdomain string `json:"subdomain,omitempty"` AppControlPlane string `json:"appcp,omitempty"` APIControlPlane string `json:"apicp,omitempty"` }
func (Account) DownloadAllURL ¶
type Credentials ¶
type Item ¶
type Login ¶
type Login struct {
Credentials
}
func (*Login) CreateFolder ¶
func (Login) CreateRequestShare ¶
func (Login) CreateSendShare ¶
func (Login) CreateShare ¶
func (*Login) CreateSubscription ¶
func (sf *Login) CreateSubscription(ctx context.Context, toCreate WebhookSubscription) (WebhookSubscription, error)
func (*Login) DeleteSubscription ¶
func (*Login) GetChildren ¶
func (Login) UpdateSendShare ¶
type SubscribedResource ¶
type SubscribedResource struct { ID string `json:"Id,omitempty"` Parent *SubscribedResource `json:",omitempty"` }
type SubscribedResourceEvent ¶
type SubscriptionContext ¶
type SubscriptionEvent ¶
type SubscriptionEvent struct { Timestamp time.Time `json:",omitempty"` OperationName string `json:",omitempty"` ResourceType string `json:",omitempty"` Resource SubscribedResource `json:",omitempty"` }
type WebhookSubscription ¶
type WebhookSubscription struct { ID string `json:"Id,omitempty"` URL string `json:"url,omitempty"` SubscriptionContext SubscriptionContext `json:",omitempty"` Events []SubscribedResourceEvent `json:",omitempty"` WebhookURL string `json:"WebhookUrl,omitempty"` }
type WebhookSubscriptionEvent ¶
type WebhookSubscriptionEvent struct { WebhookSubscriptionID string `json:"WebhookSubscriptionId,omitempty"` AccountID string `json:"AccountId,omitempty"` Event SubscriptionEvent `json:",omitempty"` }
func ParseEvent ¶
func ParseEvent(rdr io.Reader) (WebhookSubscriptionEvent, error)
Click to show internal directories.
Click to hide internal directories.