ciolite

package
v0.0.0-...-90da9b4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package ciolite is the Golang client library for the Lite Context.IO API

Package ciolite is a generated GoMock package.

Index

Constants

View Source
const (
	// DefaultHost is the default host of CIO Lite API
	DefaultHost = "https://api.context.io"

	// DefaultRequestTimeout is the default timeout duration used on HTTP requests
	DefaultRequestTimeout = 120 * time.Second
)
View Source
const (
	UnknownStatusCode = -1
	UnknownPayload    = "UNKNOWN"
	UnknownMethod     = "UNKNOWN"
	UnknownURL        = "UNKNOWN"
)

Variables

This section is empty.

Functions

func ErrorMethod

func ErrorMethod(err error) string

ErrorMethod returns the method of the error, or an empty string

func ErrorPayload

func ErrorPayload(err error) string

ErrorPayload returns the payload of the error, or an empty string

func ErrorStatusCode

func ErrorStatusCode(err error) int

ErrorStatusCode returns the StatusCode of the error, or 0

func ErrorURL

func ErrorURL(err error) string

ErrorURL returns the URL of the error, or an empty string

func UnmarshalJSON

func UnmarshalJSON(data []byte) (error, error)

UnmarshalJSON is a helper method to unmarshal the json representation of a RequestError, getting back a valid nil error if it should be nil, and a valid RequestError error otherwise.

Pay attention to return value order: First argument is the unmarshalled RequestError as an error interface,
Second argument is any actual error encountered while unmarshalling (from json.Unmarshal).

Types

type Address

type Address struct {
	Email string `json:"email,omitempty"`
	Name  string `json:"name,omitempty"`
}

Address embedded data struct within GetUsersEmailAccountFolderMessageAddresses and WebhookMessageDataAddresses

func (*Address) UnmarshalJSON

func (m *Address) UnmarshalJSON(b []byte) error

UnmarshalJSON is here because the empty state is an array in the json, and is a object/map when populated

type CioLite

type CioLite struct {
	Host string

	// Allow setting your own *http.Client, otherwise default is client with DefaultRequestTimeout
	HTTPClient *http.Client

	// PreRequestHook is a function (mostly for logging) that will be executed
	// before the request is made.
	// 	Its arguments are:
	// 	User ID (if present),
	// 	Account Label (if present),
	// 	Method (GET/POST/etc),
	// 	URL,
	// 	redacted body values.
	PreRequestHook func(string, string, string, string, url.Values)

	// PostRequestShouldRetryHook is a function (mostly for logging) that will be
	// executed after each request is made, and will be called at least once.
	// 	Its arguments are:
	// 	request Attempt # (starts at 1),
	// 	User ID (if present),
	// 	Account Label (if present),
	// 	Method (GET/POST/etc),
	// 	URL,
	// 	response Status Code,
	// 	response Payload,
	// 	time at start of most recent attempt,
	// 	time at start of all attempts,
	// 	any error received while attempting this request.
	// The returned boolean is whether this request should be retried or not, which
	// if False then this is the last call of this function, but if True means this
	// function will be called again.
	PostRequestShouldRetryHook func(int, string, string, string, string, int, string, time.Time, time.Time, error) bool

	// ResponseBodyCloseErrorHook is a function (purely for logging) that will
	// execute if there is an error closing the response body.
	ResponseBodyCloseErrorHook func(error)
	// contains filtered or unexported fields
}

CioLite struct contains the api key and secret, along with an optional logger, and provides convenience functions for accessing all CIO Lite endpoints.

func NewCioLite

func NewCioLite(key string, secret string) CioLite

NewCioLite returns a CIO Lite struct (without a logger) for accessing the CIO Lite API.

func NewTestCioLiteServer

func NewTestCioLiteServer(handler http.Handler) (CioLite, *httptest.Server)

NewTestCioLiteServer is a convenience function that returns a CioLite object and a *httptest.Server (which must be closed when done being used). The CioLite instance will hit the test server for all requests.

func (CioLite) CheckConnectToken

func (cioLite CioLite) CheckConnectToken(connectToken GetConnectTokenResponse, email string) error

CheckConnectToken checks and returns nil if the connect token was used, the email authorized matches the expected email, and that CIO has access to the account.

func (CioLite) CreateConnectToken

func (cioLite CioLite) CreateConnectToken(formValues CreateConnectTokenParams) (CreateConnectTokenResponse, error)

CreateConnectToken creates and obtains a new connect token. formValues requires CallbackURL, and optionally may have Email, FirstName, LastName, StatusCallbackURL

https://context.io/docs/lite/connect_tokens#post

func (CioLite) CreateOAuthProvider

func (cioLite CioLite) CreateOAuthProvider(formValues CreateOAuthProviderParams) (CreateOAuthProviderResponse, error)

CreateOAuthProvider adds a new OAuth2 provider. formValues requires Type, ProviderConsumerKey, and ProviderConsumerSecret

func (CioLite) CreateStatusCallbackURL

func (cioLite CioLite) CreateStatusCallbackURL(formValues CreateStatusCallbackURLParams) (CreateDeleteStatusCallbackURLResponse, error)

CreateStatusCallbackURL create an app status callback url. Requires: StatusCallbackURL

func (CioLite) CreateUser

func (cioLite CioLite) CreateUser(formValues CreateUserParams) (CreateUserResponse, error)

CreateUser create a new user. formValues can optionally be empty if just creating a user without any email accounts, but if creating a user and an email account at the same time then it is required to have: Email, Server, Username, UseSSL, Port, Type, and (if OAUTH) ProviderRefreshToken and ProviderConsumerKey, and (if not OAUTH) Password, and may optionally contain MigrateAccountID, FirstName, LastName, StatusCallbackURL

func (CioLite) CreateUserConnectToken

func (cioLite CioLite) CreateUserConnectToken(userID string, formValues CreateConnectTokenParams) (CreateConnectTokenResponse, error)

CreateUserConnectToken creates and obtains a new connect_token for a specific user. formValues requires CallbackURL, and may optionally have Email, FirstName, LastName, StatusCallbackURL

func (CioLite) CreateUserEmailAccount

func (cioLite CioLite) CreateUserEmailAccount(userID string, formValues CreateUserParams) (CreateEmailAccountResponse, error)

CreateUserEmailAccount adds a mailbox to a given user. formValues requires Email, Server, Username, UseSSL, Port, Type, and (if OAUTH) ProviderRefreshToken and ProviderConsumerKey, and (if not OAUTH) Password, and may optionally contain StatusCallbackURL

func (CioLite) CreateUserEmailAccountConnectToken

func (cioLite CioLite) CreateUserEmailAccountConnectToken(userID string, label string, formValues CreateConnectTokenParams) (CreateConnectTokenResponse, error)

CreateUserEmailAccountConnectToken creates and obtains a new connect_token for a specific user email account. formValues requires CallbackURL

func (CioLite) CreateUserEmailAccountFolder

func (cioLite CioLite) CreateUserEmailAccountFolder(userID string, label string, folder string, formValues EmailAccountFolderDelimiterParam) (CreateEmailAccountFolderResponse, error)

CreateUserEmailAccountFolder create a folder on an email account. This call will fail if the folder already exists. queryValues may optionally contain Delimiter

func (CioLite) CreateUserWebhook

func (cioLite CioLite) CreateUserWebhook(userID string, formValues CreateUserWebhookParams) (CreateUserWebhookResponse, error)

CreateUserWebhook creates a new Webhook on a user. formValues requires CallbackURL, FailureNotifUrl, and may optionally contain FilterTo, FilterFrom, FilterCC, FilterSubject, FilterThread, FilterNewImportant, FilterFileName, FilterFolderAdded, FilterToDomain, FilterFromDomain, IncludeBody, BodyType

func (CioLite) CreateWebhook

func (cioLite CioLite) CreateWebhook(formValues CreateUserWebhookParams) (CreateUserWebhookResponse, error)

CreateWebhook creates a new Webhook for the application. formValues requires CallbackURL, FailureNotifUrl, and may optionally contain FilterTo, FilterFrom, FilterCC, FilterSubject, FilterThread, FilterNewImportant, FilterFileName, FilterFolderAdded, FilterToDomain, FilterFromDomain, IncludeBody, BodyType

func (CioLite) DeleteConnectToken

func (cioLite CioLite) DeleteConnectToken(token string) (DeleteConnectTokenResponse, error)

DeleteConnectToken removes a given connect token

https://context.io/docs/lite/connect_tokens#id-delete

func (CioLite) DeleteOAuthProvider

func (cioLite CioLite) DeleteOAuthProvider(key string) (DeleteOAuthProviderResponse, error)

DeleteOAuthProvider removes a given OAuth provider.

func (CioLite) DeleteStatusCallbackURL

func (cioLite CioLite) DeleteStatusCallbackURL() (CreateDeleteStatusCallbackURLResponse, error)

DeleteStatusCallbackURL removes an app status callback url.

func (CioLite) DeleteUser

func (cioLite CioLite) DeleteUser(userID string) (DeleteUserResponse, error)

DeleteUser removes a given user.

func (CioLite) DeleteUserConnectToken

func (cioLite CioLite) DeleteUserConnectToken(userID string, token string) (DeleteConnectTokenResponse, error)

DeleteUserConnectToken removes a given connect token for a specific user.

func (CioLite) DeleteUserEmailAccount

func (cioLite CioLite) DeleteUserEmailAccount(userID string, label string) (DeleteEmailAccountResponse, error)

DeleteUserEmailAccount deletes an email account of a user.

func (CioLite) DeleteUserEmailAccountConnectToken

func (cioLite CioLite) DeleteUserEmailAccountConnectToken(userID string, label string, token string) (DeleteConnectTokenResponse, error)

DeleteUserEmailAccountConnectToken removes a given connect token for a specific user email account.

func (CioLite) DeleteUserWebhookAccount

func (cioLite CioLite) DeleteUserWebhookAccount(userID string, webhookID string) (DeleteWebhookResponse, error)

DeleteUserWebhookAccount cancels a Webhook.

func (CioLite) DeleteWebhookAccount

func (cioLite CioLite) DeleteWebhookAccount(webhookID string) (DeleteWebhookResponse, error)

DeleteWebhookAccount cancels a Webhook.

func (CioLite) GetConnectToken

func (cioLite CioLite) GetConnectToken(token string) (GetConnectTokenResponse, error)

GetConnectToken gets information about a given connect token.

https://context.io/docs/lite/connect_tokens#id-get

func (CioLite) GetConnectTokens

func (cioLite CioLite) GetConnectTokens() ([]GetConnectTokenResponse, error)

GetConnectTokens get a list of connect tokens created with your API key.

https://context.io/docs/lite/connect_tokens#get

func (CioLite) GetDiscovery

func (cioLite CioLite) GetDiscovery(queryValues GetDiscoveryParams) (GetDiscoveryResponse, error)

GetDiscovery attempts to discover connection settings for a given email address. queryValues requires Email to be set.

func (CioLite) GetOAuthProvider

func (cioLite CioLite) GetOAuthProvider(key string) (GetOAuthProvidersResponse, error)

GetOAuthProvider gets information about a given OAuth provider.

func (CioLite) GetOAuthProviders

func (cioLite CioLite) GetOAuthProviders() ([]GetOAuthProvidersResponse, error)

GetOAuthProviders get the list of OAuth providers configured.

func (CioLite) GetStatusCallbackURL

func (cioLite CioLite) GetStatusCallbackURL() (GetStatusCallbackURLResponse, error)

GetStatusCallbackURL gets a list of app status callback url's.

func (CioLite) GetUser

func (cioLite CioLite) GetUser(userID string) (GetUsersResponse, error)

GetUser get details about a given user.

func (CioLite) GetUserConnectToken

func (cioLite CioLite) GetUserConnectToken(userID string, token string) (GetConnectTokenResponse, error)

GetUserConnectToken gets information about a given connect token for a specific user.

func (CioLite) GetUserConnectTokens

func (cioLite CioLite) GetUserConnectTokens(userID string) ([]GetConnectTokenResponse, error)

GetUserConnectTokens gets a list of connect tokens created for a user.

func (CioLite) GetUserEmailAccount

func (cioLite CioLite) GetUserEmailAccount(userID string, label string) (GetUsersEmailAccountsResponse, error)

GetUserEmailAccount gets the parameters and status for an email account. Status can be one of: OK, CONNECTION_IMPOSSIBLE, INVALID_CREDENTIALS, TEMP_DISABLED, DISABLED

func (CioLite) GetUserEmailAccountConnectToken

func (cioLite CioLite) GetUserEmailAccountConnectToken(userID string, label string, token string) (GetConnectTokenResponse, error)

GetUserEmailAccountConnectToken gets information about a given connect token for a specific user email account.

func (CioLite) GetUserEmailAccountConnectTokens

func (cioLite CioLite) GetUserEmailAccountConnectTokens(userID string, label string) ([]GetConnectTokenResponse, error)

GetUserEmailAccountConnectTokens gets a list of connect tokens created for a user email account.

func (CioLite) GetUserEmailAccountFolder

func (cioLite CioLite) GetUserEmailAccountFolder(userID string, label string, folder string, queryValues EmailAccountFolderDelimiterParam) (GetUsersEmailAccountFoldersResponse, error)

GetUserEmailAccountFolder gets information about a given folder. queryValues may optionally contain Delimiter

func (CioLite) GetUserEmailAccountFolderMessage

func (cioLite CioLite) GetUserEmailAccountFolderMessage(userID string, label string, folder string, messageID string, queryValues GetUserEmailAccountsFolderMessageParams) (GetUsersEmailAccountFolderMessagesResponse, error)

GetUserEmailAccountFolderMessage gets file, contact and other information about a given email message. queryValues may optionally contain Delimiter, IncludeBody, BodyType, IncludeHeaders, IncludeFlags

func (CioLite) GetUserEmailAccountMessage

func (cioLite CioLite) GetUserEmailAccountMessage(userID string, label string, messageID string, queryValues GetUserEmailAccountsMessageParams) (GetUsersEmailAccountMessagesResponse, error)

GetUserEmailAccountMessage gets file, contact and other information about a given email message. queryValues may optionally contain Delimiter, IncludeBody, BodyType, IncludeHeaders, IncludeFlags

func (CioLite) GetUserEmailAccounts

func (cioLite CioLite) GetUserEmailAccounts(userID string, queryValues GetUserEmailAccountsParams) ([]GetUsersEmailAccountsResponse, error)

GetUserEmailAccounts gets a list of email accounts assigned to a user. queryValues may optionally contain Status, StatusOK

func (CioLite) GetUserEmailAccountsFolderMessageAttachment

func (cioLite CioLite) GetUserEmailAccountsFolderMessageAttachment(userID string, label string, folder string, messageID string, attachmentID string, queryValues GetUserEmailAccountsFolderMessageAttachmentParam) (GetUserEmailAccountsFolderMessageAttachmentsResponse, error)

GetUserEmailAccountsFolderMessageAttachment retrieves an email attachment. queryValues may optionally contain Delimiter and AsLink

func (CioLite) GetUserEmailAccountsFolderMessageAttachments

func (cioLite CioLite) GetUserEmailAccountsFolderMessageAttachments(userID string, label string, folder string, messageID string, queryValues EmailAccountFolderDelimiterParam) ([]GetUserEmailAccountsFolderMessageAttachmentsResponse, error)

GetUserEmailAccountsFolderMessageAttachments gets listings of email attachments. queryValues may optionally contain Delimiter

func (CioLite) GetUserEmailAccountsFolderMessageBody

func (cioLite CioLite) GetUserEmailAccountsFolderMessageBody(userID string, label string, folder string, messageID string, queryValues GetUserEmailAccountsFolderMessageBodyParams) ([]GetUserEmailAccountsFolderMessageBodyResponse, error)

GetUserEmailAccountsFolderMessageBody fetches the message body of a given email. queryValues may optionally contain Delimiter, Type

func (CioLite) GetUserEmailAccountsFolderMessageFlags

func (cioLite CioLite) GetUserEmailAccountsFolderMessageFlags(userID string, label string, folder string, messageID string, queryValues EmailAccountFolderDelimiterParam) (GetUserEmailAccountsFolderMessageFlagsResponse, error)

GetUserEmailAccountsFolderMessageFlags returns the message flags. queryValues may optionally contain Delimiter

func (CioLite) GetUserEmailAccountsFolderMessageHeaders

func (cioLite CioLite) GetUserEmailAccountsFolderMessageHeaders(userID string, label string, folder string, messageID string, queryValues GetUserEmailAccountsFolderMessageHeadersParams) (GetUserEmailAccountsFolderMessageHeadersResponse, error)

GetUserEmailAccountsFolderMessageHeaders gets the complete headers of a given email message. queryValues may optionally contain Delimiter, Raw

func (CioLite) GetUserEmailAccountsFolderMessageRaw

func (cioLite CioLite) GetUserEmailAccountsFolderMessageRaw(userID string, label string, folder string, messageID string, queryValues EmailAccountFolderDelimiterParam) (GetUserEmailAccountsFolderMessageRawResponse, error)

GetUserEmailAccountsFolderMessageRaw fetches the raw RFC-822 message text of a given email. queryValues may optionally contain Delimiter

func (CioLite) GetUserEmailAccountsFolderMessages

func (cioLite CioLite) GetUserEmailAccountsFolderMessages(userID string, label string, folder string, queryValues GetUserEmailAccountsFolderMessageParams) ([]GetUsersEmailAccountFolderMessagesResponse, error)

GetUserEmailAccountsFolderMessages gets listings of email messages for a user. queryValues may optionally contain Delimiter, IncludeBody, BodyType, IncludeHeaders, IncludeFlags, Limit, Offset

func (CioLite) GetUserEmailAccountsFolders

func (cioLite CioLite) GetUserEmailAccountsFolders(userID string, label string, queryValues GetUserEmailAccountsFoldersParams) ([]GetUsersEmailAccountFoldersResponse, error)

GetUserEmailAccountsFolders gets a list of folders in an email account. queryValues may optionally contain IncludeNamesOnly

func (CioLite) GetUserEmailAccountsMessages

func (cioLite CioLite) GetUserEmailAccountsMessages(userID string, label string, queryValues GetUserEmailAccountsMessageParams) ([]GetUsersEmailAccountMessagesResponse, error)

GetUserEmailAccountsMessages gets listings of email messages for a user. queryValues may optionally contain Delimiter, IncludeBody, BodyType, IncludeHeaders, IncludeFlags, Limit, Offset

func (CioLite) GetUserWebhook

func (cioLite CioLite) GetUserWebhook(userID string, webhookID string) (GetUsersWebhooksResponse, error)

GetUserWebhook gets the properties of a given Webhook.

func (CioLite) GetUserWebhooks

func (cioLite CioLite) GetUserWebhooks(userID string) ([]GetUsersWebhooksResponse, error)

GetUserWebhooks gets listings of Webhooks configured for a user.

func (CioLite) GetUsers

func (cioLite CioLite) GetUsers(queryValues GetUsersParams) ([]GetUsersResponse, error)

GetUsers gets a list of users. queryValues may optionally contain Email, Status, StatusOK, Limit, Offset

func (CioLite) GetWebhook

func (cioLite CioLite) GetWebhook(webhookID string) (GetUsersWebhooksResponse, error)

GetWebhook gets the properties of a given Webhook.

func (CioLite) GetWebhooks

func (cioLite CioLite) GetWebhooks() ([]GetUsersWebhooksResponse, error)

GetWebhooks gets listings of Webhooks configured for the application.

func (CioLite) MarkUserEmailAccountsFolderMessageRead

func (cioLite CioLite) MarkUserEmailAccountsFolderMessageRead(userID string, label string, folder string, messageID string, formValues EmailAccountFolderDelimiterParam) (UserEmailAccountsFolderMessageReadResponse, error)

MarkUserEmailAccountsFolderMessageRead marks the message as read. formValues may optionally contain Delimiter

func (CioLite) MarkUserEmailAccountsFolderMessageUnRead

func (cioLite CioLite) MarkUserEmailAccountsFolderMessageUnRead(userID string, label string, folder string, messageID string, formValues EmailAccountFolderDelimiterParam) (UserEmailAccountsFolderMessageReadResponse, error)

MarkUserEmailAccountsFolderMessageUnRead marks the message as unread. formValues may optionally contain Delimiter

func (CioLite) ModifyUser

func (cioLite CioLite) ModifyUser(userID string, formValues ModifyUserParams) (ModifyUserResponse, error)

ModifyUser modifies a given user. formValues requires FirstName, LastName

func (CioLite) ModifyUserEmailAccount

func (cioLite CioLite) ModifyUserEmailAccount(userID string, label string, formValues ModifyUserEmailAccountParams) (ModifyEmailAccountResponse, error)

ModifyUserEmailAccount modifies an email account on a given user. formValues optionally may contain Status, ForceStatusCheck, Password, ProviderRefreshToken, ProviderConsumerKey, StatusCallbackURL

func (CioLite) ModifyUserWebhook

func (cioLite CioLite) ModifyUserWebhook(userID string, webhookID string, formValues ModifyUserWebhookParams) (ModifyWebhookResponse, error)

ModifyUserWebhook changes the properties of a given Webhook. formValues requires Active

func (CioLite) ModifyWebhook

func (cioLite CioLite) ModifyWebhook(webhookID string, formValues ModifyUserWebhookParams) (ModifyWebhookResponse, error)

ModifyWebhook changes the properties of a given Webhook. formValues requires Active

func (CioLite) MoveUserEmailAccountFolderMessage

func (cioLite CioLite) MoveUserEmailAccountFolderMessage(userID string, label string, folder string, messageID string, queryValues MoveUserEmailAccountFolderMessageParams) (MoveUserEmailAccountFolderMessageResponse, error)

MoveUserEmailAccountFolderMessage moves a message. formValues requires NewFolderID, and may optionally contain Delimiter

func (CioLite) SafeCreateUserEmailAccountFolder

func (cioLite CioLite) SafeCreateUserEmailAccountFolder(userID string, label string, folder string, formValues EmailAccountFolderDelimiterParam) (bool, error)

SafeCreateUserEmailAccountFolder will safely check if a folder exists, and create it if it does not. This function returns a bool representing whether it had to create a folder, and any errors it received. queryValues may optionally contain Delimiter

func (CioLite) ValidateCallback

func (cio CioLite) ValidateCallback(token string, signature string, timestamp int) bool

ValidateCallback returns true if this Webhook Callback or User Account Status Callback authenticates

type CreateConnectTokenParams

type CreateConnectTokenParams struct {
	// Required:
	CallbackURL string `json:"callback_url"`

	// Optional:
	Email             string `json:"email,omitempty"`
	FirstName         string `json:"first_name,omitempty"`
	LastName          string `json:"last_name,omitempty"`
	StatusCallbackURL string `json:"status_callback_url,omitempty"`
}

CreateConnectTokenParams form values data struct. Requires CallbackURL, and optionally may have Email, FirstName, LastName, StatusCallbackURL.

https://context.io/docs/lite/connect_tokens#post
https://context.io/docs/lite/users/connect_tokens#post

type CreateConnectTokenResponse

type CreateConnectTokenResponse struct {
	Success            bool   `json:"success,omitempty"`
	Token              string `json:"token,omitempty"`
	ResourceURL        string `json:"resource_url,omitempty"`
	BrowserRedirectURL string `json:"browser_redirect_url,omitempty"`
	AccessToken        string `json:"access_token,omitempty"`
	AccessTokenSecret  string `json:"access_token_secret,omitempty"`
}

CreateConnectTokenResponse data struct

https://context.io/docs/lite/connect_tokens#post

type CreateDeleteStatusCallbackURLResponse

type CreateDeleteStatusCallbackURLResponse struct {
	Success bool `json:"success,omitempty"`
}

CreateDeleteStatusCallbackURLResponse data struct

type CreateEmailAccountFolderResponse

type CreateEmailAccountFolderResponse struct {
	Success bool `json:"success,omitempty"`
}

CreateEmailAccountFolderResponse data struct

type CreateEmailAccountResponse

type CreateEmailAccountResponse struct {
	Status               string `json:"status,omitempty"`
	Label                string `json:"label,omitempty"`
	ResourceURL          string `json:"resource_url,omitempty"`
	MailServiceAccountID string `json:"mailservice_account_id,omitempty"`
}

CreateEmailAccountResponse data struct

type CreateOAuthProviderParams

type CreateOAuthProviderParams struct {
	// Requires:
	Type                   string `json:"type"`
	ProviderConsumerKey    string `json:"provider_consumer_key"`
	ProviderConsumerSecret string `json:"provider_consumer_secret"`
}

CreateOAuthProviderParams form values data struct. Requires Type, ProviderConsumerKey, ProviderConsumerSecret.

type CreateOAuthProviderResponse

type CreateOAuthProviderResponse struct {
	Success             bool   `json:"success,omitempty"`
	ProviderConsumerKey string `json:"provider_consumer_key,omitempty"`
	ResourceURL         string `json:"resource_url,omitempty"`
}

CreateOAuthProviderResponse data struct

type CreateStatusCallbackURLParams

type CreateStatusCallbackURLParams struct {
	StatusCallbackURL string `json:"status_callback_url,omitempty"`
}

CreateStatusCallbackURLParams form values data struct. Requires: StatusCallbackURL

type CreateUserParams

type CreateUserParams struct {
	// Optional, but Required for creating an Email Account
	Email    string `json:"email"`
	Server   string `json:"server"`
	Username string `json:"username"`
	Type     string `json:"type"`
	UseSSL   bool   `json:"use_ssl"`
	Port     int    `json:"port"`

	// Optional, but Required for OAUTH:
	ProviderRefreshToken string `json:"provider_refresh_token,omitempty"`
	ProviderConsumerKey  string `json:"provider_consumer_key,omitempty"`

	// Optional, but Required for non-OAUTH:
	Password string `json:"password,omitempty"`

	// Optional:
	StatusCallbackURL string `json:"status_callback_url,omitempty"`

	// Optional for CreaseUser only (not used by CreateUserEmailAccount):
	MigrateAccountID string `json:"migrate_account_id,omitempty"`
	FirstName        string `json:"first_name,omitempty"`
	LastName         string `json:"last_name,omitempty"`
}

CreateUserParams form values data struct. Can optionally be empty if just creating a user without any email accounts, but if creating a user and an email account at the same time then it is required to have: Email, Server, Username, UseSSL, Port, Type, and (if OAUTH) ProviderRefreshToken and ProviderConsumerKey, and (if not OAUTH) Password, and may optionally contain StatusCallbackURL, and (only for CreateUser) MigrateAccountID, FirstName, LastName.

type CreateUserResponse

type CreateUserResponse struct {
	Success bool   `json:"success,omitempty"`
	ID      string `json:"id,omitempty"`

	EmailAccount CreateEmailAccountResponse `json:"email_account,omitempty"`

	ResourceURL       string `json:"resource_url,omitempty"`
	AccessToken       string `json:"access_token,omitempty"`
	AccessTokenSecret string `json:"access_token_secret,omitempty"`

	ConnectionLog string `json:"connection_log,omitempty"`
	FeedbackCode  string `json:"feedback_code,omitempty"`
}

CreateUserResponse data struct

type CreateUserWebhookParams

type CreateUserWebhookParams struct {
	// Requires:
	CallbackURL string `json:"callback_url"`

	// Optional:
	FilterTo           string `json:"filter_to,omitempty"`
	FilterFrom         string `json:"filter_from,omitempty"`
	FilterCC           string `json:"filter_cc,omitempty"`
	FilterSubject      string `json:"filter_subject,omitempty"`
	FilterThread       string `json:"filter_thread,omitempty"`
	FilterNewImportant string `json:"filter_new_important,omitempty"`
	FilterFileName     string `json:"filter_file_name,omitempty"`
	FilterFolderAdded  string `json:"filter_folder_added,omitempty"`
	FilterToDomain     string `json:"filter_to_domain,omitempty"`
	FilterFromDomain   string `json:"filter_from_domain,omitempty"`
	BodyType           string `json:"body_type,omitempty"`
	IncludeBody        bool   `json:"include_body,omitempty"`
	IncludeHeader      bool   `json:"include_header,omitempty"`
	ReceiveDrafts      bool   `json:"receive_drafts,omitempty"`
	ReceiveAllChanges  bool   `json:"receive_all_changes,omitempty"`
	ReceiveHistorical  bool   `json:"receive_historical,omitempty"`
}

CreateUserWebhookParams form values data struct. Requires: CallbackURL, FailureNotifUrl, and may optionally contain FilterTo, FilterFrom, FilterCC, FilterSubject, FilterThread, FilterNewImportant, FilterFileName, FilterFolderAdded, FilterToDomain, FilterFromDomain, IncludeBody, BodyType

type CreateUserWebhookResponse

type CreateUserWebhookResponse struct {
	WebhookID   string `json:"webhook_id,omitempty"`
	ResourceURL string `json:"resource_url,omitempty"`

	Success bool `json:"success,omitempty"`
}

CreateUserWebhookResponse data struct

type DeleteConnectTokenResponse

type DeleteConnectTokenResponse struct {
	Success bool `json:"success,omitempty"`
}

DeleteConnectTokenResponse data struct

https://context.io/docs/lite/connect_tokens#id-delete

type DeleteEmailAccountResponse

type DeleteEmailAccountResponse struct {
	Success      bool   `json:"success,omitempty"`
	ResourceURL  string `json:"resource_url,omitempty"`
	FeedbackCode string `json:"feedback_code,omitempty"`
}

DeleteEmailAccountResponse data struct

type DeleteOAuthProviderResponse

type DeleteOAuthProviderResponse struct {
	Success bool `json:"success,omitempty"`
}

DeleteOAuthProviderResponse data struct

type DeleteUserResponse

type DeleteUserResponse struct {
	Success     bool   `json:"success,omitempty"`
	ResourceURL string `json:"resource_url,omitempty"`
}

DeleteUserResponse data struct

type DeleteWebhookResponse

type DeleteWebhookResponse struct {
	Success bool `json:"success,omitempty"`
}

DeleteWebhookResponse data struct

type EmailAccountFolderDelimiterParam

type EmailAccountFolderDelimiterParam struct {
	// Optional:
	Delimiter string `json:"delimiter,omitempty"`
}

EmailAccountFolderDelimiterParam query values data struct. Optional: Delimiter

type ErrorMetaData

type ErrorMetaData struct {
	StatusCode int
	Payload    string
	Method     string
	URL        string
}

ErrorMetaData holds some meta-data about the error: StatusCode, Response Payload, Method used, and URL

type ExpiresMixed

type ExpiresMixed struct {
	Expires *int
}

ExpiresMixed is a special type to handle the fact that 'expires' can be an int or false.

Unix timestamp of when this token will expire and be purged.
Once the token is used, this property will be set to false
https://context.io/docs/lite/users/connect_tokens

func (ExpiresMixed) MarshalJSON

func (expires ExpiresMixed) MarshalJSON() ([]byte, error)

MarshalJSON allows ExpiresMixed to implement json.Marshaler

func (*ExpiresMixed) Timestamp

func (expires *ExpiresMixed) Timestamp() int

Timestamp returns the expires timestamp if the token is unused, and returns -1 if the token has been used.

func (*ExpiresMixed) UnmarshalJSON

func (expires *ExpiresMixed) UnmarshalJSON(data []byte) error

UnmarshalJSON allows ExpiresMixed to implement json.Unmarshaler

func (*ExpiresMixed) Unused

func (expires *ExpiresMixed) Unused() bool

Unused returns true if Expires is a Unix timestamp, and returns false if this token has been used.

type GetConnectTokenResponse

type GetConnectTokenResponse struct {
	Token              string `json:"token,omitempty"`
	Email              string `json:"email,omitempty"`
	EmailAccountID     string `json:"email_account_id,omitempty"`
	CallbackURL        string `json:"callback_url,omitempty"`
	StatusCallbackURL  string `json:"status_callback_url,omitempty"`
	FirstName          string `json:"first_name,omitempty"`
	LastName           string `json:"last_name,omitempty"`
	ResourceURL        string `json:"resource_url,omitempty"`
	BrowserRedirectURL string `json:"browser_redirect_url,omitempty"` // TODO: reconfirm which fields the response includes
	ServerLabel        string `json:"server_label,omitempty"`

	AccountLite bool `json:"account_lite,omitempty"`

	Created int `json:"created,omitempty"`
	Used    int `json:"used,omitempty"`

	Expires ExpiresMixed `json:"expires,omitempty"`

	User GetConnectTokenUserResponse `json:"user,omitempty"`
}

GetConnectTokenResponse data struct

https://context.io/docs/lite/connect_tokens#get
https://context.io/docs/lite/connect_tokens#id-get

type GetConnectTokenUserResponse

type GetConnectTokenUserResponse struct {
	ID             string   `json:"id,omitempty"`
	EmailAddresses []string `json:"email_addresses,omitempty"`
	FirstName      string   `json:"first_name,omitempty"`
	LastName       string   `json:"last_name,omitempty"`
	Created        int      `json:"created,omitempty"`

	EmailAccounts []GetUsersEmailAccountsResponse `json:"email_accounts,omitempty"`
}

GetConnectTokenUserResponse data struct within GetConnectTokenResponse

https://context.io/docs/lite/connect_tokens#get
https://context.io/docs/lite/connect_tokens#id-get

func (GetConnectTokenUserResponse) EmailAccountMatching

func (user GetConnectTokenUserResponse) EmailAccountMatching(email string) (GetUsersEmailAccountsResponse, error)

EmailAccountMatching searches its EmailAccounts array for the provided email address, and returns the GetUsersEmailAccountsResponse Email Account that matches it.

type GetDiscoveryIMAPResponse

type GetDiscoveryIMAPResponse struct {
	Server   string `json:"server,omitempty"`
	Username string `json:"username,omitempty"`

	UseSSL bool `json:"use_ssl,omitempty"`
	OAuth  bool `json:"oauth,omitempty"`

	Port int `json:"port,omitempty"`
}

GetDiscoveryIMAPResponse embedded data struct

type GetDiscoveryParams

type GetDiscoveryParams struct {
	// Required:
	Email string `json:"email"`
}

GetDiscoveryParams query values data struct. Requires Email.

type GetDiscoveryResponse

type GetDiscoveryResponse struct {
	Email string `json:"email,omitempty"`
	Type  string `json:"type,omitempty"`

	// Value only appears if there is an error message
	Value string `json:"value,omitempty"`

	Documentation []interface{} `json:"documentation,omitempty"`

	Found bool `json:"found,omitempty"`

	IMAP GetDiscoveryIMAPResponse `json:"imap,omitempty"`
}

GetDiscoveryResponse data struct

type GetOAuthProvidersResponse

type GetOAuthProvidersResponse struct {
	Type                   string `json:"type,omitempty"`
	ProviderConsumerKey    string `json:"provider_consumer_key,omitempty"`
	ProviderConsumerSecret string `json:"provider_consumer_secret,omitempty"`
	ResourceURL            string `json:"resource_url,omitempty"`
}

GetOAuthProvidersResponse data struct

type GetStatusCallbackURLResponse

type GetStatusCallbackURLResponse struct {
	StatusCallbackURL string `json:"status_callback_url,omitempty"`
	ResourceURL       string `json:"resource_url,omitempty"`
}

GetStatusCallbackURLResponse data struct

type GetUserEmailAccountsFolderMessageAttachmentParam

type GetUserEmailAccountsFolderMessageAttachmentParam struct {
	Delimiter string `json:"delimiter,omitempty"`
	AsLink    bool   `json:"as_link,omitempty"`
}

GetUserEmailAccountsFolderMessageAttachmentParam query values data struct.

type GetUserEmailAccountsFolderMessageAttachmentsResponse

type GetUserEmailAccountsFolderMessageAttachmentsResponse struct {
	Type               string `json:"type,omitempty"`
	FileName           string `json:"file_name,omitempty"`
	BodySection        string `json:"body_section,omitempty"`
	ContentDisposition string `json:"content_disposition,omitempty"`
	MessageID          string `json:"message_id,omitempty"`
	XAttachmentID      string `json:"x_attachment_id,omitempty"`

	Size         int `json:"size,omitempty"`
	AttachmentID int `json:"attachment_id,omitempty"`

	AttachmentLink string `json:"link,omitempty"`
}

GetUserEmailAccountsFolderMessageAttachmentsResponse data struct

type GetUserEmailAccountsFolderMessageBodyParams

type GetUserEmailAccountsFolderMessageBodyParams struct {
	// Optional:
	Delimiter string `json:"delimiter,omitempty"`
	Type      string `json:"type,omitempty"`
}

GetUserEmailAccountsFolderMessageBodyParams query values data struct. Optional: Delimiter, Type.

type GetUserEmailAccountsFolderMessageBodyResponse

type GetUserEmailAccountsFolderMessageBodyResponse struct {
	Type        string `json:"type,omitempty"`
	Charset     string `json:"charset,omitempty"`
	Content     string `json:"content,omitempty"`
	BodySection string `json:"body_section,omitempty"`
}

GetUserEmailAccountsFolderMessageBodyResponse data struct

type GetUserEmailAccountsFolderMessageFlagsResponse

type GetUserEmailAccountsFolderMessageFlagsResponse struct {
	ResourceURL string `json:"resource_url,omitempty"`

	Flags UserEmailAccountsFolderMessageFlags `json:"flags,omitempty"`
}

GetUserEmailAccountsFolderMessageFlagsResponse data struct

type GetUserEmailAccountsFolderMessageHeadersParams

type GetUserEmailAccountsFolderMessageHeadersParams struct {
	// Optional:
	Delimiter string `json:"delimiter,omitempty"`
	Raw       bool   `json:"raw,omitempty"`
}

GetUserEmailAccountsFolderMessageHeadersParams query values data struct. Optional: Delimiter, Raw.

type GetUserEmailAccountsFolderMessageHeadersResponse

type GetUserEmailAccountsFolderMessageHeadersResponse struct {
	ResourceURL string `json:"resource_url,omitempty"`

	Headers map[string][]string `json:"headers,omitempty"`
}

GetUserEmailAccountsFolderMessageHeadersResponse data struct

type GetUserEmailAccountsFolderMessageParams

type GetUserEmailAccountsFolderMessageParams struct {
	// Optional:
	Delimiter    string `json:"delimiter,omitempty"`
	BodyType     string `json:"body_type,omitempty"`
	IncludeBody  bool   `json:"include_body,omitempty"`
	IncludeFlags bool   `json:"include_flags,omitempty"`

	// IncludeHeaders can be "0", "1", or "raw"
	IncludeHeaders string `json:"include_headers,omitempty"`

	// Optional for GetUserEmailAccountsFolderMessages (not used by GetUserEmailAccountFolderMessage):
	Limit  int `json:"limit,omitempty"`
	Offset int `json:"offset,omitempty"`
}

GetUserEmailAccountsFolderMessageParams query values data struct. Optional: Delimiter, IncludeBody, BodyType, IncludeHeaders, IncludeFlags, and (for GetUserEmailAccountsFolderMessages only) Limit, Offset.

type GetUserEmailAccountsFolderMessageRawResponse

type GetUserEmailAccountsFolderMessageRawResponse string

GetUserEmailAccountsFolderMessageRawResponse data struct

type GetUserEmailAccountsFoldersParams

type GetUserEmailAccountsFoldersParams struct {
	// Optional:
	IncludeNamesOnly bool `json:"include_names_only,omitempty"`
}

GetUserEmailAccountsFoldersParams query values data struct. Optional: IncludeNamesOnly.

type GetUserEmailAccountsMessageParams

type GetUserEmailAccountsMessageParams struct {
	// Optional:
	Delimiter    string `json:"delimiter,omitempty"`
	BodyType     string `json:"body_type,omitempty"`
	IncludeBody  bool   `json:"include_body,omitempty"`
	IncludeFlags bool   `json:"include_flags,omitempty"`

	// IncludeHeaders can be "0", "1", or "raw"
	IncludeHeaders string `json:"include_headers,omitempty"`

	// Optional for GetUserEmailAccountsMessages (not used by GetUserEmailAccountMessage):
	Limit  int `json:"limit,omitempty"`
	Offset int `json:"offset,omitempty"`
}

GetUserEmailAccountsMessageParams query values data struct. Optional: Delimiter, IncludeBody, BodyType, IncludeHeaders, IncludeFlags, and (for GetUserEmailAccountsMessages only) Limit, Offset.

type GetUserEmailAccountsParams

type GetUserEmailAccountsParams struct {
	// Optional:
	Status   string `json:"status,omitempty"`
	StatusOK string `json:"status_ok,omitempty"`
}

GetUserEmailAccountsParams query values data struct. Optional: Status, StatusOK

type GetUsersEmailAccountFolderMessageAddresses

type GetUsersEmailAccountFolderMessageAddresses struct {
	From    []Address `json:"from,omitempty"`
	To      []Address `json:"to,omitempty"`
	Cc      []Address `json:"cc,omitempty"`
	Bcc     []Address `json:"bcc,omitempty"`
	Sender  []Address `json:"sender,omitempty"`
	ReplyTo []Address `json:"reply_to,omitempty"`
}

GetUsersEmailAccountFolderMessageAddresses data struct within GetUsersEmailAccountFolderMessagesResponse

func (*GetUsersEmailAccountFolderMessageAddresses) UnmarshalJSON

UnmarshalJSON is here because the empty state is an array in the json, and is a object/map when populated

type GetUsersEmailAccountFolderMessagesResponse

type GetUsersEmailAccountFolderMessagesResponse struct {
	MessageID   string `json:"message_id,omitempty"`
	Subject     string `json:"subject,omitempty"`
	InReplyTo   string `json:"in_reply_to,omitempty"`
	ResourceURL string `json:"resource_url,omitempty"`

	Folders         []string `json:"folders,omitempty"`
	References      []string `json:"references,omitempty"`
	ReceivedHeaders []string `json:"received_headers,omitempty"`

	ListHeaders ListHeaders `json:"list_headers,omitempty"`

	Addresses GetUsersEmailAccountFolderMessageAddresses `json:"addresses,omitempty"`

	PersonInfo PersonInfo `json:"person_info,omitempty"`

	Attachments []UsersEmailAccountFolderMessageAttachment `json:"attachments,omitempty"`

	Bodies []UsersEmailAccountFolderMessageBody `json:"bodies,omitempty"`

	SentAt     int `json:"sent_at,omitempty"`
	ReceivedAt int `json:"received_at,omitempty"`
}

GetUsersEmailAccountFolderMessagesResponse data struct

type GetUsersEmailAccountFoldersResponse

type GetUsersEmailAccountFoldersResponse struct {
	Name             string `json:"name,omitempty"`
	SymbolicName     string `json:"symbolic_name,omitempty"`
	NbMessages       int    `json:"nb_messages,omitempty"`
	NbUnseenMessages int    `json:"nb_unseen_messages,omitempty"`
	Delimiter        string `json:"delimiter,omitempty"`
	ResourceURL      string `json:"resource_url,omitempty"`
}

GetUsersEmailAccountFoldersResponse data struct

type GetUsersEmailAccountMessageAddresses

type GetUsersEmailAccountMessageAddresses struct {
	From    []Address `json:"from,omitempty"`
	To      []Address `json:"to,omitempty"`
	Cc      []Address `json:"cc,omitempty"`
	Bcc     []Address `json:"bcc,omitempty"`
	Sender  []Address `json:"sender,omitempty"`
	ReplyTo []Address `json:"reply_to,omitempty"`
}

GetUsersEmailAccountMessageAddresses data struct within GetUsersEmailAccountMessagesResponse

func (*GetUsersEmailAccountMessageAddresses) UnmarshalJSON

func (m *GetUsersEmailAccountMessageAddresses) UnmarshalJSON(b []byte) error

UnmarshalJSON is here because the empty state is an array in the json, and is a object/map when populated

type GetUsersEmailAccountMessagesResponse

type GetUsersEmailAccountMessagesResponse struct {
	MessageID   string `json:"message_id,omitempty"`
	Subject     string `json:"subject,omitempty"`
	InReplyTo   string `json:"in_reply_to,omitempty"`
	ResourceURL string `json:"resource_url,omitempty"`

	Folders         []string `json:"folders,omitempty"`
	References      []string `json:"references,omitempty"`
	ReceivedHeaders []string `json:"received_headers,omitempty"`

	ListHeaders ListHeaders `json:"list_headers,omitempty"`

	Addresses GetUsersEmailAccountMessageAddresses `json:"addresses,omitempty"`

	PersonInfo PersonInfo `json:"person_info,omitempty"`

	Attachments []UsersEmailAccountMessageAttachment `json:"attachments,omitempty"`

	Bodies []UsersEmailAccountMessageBody `json:"bodies,omitempty"`

	SentAt     int `json:"sent_at,omitempty"`
	ReceivedAt int `json:"received_at,omitempty"`
}

GetUsersEmailAccountMessagesResponse data struct

type GetUsersEmailAccountsResponse

type GetUsersEmailAccountsResponse struct {
	Status               string `json:"status,omitempty"`
	ResourceURL          string `json:"resource_url,omitempty"`
	Type                 string `json:"type,omitempty"`
	AuthenticationType   string `json:"authentication_type,omitempty"`
	Server               string `json:"server,omitempty"`
	Label                string `json:"label,omitempty"`
	Username             string `json:"username,omitempty"`
	MailServiceAccountID string `json:"mailservice_account_id,omitempty"`

	UseSSL bool `json:"use_ssl,omitempty"`

	Port int `json:"port,omitempty"`
}

GetUsersEmailAccountsResponse data struct

func FindEmailAccountMatching

func FindEmailAccountMatching(emailAccounts []GetUsersEmailAccountsResponse, email string) (GetUsersEmailAccountsResponse, error)

FindEmailAccountMatching searches an array of GetUsersEmailAccountsResponse's for the one that matches the provided email address, and returns it.

type GetUsersParams

type GetUsersParams struct {
	// Optional:
	Email    string `json:"email,omitempty"`
	Status   string `json:"status,omitempty"`
	StatusOK string `json:"status_ok,omitempty"`
	Limit    int    `json:"limit,omitempty"`
	Offset   int    `json:"offset,omitempty"`
}

GetUsersParams query values data struct. Optional: Email, Status, StatusOK, Limit, Offset.

type GetUsersResponse

type GetUsersResponse struct {
	ID             string   `json:"id,omitempty"`
	Username       string   `json:"username,omitempty"`
	EmailAddresses []string `json:"email_addresses,omitempty"`
	FirstName      string   `json:"first_name,omitempty"`
	LastName       string   `json:"last_name,omitempty"`
	ResourceURL    string   `json:"resource_url,omitempty"`

	EmailAccounts []GetUsersEmailAccountsResponse `json:"email_accounts,omitempty"`

	Created         int `json:"created,omitempty"`
	Suspended       int `json:"suspended,omitempty"`
	PasswordExpired int `json:"password_expired,omitempty"`
}

GetUsersResponse data struct

func (GetUsersResponse) EmailAccountMatching

func (user GetUsersResponse) EmailAccountMatching(email string) (GetUsersEmailAccountsResponse, error)

EmailAccountMatching searches its EmailAccounts array for the provided email address, and returns the GetUsersEmailAccountsResponse Email Account that matches it.

type GetUsersWebhooksResponse

type GetUsersWebhooksResponse struct {
	CallbackURL        string `json:"callback_url,omitempty"`
	WebhookID          string `json:"webhook_id,omitempty"`
	FilterTo           string `json:"filter_to,omitempty"`
	FilterFrom         string `json:"filter_from,omitempty"`
	FilterCc           string `json:"filter_cc,omitempty"`
	FilterSubject      string `json:"filter_subject,omitempty"`
	FilterThread       string `json:"filter_thread,omitempty"`
	FilterNewImportant string `json:"filter_new_important,omitempty"`
	FilterFileName     string `json:"filter_file_name,omitempty"`
	FilterFolderAdded  string `json:"filter_folder_added,omitempty"`
	FilterToDomain     string `json:"filter_to_domain,omitempty"`
	FilterFromDomain   string `json:"filter_from_domain,omitempty"`
	BodyType           string `json:"body_type,omitempty"`
	ResourceURL        string `json:"resource_url,omitempty"`

	Active            bool `json:"active,omitempty"`
	Failure           bool `json:"failure,omitempty"`
	IncludeBody       bool `json:"include_body,omitempty"`
	IncludeHeader     bool `json:"include_header,omitempty"`
	ReceiveDrafts     bool `json:"receive_drafts,omitempty"`
	ReceiveAllChanges bool `json:"receive_all_changes,omitempty"`
	ReceiveHistorical bool `json:"receive_historical,omitempty"`
}

GetUsersWebhooksResponse data struct

type Interface

type Interface interface {
	ValidateCallback(token string, signature string, timestamp int) bool

	GetStatusCallbackURL() (GetStatusCallbackURLResponse, error)
	CreateStatusCallbackURL(formValues CreateStatusCallbackURLParams) (CreateDeleteStatusCallbackURLResponse, error)
	DeleteStatusCallbackURL() (CreateDeleteStatusCallbackURLResponse, error)

	GetConnectTokens() ([]GetConnectTokenResponse, error)
	GetConnectToken(token string) (GetConnectTokenResponse, error)
	CreateConnectToken(formValues CreateConnectTokenParams) (CreateConnectTokenResponse, error)
	DeleteConnectToken(token string) (DeleteConnectTokenResponse, error)
	CheckConnectToken(connectToken GetConnectTokenResponse, email string) error

	GetDiscovery(queryValues GetDiscoveryParams) (GetDiscoveryResponse, error)

	GetOAuthProviders() ([]GetOAuthProvidersResponse, error)
	GetOAuthProvider(key string) (GetOAuthProvidersResponse, error)
	CreateOAuthProvider(formValues CreateOAuthProviderParams) (CreateOAuthProviderResponse, error)
	DeleteOAuthProvider(key string) (DeleteOAuthProviderResponse, error)

	GetUserConnectTokens(userID string) ([]GetConnectTokenResponse, error)
	GetUserConnectToken(userID string, token string) (GetConnectTokenResponse, error)
	CreateUserConnectToken(userID string, formValues CreateConnectTokenParams) (CreateConnectTokenResponse, error)
	DeleteUserConnectToken(userID string, token string) (DeleteConnectTokenResponse, error)

	GetUserEmailAccountConnectTokens(userID string, label string) ([]GetConnectTokenResponse, error)
	GetUserEmailAccountConnectToken(userID string, label string, token string) (GetConnectTokenResponse, error)
	CreateUserEmailAccountConnectToken(userID string, label string, formValues CreateConnectTokenParams) (CreateConnectTokenResponse, error)
	DeleteUserEmailAccountConnectToken(userID string, label string, token string) (DeleteConnectTokenResponse, error)

	GetUserEmailAccountsFolderMessageAttachments(userID string, label string, folder string, messageID string, queryValues EmailAccountFolderDelimiterParam) ([]GetUserEmailAccountsFolderMessageAttachmentsResponse, error)
	GetUserEmailAccountsFolderMessageAttachment(userID string, label string, folder string, messageID string, attachmentID string, queryValues GetUserEmailAccountsFolderMessageAttachmentParam) (GetUserEmailAccountsFolderMessageAttachmentsResponse, error)
	GetUserEmailAccountsFolderMessageBody(userID string, label string, folder string, messageID string, queryValues GetUserEmailAccountsFolderMessageBodyParams) ([]GetUserEmailAccountsFolderMessageBodyResponse, error)
	GetUserEmailAccountsFolderMessageFlags(userID string, label string, folder string, messageID string, queryValues EmailAccountFolderDelimiterParam) (GetUserEmailAccountsFolderMessageFlagsResponse, error)

	GetUserEmailAccountsFolderMessageHeaders(userID string, label string, folder string, messageID string, queryValues GetUserEmailAccountsFolderMessageHeadersParams) (GetUserEmailAccountsFolderMessageHeadersResponse, error)
	GetUserEmailAccountsFolderMessageRaw(userID string, label string, folder string, messageID string, queryValues EmailAccountFolderDelimiterParam) (GetUserEmailAccountsFolderMessageRawResponse, error)
	MarkUserEmailAccountsFolderMessageRead(userID string, label string, folder string, messageID string, formValues EmailAccountFolderDelimiterParam) (UserEmailAccountsFolderMessageReadResponse, error)
	MarkUserEmailAccountsFolderMessageUnRead(userID string, label string, folder string, messageID string, formValues EmailAccountFolderDelimiterParam) (UserEmailAccountsFolderMessageReadResponse, error)

	GetUserEmailAccountsFolderMessages(userID string, label string, folder string, queryValues GetUserEmailAccountsFolderMessageParams) ([]GetUsersEmailAccountFolderMessagesResponse, error)
	GetUserEmailAccountFolderMessage(userID string, label string, folder string, messageID string, queryValues GetUserEmailAccountsFolderMessageParams) (GetUsersEmailAccountFolderMessagesResponse, error)
	MoveUserEmailAccountFolderMessage(userID string, label string, folder string, messageID string, queryValues MoveUserEmailAccountFolderMessageParams) (MoveUserEmailAccountFolderMessageResponse, error)

	GetUserEmailAccountsFolders(userID string, label string, queryValues GetUserEmailAccountsFoldersParams) ([]GetUsersEmailAccountFoldersResponse, error)
	GetUserEmailAccountFolder(userID string, label string, folder string, queryValues EmailAccountFolderDelimiterParam) (GetUsersEmailAccountFoldersResponse, error)
	CreateUserEmailAccountFolder(userID string, label string, folder string, formValues EmailAccountFolderDelimiterParam) (CreateEmailAccountFolderResponse, error)
	SafeCreateUserEmailAccountFolder(userID string, label string, folder string, formValues EmailAccountFolderDelimiterParam) (bool, error)

	GetUserEmailAccountsMessages(userID string, label string, queryValues GetUserEmailAccountsMessageParams) ([]GetUsersEmailAccountMessagesResponse, error)
	GetUserEmailAccountMessage(userID string, label string, messageID string, queryValues GetUserEmailAccountsMessageParams) (GetUsersEmailAccountMessagesResponse, error)

	GetUserEmailAccounts(userID string, queryValues GetUserEmailAccountsParams) ([]GetUsersEmailAccountsResponse, error)
	GetUserEmailAccount(userID string, label string) (GetUsersEmailAccountsResponse, error)
	CreateUserEmailAccount(userID string, formValues CreateUserParams) (CreateEmailAccountResponse, error)
	ModifyUserEmailAccount(userID string, label string, formValues ModifyUserEmailAccountParams) (ModifyEmailAccountResponse, error)
	DeleteUserEmailAccount(userID string, label string) (DeleteEmailAccountResponse, error)

	GetUserWebhooks(userID string) ([]GetUsersWebhooksResponse, error)
	GetUserWebhook(userID string, webhookID string) (GetUsersWebhooksResponse, error)
	CreateUserWebhook(userID string, formValues CreateUserWebhookParams) (CreateUserWebhookResponse, error)
	ModifyUserWebhook(userID string, webhookID string, formValues ModifyUserWebhookParams) (ModifyWebhookResponse, error)
	DeleteUserWebhookAccount(userID string, webhookID string) (DeleteWebhookResponse, error)

	GetUsers(queryValues GetUsersParams) ([]GetUsersResponse, error)
	GetUser(userID string) (GetUsersResponse, error)
	CreateUser(formValues CreateUserParams) (CreateUserResponse, error)
	ModifyUser(userID string, formValues ModifyUserParams) (ModifyUserResponse, error)
	DeleteUser(userID string) (DeleteUserResponse, error)

	GetWebhooks() ([]GetUsersWebhooksResponse, error)
	GetWebhook(webhookID string) (GetUsersWebhooksResponse, error)
	CreateWebhook(formValues CreateUserWebhookParams) (CreateUserWebhookResponse, error)
	ModifyWebhook(webhookID string, formValues ModifyUserWebhookParams) (ModifyWebhookResponse, error)
	DeleteWebhookAccount(webhookID string) (DeleteWebhookResponse, error)
}

Interface is just to help generate a mocked client, for testing elsewhere. mockgen -source=ciolite.go -destination=ciolite_mock.go -package ciolite

type ListHeaders

type ListHeaders map[string]string

ListHeaders embedded data struct within GetUsersEmailAccountFolderMessagesResponse

func (*ListHeaders) UnmarshalJSON

func (m *ListHeaders) UnmarshalJSON(b []byte) error

UnmarshalJSON is here because the empty state is an array in the json, and is a object/map when populated

type MockInterface

type MockInterface struct {
	// contains filtered or unexported fields
}

MockInterface is a mock of Interface interface

func NewMockInterface

func NewMockInterface(ctrl *gomock.Controller) *MockInterface

NewMockInterface creates a new mock instance

func (*MockInterface) CheckConnectToken

func (m *MockInterface) CheckConnectToken(connectToken GetConnectTokenResponse, email string) error

CheckConnectToken mocks base method

func (*MockInterface) CreateConnectToken

func (m *MockInterface) CreateConnectToken(formValues CreateConnectTokenParams) (CreateConnectTokenResponse, error)

CreateConnectToken mocks base method

func (*MockInterface) CreateOAuthProvider

func (m *MockInterface) CreateOAuthProvider(formValues CreateOAuthProviderParams) (CreateOAuthProviderResponse, error)

CreateOAuthProvider mocks base method

func (*MockInterface) CreateStatusCallbackURL

CreateStatusCallbackURL mocks base method

func (*MockInterface) CreateUser

func (m *MockInterface) CreateUser(formValues CreateUserParams) (CreateUserResponse, error)

CreateUser mocks base method

func (*MockInterface) CreateUserConnectToken

func (m *MockInterface) CreateUserConnectToken(userID string, formValues CreateConnectTokenParams) (CreateConnectTokenResponse, error)

CreateUserConnectToken mocks base method

func (*MockInterface) CreateUserEmailAccount

func (m *MockInterface) CreateUserEmailAccount(userID string, formValues CreateUserParams) (CreateEmailAccountResponse, error)

CreateUserEmailAccount mocks base method

func (*MockInterface) CreateUserEmailAccountConnectToken

func (m *MockInterface) CreateUserEmailAccountConnectToken(userID, label string, formValues CreateConnectTokenParams) (CreateConnectTokenResponse, error)

CreateUserEmailAccountConnectToken mocks base method

func (*MockInterface) CreateUserEmailAccountFolder

func (m *MockInterface) CreateUserEmailAccountFolder(userID, label, folder string, formValues EmailAccountFolderDelimiterParam) (CreateEmailAccountFolderResponse, error)

CreateUserEmailAccountFolder mocks base method

func (*MockInterface) CreateUserWebhook

func (m *MockInterface) CreateUserWebhook(userID string, formValues CreateUserWebhookParams) (CreateUserWebhookResponse, error)

CreateUserWebhook mocks base method

func (*MockInterface) CreateWebhook

func (m *MockInterface) CreateWebhook(formValues CreateUserWebhookParams) (CreateUserWebhookResponse, error)

CreateWebhook mocks base method

func (*MockInterface) DeleteConnectToken

func (m *MockInterface) DeleteConnectToken(token string) (DeleteConnectTokenResponse, error)

DeleteConnectToken mocks base method

func (*MockInterface) DeleteOAuthProvider

func (m *MockInterface) DeleteOAuthProvider(key string) (DeleteOAuthProviderResponse, error)

DeleteOAuthProvider mocks base method

func (*MockInterface) DeleteStatusCallbackURL

func (m *MockInterface) DeleteStatusCallbackURL() (CreateDeleteStatusCallbackURLResponse, error)

DeleteStatusCallbackURL mocks base method

func (*MockInterface) DeleteUser

func (m *MockInterface) DeleteUser(userID string) (DeleteUserResponse, error)

DeleteUser mocks base method

func (*MockInterface) DeleteUserConnectToken

func (m *MockInterface) DeleteUserConnectToken(userID, token string) (DeleteConnectTokenResponse, error)

DeleteUserConnectToken mocks base method

func (*MockInterface) DeleteUserEmailAccount

func (m *MockInterface) DeleteUserEmailAccount(userID, label string) (DeleteEmailAccountResponse, error)

DeleteUserEmailAccount mocks base method

func (*MockInterface) DeleteUserEmailAccountConnectToken

func (m *MockInterface) DeleteUserEmailAccountConnectToken(userID, label, token string) (DeleteConnectTokenResponse, error)

DeleteUserEmailAccountConnectToken mocks base method

func (*MockInterface) DeleteUserWebhookAccount

func (m *MockInterface) DeleteUserWebhookAccount(userID, webhookID string) (DeleteWebhookResponse, error)

DeleteUserWebhookAccount mocks base method

func (*MockInterface) DeleteWebhookAccount

func (m *MockInterface) DeleteWebhookAccount(webhookID string) (DeleteWebhookResponse, error)

DeleteWebhookAccount mocks base method

func (*MockInterface) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockInterface) GetConnectToken

func (m *MockInterface) GetConnectToken(token string) (GetConnectTokenResponse, error)

GetConnectToken mocks base method

func (*MockInterface) GetConnectTokens

func (m *MockInterface) GetConnectTokens() ([]GetConnectTokenResponse, error)

GetConnectTokens mocks base method

func (*MockInterface) GetDiscovery

func (m *MockInterface) GetDiscovery(queryValues GetDiscoveryParams) (GetDiscoveryResponse, error)

GetDiscovery mocks base method

func (*MockInterface) GetOAuthProvider

func (m *MockInterface) GetOAuthProvider(key string) (GetOAuthProvidersResponse, error)

GetOAuthProvider mocks base method

func (*MockInterface) GetOAuthProviders

func (m *MockInterface) GetOAuthProviders() ([]GetOAuthProvidersResponse, error)

GetOAuthProviders mocks base method

func (*MockInterface) GetStatusCallbackURL

func (m *MockInterface) GetStatusCallbackURL() (GetStatusCallbackURLResponse, error)

GetStatusCallbackURL mocks base method

func (*MockInterface) GetUser

func (m *MockInterface) GetUser(userID string) (GetUsersResponse, error)

GetUser mocks base method

func (*MockInterface) GetUserConnectToken

func (m *MockInterface) GetUserConnectToken(userID, token string) (GetConnectTokenResponse, error)

GetUserConnectToken mocks base method

func (*MockInterface) GetUserConnectTokens

func (m *MockInterface) GetUserConnectTokens(userID string) ([]GetConnectTokenResponse, error)

GetUserConnectTokens mocks base method

func (*MockInterface) GetUserEmailAccount

func (m *MockInterface) GetUserEmailAccount(userID, label string) (GetUsersEmailAccountsResponse, error)

GetUserEmailAccount mocks base method

func (*MockInterface) GetUserEmailAccountConnectToken

func (m *MockInterface) GetUserEmailAccountConnectToken(userID, label, token string) (GetConnectTokenResponse, error)

GetUserEmailAccountConnectToken mocks base method

func (*MockInterface) GetUserEmailAccountConnectTokens

func (m *MockInterface) GetUserEmailAccountConnectTokens(userID, label string) ([]GetConnectTokenResponse, error)

GetUserEmailAccountConnectTokens mocks base method

func (*MockInterface) GetUserEmailAccountFolder

func (m *MockInterface) GetUserEmailAccountFolder(userID, label, folder string, queryValues EmailAccountFolderDelimiterParam) (GetUsersEmailAccountFoldersResponse, error)

GetUserEmailAccountFolder mocks base method

func (*MockInterface) GetUserEmailAccountFolderMessage

func (m *MockInterface) GetUserEmailAccountFolderMessage(userID, label, folder, messageID string, queryValues GetUserEmailAccountsFolderMessageParams) (GetUsersEmailAccountFolderMessagesResponse, error)

GetUserEmailAccountFolderMessage mocks base method

func (*MockInterface) GetUserEmailAccountMessage

func (m *MockInterface) GetUserEmailAccountMessage(userID, label, messageID string, queryValues GetUserEmailAccountsMessageParams) (GetUsersEmailAccountMessagesResponse, error)

GetUserEmailAccountMessage mocks base method

func (*MockInterface) GetUserEmailAccounts

func (m *MockInterface) GetUserEmailAccounts(userID string, queryValues GetUserEmailAccountsParams) ([]GetUsersEmailAccountsResponse, error)

GetUserEmailAccounts mocks base method

func (*MockInterface) GetUserEmailAccountsFolderMessageAttachment

func (m *MockInterface) GetUserEmailAccountsFolderMessageAttachment(userID, label, folder, messageID, attachmentID string, queryValues GetUserEmailAccountsFolderMessageAttachmentParam) (GetUserEmailAccountsFolderMessageAttachmentsResponse, error)

GetUserEmailAccountsFolderMessageAttachment mocks base method

func (*MockInterface) GetUserEmailAccountsFolderMessageAttachments

func (m *MockInterface) GetUserEmailAccountsFolderMessageAttachments(userID, label, folder, messageID string, queryValues EmailAccountFolderDelimiterParam) ([]GetUserEmailAccountsFolderMessageAttachmentsResponse, error)

GetUserEmailAccountsFolderMessageAttachments mocks base method

func (*MockInterface) GetUserEmailAccountsFolderMessageBody

func (m *MockInterface) GetUserEmailAccountsFolderMessageBody(userID, label, folder, messageID string, queryValues GetUserEmailAccountsFolderMessageBodyParams) ([]GetUserEmailAccountsFolderMessageBodyResponse, error)

GetUserEmailAccountsFolderMessageBody mocks base method

func (*MockInterface) GetUserEmailAccountsFolderMessageFlags

func (m *MockInterface) GetUserEmailAccountsFolderMessageFlags(userID, label, folder, messageID string, queryValues EmailAccountFolderDelimiterParam) (GetUserEmailAccountsFolderMessageFlagsResponse, error)

GetUserEmailAccountsFolderMessageFlags mocks base method

func (*MockInterface) GetUserEmailAccountsFolderMessageHeaders

func (m *MockInterface) GetUserEmailAccountsFolderMessageHeaders(userID, label, folder, messageID string, queryValues GetUserEmailAccountsFolderMessageHeadersParams) (GetUserEmailAccountsFolderMessageHeadersResponse, error)

GetUserEmailAccountsFolderMessageHeaders mocks base method

func (*MockInterface) GetUserEmailAccountsFolderMessageRaw

func (m *MockInterface) GetUserEmailAccountsFolderMessageRaw(userID, label, folder, messageID string, queryValues EmailAccountFolderDelimiterParam) (GetUserEmailAccountsFolderMessageRawResponse, error)

GetUserEmailAccountsFolderMessageRaw mocks base method

func (*MockInterface) GetUserEmailAccountsFolderMessages

func (m *MockInterface) GetUserEmailAccountsFolderMessages(userID, label, folder string, queryValues GetUserEmailAccountsFolderMessageParams) ([]GetUsersEmailAccountFolderMessagesResponse, error)

GetUserEmailAccountsFolderMessages mocks base method

func (*MockInterface) GetUserEmailAccountsFolders

func (m *MockInterface) GetUserEmailAccountsFolders(userID, label string, queryValues GetUserEmailAccountsFoldersParams) ([]GetUsersEmailAccountFoldersResponse, error)

GetUserEmailAccountsFolders mocks base method

func (*MockInterface) GetUserEmailAccountsMessages

func (m *MockInterface) GetUserEmailAccountsMessages(userID, label string, queryValues GetUserEmailAccountsMessageParams) ([]GetUsersEmailAccountMessagesResponse, error)

GetUserEmailAccountsMessages mocks base method

func (*MockInterface) GetUserWebhook

func (m *MockInterface) GetUserWebhook(userID, webhookID string) (GetUsersWebhooksResponse, error)

GetUserWebhook mocks base method

func (*MockInterface) GetUserWebhooks

func (m *MockInterface) GetUserWebhooks(userID string) ([]GetUsersWebhooksResponse, error)

GetUserWebhooks mocks base method

func (*MockInterface) GetUsers

func (m *MockInterface) GetUsers(queryValues GetUsersParams) ([]GetUsersResponse, error)

GetUsers mocks base method

func (*MockInterface) GetWebhook

func (m *MockInterface) GetWebhook(webhookID string) (GetUsersWebhooksResponse, error)

GetWebhook mocks base method

func (*MockInterface) GetWebhooks

func (m *MockInterface) GetWebhooks() ([]GetUsersWebhooksResponse, error)

GetWebhooks mocks base method

func (*MockInterface) MarkUserEmailAccountsFolderMessageRead

func (m *MockInterface) MarkUserEmailAccountsFolderMessageRead(userID, label, folder, messageID string, formValues EmailAccountFolderDelimiterParam) (UserEmailAccountsFolderMessageReadResponse, error)

MarkUserEmailAccountsFolderMessageRead mocks base method

func (*MockInterface) MarkUserEmailAccountsFolderMessageUnRead

func (m *MockInterface) MarkUserEmailAccountsFolderMessageUnRead(userID, label, folder, messageID string, formValues EmailAccountFolderDelimiterParam) (UserEmailAccountsFolderMessageReadResponse, error)

MarkUserEmailAccountsFolderMessageUnRead mocks base method

func (*MockInterface) ModifyUser

func (m *MockInterface) ModifyUser(userID string, formValues ModifyUserParams) (ModifyUserResponse, error)

ModifyUser mocks base method

func (*MockInterface) ModifyUserEmailAccount

func (m *MockInterface) ModifyUserEmailAccount(userID, label string, formValues ModifyUserEmailAccountParams) (ModifyEmailAccountResponse, error)

ModifyUserEmailAccount mocks base method

func (*MockInterface) ModifyUserWebhook

func (m *MockInterface) ModifyUserWebhook(userID, webhookID string, formValues ModifyUserWebhookParams) (ModifyWebhookResponse, error)

ModifyUserWebhook mocks base method

func (*MockInterface) ModifyWebhook

func (m *MockInterface) ModifyWebhook(webhookID string, formValues ModifyUserWebhookParams) (ModifyWebhookResponse, error)

ModifyWebhook mocks base method

func (*MockInterface) MoveUserEmailAccountFolderMessage

func (m *MockInterface) MoveUserEmailAccountFolderMessage(userID, label, folder, messageID string, queryValues MoveUserEmailAccountFolderMessageParams) (MoveUserEmailAccountFolderMessageResponse, error)

MoveUserEmailAccountFolderMessage mocks base method

func (*MockInterface) SafeCreateUserEmailAccountFolder

func (m *MockInterface) SafeCreateUserEmailAccountFolder(userID, label, folder string, formValues EmailAccountFolderDelimiterParam) (bool, error)

SafeCreateUserEmailAccountFolder mocks base method

func (*MockInterface) ValidateCallback

func (m *MockInterface) ValidateCallback(token, signature string, timestamp int) bool

ValidateCallback mocks base method

type MockInterfaceMockRecorder

type MockInterfaceMockRecorder struct {
	// contains filtered or unexported fields
}

MockInterfaceMockRecorder is the mock recorder for MockInterface

func (*MockInterfaceMockRecorder) CheckConnectToken

func (mr *MockInterfaceMockRecorder) CheckConnectToken(connectToken, email interface{}) *gomock.Call

CheckConnectToken indicates an expected call of CheckConnectToken

func (*MockInterfaceMockRecorder) CreateConnectToken

func (mr *MockInterfaceMockRecorder) CreateConnectToken(formValues interface{}) *gomock.Call

CreateConnectToken indicates an expected call of CreateConnectToken

func (*MockInterfaceMockRecorder) CreateOAuthProvider

func (mr *MockInterfaceMockRecorder) CreateOAuthProvider(formValues interface{}) *gomock.Call

CreateOAuthProvider indicates an expected call of CreateOAuthProvider

func (*MockInterfaceMockRecorder) CreateStatusCallbackURL

func (mr *MockInterfaceMockRecorder) CreateStatusCallbackURL(formValues interface{}) *gomock.Call

CreateStatusCallbackURL indicates an expected call of CreateStatusCallbackURL

func (*MockInterfaceMockRecorder) CreateUser

func (mr *MockInterfaceMockRecorder) CreateUser(formValues interface{}) *gomock.Call

CreateUser indicates an expected call of CreateUser

func (*MockInterfaceMockRecorder) CreateUserConnectToken

func (mr *MockInterfaceMockRecorder) CreateUserConnectToken(userID, formValues interface{}) *gomock.Call

CreateUserConnectToken indicates an expected call of CreateUserConnectToken

func (*MockInterfaceMockRecorder) CreateUserEmailAccount

func (mr *MockInterfaceMockRecorder) CreateUserEmailAccount(userID, formValues interface{}) *gomock.Call

CreateUserEmailAccount indicates an expected call of CreateUserEmailAccount

func (*MockInterfaceMockRecorder) CreateUserEmailAccountConnectToken

func (mr *MockInterfaceMockRecorder) CreateUserEmailAccountConnectToken(userID, label, formValues interface{}) *gomock.Call

CreateUserEmailAccountConnectToken indicates an expected call of CreateUserEmailAccountConnectToken

func (*MockInterfaceMockRecorder) CreateUserEmailAccountFolder

func (mr *MockInterfaceMockRecorder) CreateUserEmailAccountFolder(userID, label, folder, formValues interface{}) *gomock.Call

CreateUserEmailAccountFolder indicates an expected call of CreateUserEmailAccountFolder

func (*MockInterfaceMockRecorder) CreateUserWebhook

func (mr *MockInterfaceMockRecorder) CreateUserWebhook(userID, formValues interface{}) *gomock.Call

CreateUserWebhook indicates an expected call of CreateUserWebhook

func (*MockInterfaceMockRecorder) CreateWebhook

func (mr *MockInterfaceMockRecorder) CreateWebhook(formValues interface{}) *gomock.Call

CreateWebhook indicates an expected call of CreateWebhook

func (*MockInterfaceMockRecorder) DeleteConnectToken

func (mr *MockInterfaceMockRecorder) DeleteConnectToken(token interface{}) *gomock.Call

DeleteConnectToken indicates an expected call of DeleteConnectToken

func (*MockInterfaceMockRecorder) DeleteOAuthProvider

func (mr *MockInterfaceMockRecorder) DeleteOAuthProvider(key interface{}) *gomock.Call

DeleteOAuthProvider indicates an expected call of DeleteOAuthProvider

func (*MockInterfaceMockRecorder) DeleteStatusCallbackURL

func (mr *MockInterfaceMockRecorder) DeleteStatusCallbackURL() *gomock.Call

DeleteStatusCallbackURL indicates an expected call of DeleteStatusCallbackURL

func (*MockInterfaceMockRecorder) DeleteUser

func (mr *MockInterfaceMockRecorder) DeleteUser(userID interface{}) *gomock.Call

DeleteUser indicates an expected call of DeleteUser

func (*MockInterfaceMockRecorder) DeleteUserConnectToken

func (mr *MockInterfaceMockRecorder) DeleteUserConnectToken(userID, token interface{}) *gomock.Call

DeleteUserConnectToken indicates an expected call of DeleteUserConnectToken

func (*MockInterfaceMockRecorder) DeleteUserEmailAccount

func (mr *MockInterfaceMockRecorder) DeleteUserEmailAccount(userID, label interface{}) *gomock.Call

DeleteUserEmailAccount indicates an expected call of DeleteUserEmailAccount

func (*MockInterfaceMockRecorder) DeleteUserEmailAccountConnectToken

func (mr *MockInterfaceMockRecorder) DeleteUserEmailAccountConnectToken(userID, label, token interface{}) *gomock.Call

DeleteUserEmailAccountConnectToken indicates an expected call of DeleteUserEmailAccountConnectToken

func (*MockInterfaceMockRecorder) DeleteUserWebhookAccount

func (mr *MockInterfaceMockRecorder) DeleteUserWebhookAccount(userID, webhookID interface{}) *gomock.Call

DeleteUserWebhookAccount indicates an expected call of DeleteUserWebhookAccount

func (*MockInterfaceMockRecorder) DeleteWebhookAccount

func (mr *MockInterfaceMockRecorder) DeleteWebhookAccount(webhookID interface{}) *gomock.Call

DeleteWebhookAccount indicates an expected call of DeleteWebhookAccount

func (*MockInterfaceMockRecorder) GetConnectToken

func (mr *MockInterfaceMockRecorder) GetConnectToken(token interface{}) *gomock.Call

GetConnectToken indicates an expected call of GetConnectToken

func (*MockInterfaceMockRecorder) GetConnectTokens

func (mr *MockInterfaceMockRecorder) GetConnectTokens() *gomock.Call

GetConnectTokens indicates an expected call of GetConnectTokens

func (*MockInterfaceMockRecorder) GetDiscovery

func (mr *MockInterfaceMockRecorder) GetDiscovery(queryValues interface{}) *gomock.Call

GetDiscovery indicates an expected call of GetDiscovery

func (*MockInterfaceMockRecorder) GetOAuthProvider

func (mr *MockInterfaceMockRecorder) GetOAuthProvider(key interface{}) *gomock.Call

GetOAuthProvider indicates an expected call of GetOAuthProvider

func (*MockInterfaceMockRecorder) GetOAuthProviders

func (mr *MockInterfaceMockRecorder) GetOAuthProviders() *gomock.Call

GetOAuthProviders indicates an expected call of GetOAuthProviders

func (*MockInterfaceMockRecorder) GetStatusCallbackURL

func (mr *MockInterfaceMockRecorder) GetStatusCallbackURL() *gomock.Call

GetStatusCallbackURL indicates an expected call of GetStatusCallbackURL

func (*MockInterfaceMockRecorder) GetUser

func (mr *MockInterfaceMockRecorder) GetUser(userID interface{}) *gomock.Call

GetUser indicates an expected call of GetUser

func (*MockInterfaceMockRecorder) GetUserConnectToken

func (mr *MockInterfaceMockRecorder) GetUserConnectToken(userID, token interface{}) *gomock.Call

GetUserConnectToken indicates an expected call of GetUserConnectToken

func (*MockInterfaceMockRecorder) GetUserConnectTokens

func (mr *MockInterfaceMockRecorder) GetUserConnectTokens(userID interface{}) *gomock.Call

GetUserConnectTokens indicates an expected call of GetUserConnectTokens

func (*MockInterfaceMockRecorder) GetUserEmailAccount

func (mr *MockInterfaceMockRecorder) GetUserEmailAccount(userID, label interface{}) *gomock.Call

GetUserEmailAccount indicates an expected call of GetUserEmailAccount

func (*MockInterfaceMockRecorder) GetUserEmailAccountConnectToken

func (mr *MockInterfaceMockRecorder) GetUserEmailAccountConnectToken(userID, label, token interface{}) *gomock.Call

GetUserEmailAccountConnectToken indicates an expected call of GetUserEmailAccountConnectToken

func (*MockInterfaceMockRecorder) GetUserEmailAccountConnectTokens

func (mr *MockInterfaceMockRecorder) GetUserEmailAccountConnectTokens(userID, label interface{}) *gomock.Call

GetUserEmailAccountConnectTokens indicates an expected call of GetUserEmailAccountConnectTokens

func (*MockInterfaceMockRecorder) GetUserEmailAccountFolder

func (mr *MockInterfaceMockRecorder) GetUserEmailAccountFolder(userID, label, folder, queryValues interface{}) *gomock.Call

GetUserEmailAccountFolder indicates an expected call of GetUserEmailAccountFolder

func (*MockInterfaceMockRecorder) GetUserEmailAccountFolderMessage

func (mr *MockInterfaceMockRecorder) GetUserEmailAccountFolderMessage(userID, label, folder, messageID, queryValues interface{}) *gomock.Call

GetUserEmailAccountFolderMessage indicates an expected call of GetUserEmailAccountFolderMessage

func (*MockInterfaceMockRecorder) GetUserEmailAccountMessage

func (mr *MockInterfaceMockRecorder) GetUserEmailAccountMessage(userID, label, messageID, queryValues interface{}) *gomock.Call

GetUserEmailAccountMessage indicates an expected call of GetUserEmailAccountMessage

func (*MockInterfaceMockRecorder) GetUserEmailAccounts

func (mr *MockInterfaceMockRecorder) GetUserEmailAccounts(userID, queryValues interface{}) *gomock.Call

GetUserEmailAccounts indicates an expected call of GetUserEmailAccounts

func (*MockInterfaceMockRecorder) GetUserEmailAccountsFolderMessageAttachment

func (mr *MockInterfaceMockRecorder) GetUserEmailAccountsFolderMessageAttachment(userID, label, folder, messageID, attachmentID, queryValues interface{}) *gomock.Call

GetUserEmailAccountsFolderMessageAttachment indicates an expected call of GetUserEmailAccountsFolderMessageAttachment

func (*MockInterfaceMockRecorder) GetUserEmailAccountsFolderMessageAttachments

func (mr *MockInterfaceMockRecorder) GetUserEmailAccountsFolderMessageAttachments(userID, label, folder, messageID, queryValues interface{}) *gomock.Call

GetUserEmailAccountsFolderMessageAttachments indicates an expected call of GetUserEmailAccountsFolderMessageAttachments

func (*MockInterfaceMockRecorder) GetUserEmailAccountsFolderMessageBody

func (mr *MockInterfaceMockRecorder) GetUserEmailAccountsFolderMessageBody(userID, label, folder, messageID, queryValues interface{}) *gomock.Call

GetUserEmailAccountsFolderMessageBody indicates an expected call of GetUserEmailAccountsFolderMessageBody

func (*MockInterfaceMockRecorder) GetUserEmailAccountsFolderMessageFlags

func (mr *MockInterfaceMockRecorder) GetUserEmailAccountsFolderMessageFlags(userID, label, folder, messageID, queryValues interface{}) *gomock.Call

GetUserEmailAccountsFolderMessageFlags indicates an expected call of GetUserEmailAccountsFolderMessageFlags

func (*MockInterfaceMockRecorder) GetUserEmailAccountsFolderMessageHeaders

func (mr *MockInterfaceMockRecorder) GetUserEmailAccountsFolderMessageHeaders(userID, label, folder, messageID, queryValues interface{}) *gomock.Call

GetUserEmailAccountsFolderMessageHeaders indicates an expected call of GetUserEmailAccountsFolderMessageHeaders

func (*MockInterfaceMockRecorder) GetUserEmailAccountsFolderMessageRaw

func (mr *MockInterfaceMockRecorder) GetUserEmailAccountsFolderMessageRaw(userID, label, folder, messageID, queryValues interface{}) *gomock.Call

GetUserEmailAccountsFolderMessageRaw indicates an expected call of GetUserEmailAccountsFolderMessageRaw

func (*MockInterfaceMockRecorder) GetUserEmailAccountsFolderMessages

func (mr *MockInterfaceMockRecorder) GetUserEmailAccountsFolderMessages(userID, label, folder, queryValues interface{}) *gomock.Call

GetUserEmailAccountsFolderMessages indicates an expected call of GetUserEmailAccountsFolderMessages

func (*MockInterfaceMockRecorder) GetUserEmailAccountsFolders

func (mr *MockInterfaceMockRecorder) GetUserEmailAccountsFolders(userID, label, queryValues interface{}) *gomock.Call

GetUserEmailAccountsFolders indicates an expected call of GetUserEmailAccountsFolders

func (*MockInterfaceMockRecorder) GetUserEmailAccountsMessages

func (mr *MockInterfaceMockRecorder) GetUserEmailAccountsMessages(userID, label, queryValues interface{}) *gomock.Call

GetUserEmailAccountsMessages indicates an expected call of GetUserEmailAccountsMessages

func (*MockInterfaceMockRecorder) GetUserWebhook

func (mr *MockInterfaceMockRecorder) GetUserWebhook(userID, webhookID interface{}) *gomock.Call

GetUserWebhook indicates an expected call of GetUserWebhook

func (*MockInterfaceMockRecorder) GetUserWebhooks

func (mr *MockInterfaceMockRecorder) GetUserWebhooks(userID interface{}) *gomock.Call

GetUserWebhooks indicates an expected call of GetUserWebhooks

func (*MockInterfaceMockRecorder) GetUsers

func (mr *MockInterfaceMockRecorder) GetUsers(queryValues interface{}) *gomock.Call

GetUsers indicates an expected call of GetUsers

func (*MockInterfaceMockRecorder) GetWebhook

func (mr *MockInterfaceMockRecorder) GetWebhook(webhookID interface{}) *gomock.Call

GetWebhook indicates an expected call of GetWebhook

func (*MockInterfaceMockRecorder) GetWebhooks

func (mr *MockInterfaceMockRecorder) GetWebhooks() *gomock.Call

GetWebhooks indicates an expected call of GetWebhooks

func (*MockInterfaceMockRecorder) MarkUserEmailAccountsFolderMessageRead

func (mr *MockInterfaceMockRecorder) MarkUserEmailAccountsFolderMessageRead(userID, label, folder, messageID, formValues interface{}) *gomock.Call

MarkUserEmailAccountsFolderMessageRead indicates an expected call of MarkUserEmailAccountsFolderMessageRead

func (*MockInterfaceMockRecorder) MarkUserEmailAccountsFolderMessageUnRead

func (mr *MockInterfaceMockRecorder) MarkUserEmailAccountsFolderMessageUnRead(userID, label, folder, messageID, formValues interface{}) *gomock.Call

MarkUserEmailAccountsFolderMessageUnRead indicates an expected call of MarkUserEmailAccountsFolderMessageUnRead

func (*MockInterfaceMockRecorder) ModifyUser

func (mr *MockInterfaceMockRecorder) ModifyUser(userID, formValues interface{}) *gomock.Call

ModifyUser indicates an expected call of ModifyUser

func (*MockInterfaceMockRecorder) ModifyUserEmailAccount

func (mr *MockInterfaceMockRecorder) ModifyUserEmailAccount(userID, label, formValues interface{}) *gomock.Call

ModifyUserEmailAccount indicates an expected call of ModifyUserEmailAccount

func (*MockInterfaceMockRecorder) ModifyUserWebhook

func (mr *MockInterfaceMockRecorder) ModifyUserWebhook(userID, webhookID, formValues interface{}) *gomock.Call

ModifyUserWebhook indicates an expected call of ModifyUserWebhook

func (*MockInterfaceMockRecorder) ModifyWebhook

func (mr *MockInterfaceMockRecorder) ModifyWebhook(webhookID, formValues interface{}) *gomock.Call

ModifyWebhook indicates an expected call of ModifyWebhook

func (*MockInterfaceMockRecorder) MoveUserEmailAccountFolderMessage

func (mr *MockInterfaceMockRecorder) MoveUserEmailAccountFolderMessage(userID, label, folder, messageID, queryValues interface{}) *gomock.Call

MoveUserEmailAccountFolderMessage indicates an expected call of MoveUserEmailAccountFolderMessage

func (*MockInterfaceMockRecorder) SafeCreateUserEmailAccountFolder

func (mr *MockInterfaceMockRecorder) SafeCreateUserEmailAccountFolder(userID, label, folder, formValues interface{}) *gomock.Call

SafeCreateUserEmailAccountFolder indicates an expected call of SafeCreateUserEmailAccountFolder

func (*MockInterfaceMockRecorder) ValidateCallback

func (mr *MockInterfaceMockRecorder) ValidateCallback(token, signature, timestamp interface{}) *gomock.Call

ValidateCallback indicates an expected call of ValidateCallback

type ModifyEmailAccountResponse

type ModifyEmailAccountResponse struct {
	Success       bool   `json:"success,omitempty"`
	ResourceURL   string `json:"resource_url,omitempty"`
	FeedbackCode  string `json:"feedback_code,omitempty"`
	ConnectionLog string `json:"connection_log,omitempty"`
}

ModifyEmailAccountResponse data struct

type ModifyUserEmailAccountParams

type ModifyUserEmailAccountParams struct {
	// Optional:
	Status               string `json:"status,omitempty"`
	Password             string `json:"password,omitempty"`
	ProviderRefreshToken string `json:"provider_refresh_token,omitempty"`
	ProviderConsumerKey  string `json:"provider_consumer_key,omitempty"`
	StatusCallbackURL    string `json:"status_callback_url,omitempty"`
	ForceStatusCheck     bool   `json:"force_status_check,omitempty"`
}

ModifyUserEmailAccountParams form values data struct. formValues optionally may contain Status, ForceStatusCheck, Password, ProviderRefreshToken, ProviderConsumerKey, StatusCallbackURL

type ModifyUserParams

type ModifyUserParams struct {
	// Requires:
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
}

ModifyUserParams form values data struct. Requires: FirstName, LastName.

type ModifyUserResponse

type ModifyUserResponse struct {
	Success     bool   `json:"success,omitempty"`
	ResourceURL string `json:"resource_url,omitempty"`
}

ModifyUserResponse data struct

type ModifyUserWebhookParams

type ModifyUserWebhookParams struct {
	// Required:
	Active bool `json:"active"`
}

ModifyUserWebhookParams form values data struct. formValues requires Active

type ModifyWebhookResponse

type ModifyWebhookResponse struct {
	ResourceURL string `json:"resource_url,omitempty"`

	Success bool `json:"success,omitempty"`
}

ModifyWebhookResponse data struct

type MoveUserEmailAccountFolderMessageParams

type MoveUserEmailAccountFolderMessageParams struct {
	// Required:
	NewFolderID string `json:"new_folder_id"`
	// Optional:
	Delimiter string `json:"delimiter,omitempty"`
}

MoveUserEmailAccountFolderMessageParams form values data struct. Requires: NewFolderID, and may optionally contain Delimiter.

type MoveUserEmailAccountFolderMessageResponse

type MoveUserEmailAccountFolderMessageResponse struct {
	Success bool `json:"success,omitempty"`
}

MoveUserEmailAccountFolderMessageResponse data struct

type PersonInfo

type PersonInfo map[string]map[string]string

PersonInfo embedded data struct within GetUsersEmailAccountFolderMessagesResponse and WebhookMessageData

func (*PersonInfo) UnmarshalJSON

func (m *PersonInfo) UnmarshalJSON(b []byte) error

UnmarshalJSON is here because the empty state is an array in the json, and is a object/map when populated

type RequestError

type RequestError struct {
	Err error
	ErrorMetaData
}

RequestError is the error type returned by DoFormRequest and all cio api calls

func (RequestError) Cause

func (e RequestError) Cause() error

Cause returns the cause of any wrapped errors, or just the base error if no wrapped error. Can use with github.com/pkg/errors

func (RequestError) Error

func (e RequestError) Error() string

Error returns the Error string, any Wrapped Causes, and any StatusCode, Payload, Method, and URL that were set

func (RequestError) ErrorMethod

func (e RequestError) ErrorMethod() string

ErrorMethod returns the RequestError's Method (ex: GET, POST, etc)

func (RequestError) ErrorPayload

func (e RequestError) ErrorPayload() string

ErrorPayload returns the RequestError's payload, if present

func (RequestError) ErrorStatusCode

func (e RequestError) ErrorStatusCode() int

ErrorStatusCode returns the RequestError's StatusCode (ex: 200 for OK, 0 if no status code)

func (RequestError) ErrorURL

func (e RequestError) ErrorURL() string

ErrorURL returns the RequestError's URL

func (RequestError) Format

func (e RequestError) Format(s fmt.State, verb rune)

Format prints out the error, any causes, a stacktrace, and the other fields in the struct

func (RequestError) MarshalJSON

func (e RequestError) MarshalJSON() ([]byte, error)

MarshalJSON allows RequestError to implement json.Marshaler (for use with logging in json)

func (RequestError) String

func (e RequestError) String() string

String returns the same as Error()

func (*RequestError) UnmarshalJSON

func (e *RequestError) UnmarshalJSON(data []byte) error

UnmarshalJSON allows RequestError to implement json.Unmarshaler (for completeness since RequestError implements Marshaler).

Note that if the json property is possibly null, you must unmarshal to *RequestError, as the cioutil.UnmarshalJSON helper does.
Use of this loses the ability to unwrap errors with errors.Cause() or get the original stacktrace

type StatusCallback

type StatusCallback struct {
	AccountID      string `json:"account_id,omitempty"`
	UserID         string `json:"user_id,omitempty"`
	ServerLabel    string `json:"server_label,omitempty"`
	EmailAccount   string `json:"email_account,omitempty"`
	Failure        string `json:"failure,omitempty"`
	FailureMessage string `json:"failure_message,omitempty"`

	Token     string `json:"token,omitempty" valid:"required"`
	Signature string `json:"signature,omitempty" valid:"required"`

	Timestamp int `json:"timestamp,omitempty" valid:"required"`
}

StatusCallback data struct that will be received from CIO when a user's status changes

type UserEmailAccountsFolderMessageFlags

type UserEmailAccountsFolderMessageFlags struct {
	Read     bool `json:"read,omitempty"`
	Answered bool `json:"answered,omitempty"`
	Flagged  bool `json:"flagged,omitempty"`
	Draft    bool `json:"draft,omitempty"`
}

UserEmailAccountsFolderMessageFlags embedded data struct within GetUserEmailAccountsFolderMessageFlagsResponse

type UserEmailAccountsFolderMessageReadResponse

type UserEmailAccountsFolderMessageReadResponse struct {
	Success bool `json:"success,omitempty"`
}

UserEmailAccountsFolderMessageReadResponse data struct

type UsersEmailAccountFolderMessageAttachment

type UsersEmailAccountFolderMessageAttachment struct {
	Type               string `json:"type,omitempty"`
	FileName           string `json:"file_name,omitempty"`
	BodySection        string `json:"body_section,omitempty"`
	ContentDisposition string `json:"content_disposition,omitempty"`
	MessageID          string `json:"message_id,omitempty"`
	XAttachmentID      string `json:"x_attachment_id,omitempty"`

	Size         int `json:"size,omitempty"`
	AttachmentID int `json:"attachment_id,omitempty"`
}

UsersEmailAccountFolderMessageAttachment embedded data struct within GetUsersEmailAccountFolderMessagesResponse

type UsersEmailAccountFolderMessageBody

type UsersEmailAccountFolderMessageBody struct {
	BodySection string `json:"body_section,omitempty"`
	Type        string `json:"type,omitempty"`
	Encoding    string `json:"encoding,omitempty"`
	Content     string `json:"content,omitempty"`

	Size int `json:"size,omitempty"`
}

UsersEmailAccountFolderMessageBody embedded data struct within GetUsersEmailAccountFolderMessagesResponse

type UsersEmailAccountMessageAttachment

type UsersEmailAccountMessageAttachment struct {
	Type               string `json:"type,omitempty"`
	FileName           string `json:"file_name,omitempty"`
	BodySection        string `json:"body_section,omitempty"`
	ContentDisposition string `json:"content_disposition,omitempty"`
	MessageID          string `json:"message_id,omitempty"`
	XAttachmentID      string `json:"x_attachment_id,omitempty"`

	Size         int `json:"size,omitempty"`
	AttachmentID int `json:"attachment_id,omitempty"`
}

UsersEmailAccountMessageAttachment embedded data struct within GetUsersEmailAccountMessagesResponse

type UsersEmailAccountMessageBody

type UsersEmailAccountMessageBody struct {
	BodySection string `json:"body_section,omitempty"`
	Type        string `json:"type,omitempty"`
	Encoding    string `json:"encoding,omitempty"`
	Content     string `json:"content,omitempty"`

	Size int `json:"size,omitempty"`
}

UsersEmailAccountMessageBody embedded data struct within GetUsersEmailAccountMessagesResponse

type WebhookBody

type WebhookBody struct {
	Type        string `json:"type,omitempty"`
	Charset     string `json:"charset,omitempty"`
	BodySection string `json:"body_section,omitempty"`
	Content     string `json:"content,omitempty"`
}

WebhookBody embedded data struct within WebhookMessageData

type WebhookCallback

type WebhookCallback struct {
	AccountID string `json:"account_id,omitempty"`
	WebhookID string `json:"webhook_id,omitempty"`
	Token     string `json:"token,omitempty" valid:"required"`
	Signature string `json:"signature,omitempty" valid:"required"`

	Timestamp int `json:"timestamp,omitempty" valid:"required"`

	// Data is an error message that gives more information about the cause of failure
	Data string `json:"data,omitempty"`

	MessageData WebhookMessageData `json:"message_data,omitempty"`
}

WebhookCallback data struct that will be received from CIO

type WebhookMessageData

type WebhookMessageData struct {
	MessageID string `json:"message_id,omitempty"`
	Subject   string `json:"subject,omitempty"`

	References []string `json:"references,omitempty"`
	Folders    []string `json:"folders,omitempty"`

	Date         int `json:"date,omitempty"`
	DateReceived int `json:"date_received,omitempty"`

	Addresses WebhookMessageDataAddresses `json:"addresses,omitempty"`

	PersonInfo PersonInfo `json:"person_info,omitempty"`

	Flags WebhookMessageDataFlags `json:"flags,omitempty"`

	Sources []WebhookMessageDataAccount `json:"sources,omitempty"`

	EmailAccounts []WebhookMessageDataAccount `json:"email_accounts,omitempty"`

	Files []WebhookMessageDataFile `json:"files,omitempty"`

	Bodies []WebhookBody `json:"bodies,omitempty"`

	Headers mail.Header `json:"headers,omitempty"`
}

WebhookMessageData data struct within WebhookCallback

type WebhookMessageDataAccount

type WebhookMessageDataAccount struct {
	Label       string `json:"label,omitempty"`
	Folder      string `json:"folder,omitempty"`
	UID         int    `json:"uid,omitempty"`
	ResourceURL string `json:"resource_url,omitempty"`
}

WebhookMessageDataAccount embedded data struct within WebhookMessageData

type WebhookMessageDataAddresses

type WebhookMessageDataAddresses struct {
	From       Address   `json:"from,omitempty"`
	To         []Address `json:"to,omitempty"`
	Cc         []Address `json:"cc,omitempty"`
	Bcc        []Address `json:"bcc,omitempty"`
	Sender     []Address `json:"sender,omitempty"`
	ReplyTo    []Address `json:"reply_to,omitempty"`
	ReturnPath []Address `json:"return_path,omitempty"`
}

WebhookMessageDataAddresses struct within WebhookMessageData

func (*WebhookMessageDataAddresses) UnmarshalJSON

func (m *WebhookMessageDataAddresses) UnmarshalJSON(b []byte) error

UnmarshalJSON is here because the empty state is an array in the json, and is a object/map when populated

type WebhookMessageDataFile

type WebhookMessageDataFile struct {
	ContentID          string `json:"content_id,omitempty"`
	Type               string `json:"type,omitempty"`
	FileName           string `json:"file_name,omitempty"`
	BodySection        string `json:"body_section,omitempty"`
	ContentDisposition string `json:"content_disposition,omitempty"`
	MainFileName       string `json:"main_file_name,omitempty"`

	XAttachmentID interface{} `json:"x_attachment_id,omitempty"`

	FileNameStructure [][]string `json:"file_name_structure,omitempty"`

	AttachmentID int `json:"attachment_id,omitempty"`
	Size         int `json:"size,omitempty"`

	IsEmbedded bool `json:"is_embedded,omitempty"`
}

WebhookMessageDataFile embedded data struct within WebhookMessageData

type WebhookMessageDataFlags

type WebhookMessageDataFlags struct {
	Flagged  bool `json:"flagged,omitempty"`
	Answered bool `json:"answered,omitempty"`
	Draft    bool `json:"draft,omitempty"`
	Seen     bool `json:"seen,omitempty"`
}

WebhookMessageDataFlags embedded data struct within WebhookMessageData

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL