Documentation
¶
Overview ¶
This files contains models that can't be auto-generated from codegen
This files contains models that can't be auto-generated from codegen
Index ¶
- type Action
- func (m Action) EmailAction() *EmailAction
- func (m Action) IsEmailAction() bool
- func (m Action) IsRawInterface() bool
- func (m Action) IsWebhookAction() bool
- func (m Action) MarshalJSON() ([]byte, error)
- func (m Action) RawInterface() interface{}
- func (m *Action) UnmarshalJSON(b []byte) (err error)
- func (m Action) WebhookAction() *WebhookAction
- type ActionImmutable
- type ActionKind
- type ActionMutable
- func (m ActionMutable) EmailActionMutable() *EmailActionMutable
- func (m ActionMutable) IsEmailActionMutable() bool
- func (m ActionMutable) IsRawInterface() bool
- func (m ActionMutable) IsWebhookActionMutable() bool
- func (m ActionMutable) MarshalJSON() ([]byte, error)
- func (m ActionMutable) RawInterface() interface{}
- func (m *ActionMutable) UnmarshalJSON(b []byte) (err error)
- func (m ActionMutable) WebhookActionMutable() *WebhookActionMutable
- type ActionResult
- type ActionResultEmailDetail
- type ActionResultEmailDetailState
- type EmailAction
- type EmailActionMutable
- type PublicWebhookKey
- type RawJsonPayload
- type Service
- func (s *Service) CreateAction(action Action, resp ...*http.Response) (*Action, error)
- func (s *Service) DeleteAction(actionName string, resp ...*http.Response) error
- func (s *Service) GetAction(actionName string, resp ...*http.Response) (*Action, error)
- func (s *Service) GetActionStatus(actionName string, statusId string, resp ...*http.Response) (*ActionResult, error)
- func (s *Service) GetActionStatusDetails(actionName string, statusId string, resp ...*http.Response) ([]ActionResultEmailDetail, error)
- func (s *Service) GetPublicWebhookKeys(resp ...*http.Response) ([]PublicWebhookKey, error)
- func (s *Service) ListActions(resp ...*http.Response) ([]Action, error)
- func (s *Service) TriggerAction(actionName string, triggerEvent TriggerEvent, resp ...*http.Response) error
- func (s *Service) TriggerActionWithStatus(actionName string, triggerEvent TriggerEvent) (*TriggerResponse, error)
- func (s *Service) UpdateAction(actionName string, actionMutable ActionMutable, resp ...*http.Response) (*Action, error)
- type ServiceError
- type Servicer
- type ServicerGenerated
- type StatusState
- type TriggerEvent
- type TriggerEventActionMetadata
- type TriggerEventKind
- type TriggerResponse
- type WebhookAction
- type WebhookActionMutable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
// contains filtered or unexported fields
}
func MakeActionFromEmailAction ¶
func MakeActionFromEmailAction(f EmailAction) Action
MakeActionFromEmailAction creates a new Action from an instance of EmailAction
func MakeActionFromRawInterface ¶
func MakeActionFromRawInterface(f interface{}) Action
MakeActionFromRawInterface creates a new Action from a raw interface{}
func MakeActionFromWebhookAction ¶
func MakeActionFromWebhookAction(f WebhookAction) Action
MakeActionFromWebhookAction creates a new Action from an instance of WebhookAction
func (Action) EmailAction ¶
func (m Action) EmailAction() *EmailAction
EmailAction returns EmailAction if IsEmailAction() is true, nil otherwise
func (Action) IsEmailAction ¶
IsEmailAction checks if the Action is a EmailAction
func (Action) IsRawInterface ¶
IsRawInterface checks if the Action is an interface{} (unknown type)
func (Action) IsWebhookAction ¶
IsWebhookAction checks if the Action is a WebhookAction
func (Action) MarshalJSON ¶
MarshalJSON marshals Action using the appropriate struct field
func (Action) RawInterface ¶
func (m Action) RawInterface() interface{}
RawInterface returns interface{} if IsRawInterface() is true (unknown type), nil otherwise
func (*Action) UnmarshalJSON ¶
UnmarshalJSON unmarshals Action using the "kind" property
func (Action) WebhookAction ¶
func (m Action) WebhookAction() *WebhookAction
WebhookAction returns WebhookAction if IsWebhookAction() is true, nil otherwise
type ActionImmutable ¶
type ActionImmutable struct {
Kind ActionKind `json:"kind"`
// The name of the action, as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit.
Name string `json:"name"`
// The date and time this action template was created (ISO-8601 date/time with zone).
CreatedAt *string `json:"createdAt,omitempty"`
// The principal that created this action template.
CreatedBy *string `json:"createdBy,omitempty"`
// The date and time this action template was updated (ISO-8601 date/time with zone).
UpdatedAt *string `json:"updatedAt,omitempty"`
// The principal that updated this action template.
UpdatedBy *string `json:"updatedBy,omitempty"`
}
type ActionKind ¶
type ActionKind string
ActionKind :
const ( ActionKindWebhook ActionKind = "webhook" ActionKindEmail ActionKind = "email" )
List of ActionKind
type ActionMutable ¶
type ActionMutable struct {
// contains filtered or unexported fields
}
ActionMutable is EmailActionMutable, WebhookActionMutable, (or interface{} if no matches are found)
func MakeActionMutableFromEmailActionMutable ¶
func MakeActionMutableFromEmailActionMutable(f EmailActionMutable) ActionMutable
MakeActionMutableFromEmailActionMutable creates a new ActionMutable from an instance of EmailActionMutable
func MakeActionMutableFromRawInterface ¶
func MakeActionMutableFromRawInterface(f interface{}) ActionMutable
MakeActionMutableFromRawInterface creates a new ActionMutable from a raw interface{}
func MakeActionMutableFromWebhookActionMutable ¶
func MakeActionMutableFromWebhookActionMutable(f WebhookActionMutable) ActionMutable
MakeActionMutableFromWebhookActionMutable creates a new ActionMutable from an instance of WebhookActionMutable
func (ActionMutable) EmailActionMutable ¶
func (m ActionMutable) EmailActionMutable() *EmailActionMutable
EmailActionMutable returns EmailActionMutable if IsEmailActionMutable() is true, nil otherwise
func (ActionMutable) IsEmailActionMutable ¶
func (m ActionMutable) IsEmailActionMutable() bool
IsEmailActionMutable checks if the ActionMutable is a EmailActionMutable
func (ActionMutable) IsRawInterface ¶
func (m ActionMutable) IsRawInterface() bool
IsRawInterface checks if the ActionMutable is an interface{} (unknown type)
func (ActionMutable) IsWebhookActionMutable ¶
func (m ActionMutable) IsWebhookActionMutable() bool
IsWebhookActionMutable checks if the ActionMutable is a WebhookActionMutable
func (ActionMutable) MarshalJSON ¶
func (m ActionMutable) MarshalJSON() ([]byte, error)
MarshalJSON marshals ActionMutable using ActionMutable.ActionMutable
func (ActionMutable) RawInterface ¶
func (m ActionMutable) RawInterface() interface{}
RawInterface returns interface{} if IsRawInterface() is true (unknown type), nil otherwise
func (*ActionMutable) UnmarshalJSON ¶
func (m *ActionMutable) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON unmarshals ActionMutable into EmailActionMutable, WebhookActionMutable, or interface{} if no matches are found
func (ActionMutable) WebhookActionMutable ¶
func (m ActionMutable) WebhookActionMutable() *WebhookActionMutable
WebhookActionMutable returns WebhookActionMutable if IsWebhookActionMutable() is true, nil otherwise
type ActionResult ¶
type ActionResult struct {
ActionName string `json:"actionName"`
State StatusState `json:"state"`
StatusId string `json:"statusId"`
Message *string `json:"message,omitempty"`
}
type ActionResultEmailDetail ¶
type ActionResultEmailDetail struct {
EmailAddress *string `json:"emailAddress,omitempty"`
State *ActionResultEmailDetailState `json:"state,omitempty"`
}
type ActionResultEmailDetailState ¶
type ActionResultEmailDetailState string
const ( ActionResultEmailDetailStatePending ActionResultEmailDetailState = "PENDING" ActionResultEmailDetailStateNotFound ActionResultEmailDetailState = "NOT_FOUND" ActionResultEmailDetailStateSucceeded ActionResultEmailDetailState = "SUCCEEDED" ActionResultEmailDetailStateBounced ActionResultEmailDetailState = "BOUNCED" ActionResultEmailDetailStateRecipientComplained ActionResultEmailDetailState = "RECIPIENT_COMPLAINED" )
List of ActionResultEmailDetailState
type EmailAction ¶
type EmailAction struct {
Kind ActionKind `json:"kind"`
// The name of the action, as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit.
Name string `json:"name"`
// An array of email addresses to include as recipients. Requires a special permission set for use. Please DO NOT include actual bouncing emails in automated testing.
Addresses []string `json:"addresses,omitempty"`
// HTML content to send as the body of the email. You can use a template in this field.
Body *string `json:"body,omitempty"`
// Optional text to send as the text/plain part of the email. If this field is not set for an email action, the Action service converts the value from the body field to text and sends that as the text/plain part when invoking the action. You can use a template in this field.
BodyPlainText *string `json:"bodyPlainText,omitempty"`
// The date and time this action template was created (ISO-8601 date/time with zone).
CreatedAt *string `json:"createdAt,omitempty"`
// The principal that created this action template.
CreatedBy *string `json:"createdBy,omitempty"`
// Optional text providing a human-friendly name for the sender. Must be less than or equal to 81 characters. You can use a template in this field.
FromName *string `json:"fromName,omitempty"`
// An array of tenant member names, whose profile email addresses will be included as recipients.
Members []string `json:"members,omitempty"`
// The subject of the email. You can use a template in this field.
Subject *string `json:"subject,omitempty"`
// A human-readable title for the action. Must be less than or equal to 128 characters.
Title *string `json:"title,omitempty"`
// The date and time this action template was updated (ISO-8601 date/time with zone).
UpdatedAt *string `json:"updatedAt,omitempty"`
// The principal that updated this action template.
UpdatedBy *string `json:"updatedBy,omitempty"`
}
type EmailActionMutable ¶
type EmailActionMutable struct {
// An array of email addresses to include as recipients. Requires a special permission set for use. Please DO NOT include actual bouncing emails in automated testing.
Addresses []string `json:"addresses,omitempty"`
// HTML content to send as the body of the email. You can use a template in this field.
Body *string `json:"body,omitempty"`
// Optional text to send as the text/plain part of the email. If this field is not set for an email action, the Action service converts the value from the body field to text and sends that as the text/plain part when invoking the action. You can use a template in this field.
BodyPlainText *string `json:"bodyPlainText,omitempty"`
// Optional text providing a human-friendly name for the sender. Must be less than or equal to 81 characters. You can use a template in this field.
FromName *string `json:"fromName,omitempty"`
// An array of tenant member names, whose profile email addresses will be included as recipients.
Members []string `json:"members,omitempty"`
// The subject of the email. You can use a template in this field.
Subject *string `json:"subject,omitempty"`
// A human-readable title for the action. Must be less than or equal to 128 characters.
Title *string `json:"title,omitempty"`
}
type PublicWebhookKey ¶
type PublicWebhookKey struct {
// A PEM-formatted, ASN.1 DER-encoded PKCS#1 key.
Key string `json:"key"`
}
type RawJsonPayload ¶
type RawJsonPayload map[string]interface{}
type Service ¶
type Service services.BaseService
func NewService ¶
NewService creates a new action service client from the given Config
func (*Service) CreateAction ¶
CreateAction - Creates an action template. Parameters:
action: The action template to create. resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
func (*Service) DeleteAction ¶
DeleteAction - Removes an action template. Parameters:
actionName: The name of the action as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit. resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
func (*Service) GetAction ¶
GetAction - Returns a specific action template. Parameters:
actionName: The name of the action as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit. resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
func (*Service) GetActionStatus ¶
func (s *Service) GetActionStatus(actionName string, statusId string, resp ...*http.Response) (*ActionResult, error)
GetActionStatus - Returns the status of an action that was invoked. The status is available for 4 days after the last status change. Parameters:
actionName: The name of the action as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit. statusId: The ID of the action status. resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
func (*Service) GetActionStatusDetails ¶
func (s *Service) GetActionStatusDetails(actionName string, statusId string, resp ...*http.Response) ([]ActionResultEmailDetail, error)
GetActionStatusDetails - Returns the status details of the invoked email action. The status is available for 4 days after the last status change. Parameters:
actionName: The name of the action as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit. statusId: The ID of the action status. resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
func (*Service) GetPublicWebhookKeys ¶
func (s *Service) GetPublicWebhookKeys(resp ...*http.Response) ([]PublicWebhookKey, error)
GetPublicWebhookKeys - Returns an array of one or two webhook keys. The first key is active. The second key, if present, is expired. Parameters:
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
func (*Service) ListActions ¶
ListActions - Returns the list of action templates. Parameters:
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
func (*Service) TriggerAction ¶
func (s *Service) TriggerAction(actionName string, triggerEvent TriggerEvent, resp ...*http.Response) error
TriggerAction - Invokes an action. Parameters:
actionName: The name of the action as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit. triggerEvent: The action payload, which should include values for any templated fields. resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
func (*Service) TriggerActionWithStatus ¶
func (s *Service) TriggerActionWithStatus(actionName string, triggerEvent TriggerEvent) (*TriggerResponse, error)
TriggerActionWithStatus - Trigger an action and return a TriggerResponse with StatusID
Parameters:
actionName: The name of the action, as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit. triggerEvent: The action payload, which must include values for any templated fields.
func (*Service) UpdateAction ¶
func (s *Service) UpdateAction(actionName string, actionMutable ActionMutable, resp ...*http.Response) (*Action, error)
UpdateAction - Modifies an action template. Parameters:
actionName: The name of the action as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit. actionMutable: Updates to the action template. resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
type ServiceError ¶
type Servicer ¶
type Servicer interface {
//interfaces that cannot be auto-generated from codegen
/*
TriggerActionWithStatus - Trigger an action and return a TriggerResponse with StatusID
Parameters:
actionName: The name of the action, as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit.
triggerEvent: The action payload, which must include values for any templated fields.
*/
TriggerActionWithStatus(actionName string, triggerEvent TriggerEvent) (*TriggerResponse, error)
//interfaces that are auto-generated in interface_generated.go
ServicerGenerated
}
Servicer represents the interface for implementing all endpoints for this service
type ServicerGenerated ¶ added in v1.10.0
type ServicerGenerated interface {
/*
CreateAction - Creates an action template.
Parameters:
action: The action template to create.
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
CreateAction(action Action, resp ...*http.Response) (*Action, error)
/*
DeleteAction - Removes an action template.
Parameters:
actionName: The name of the action as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit.
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
DeleteAction(actionName string, resp ...*http.Response) error
/*
GetAction - Returns a specific action template.
Parameters:
actionName: The name of the action as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit.
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
GetAction(actionName string, resp ...*http.Response) (*Action, error)
/*
GetActionStatus - Returns the status of an action that was invoked. The status is available for 4 days after the last status change.
Parameters:
actionName: The name of the action as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit.
statusId: The ID of the action status.
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
GetActionStatus(actionName string, statusId string, resp ...*http.Response) (*ActionResult, error)
/*
GetActionStatusDetails - Returns the status details of the invoked email action. The status is available for 4 days after the last status change.
Parameters:
actionName: The name of the action as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit.
statusId: The ID of the action status.
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
GetActionStatusDetails(actionName string, statusId string, resp ...*http.Response) ([]ActionResultEmailDetail, error)
/*
GetPublicWebhookKeys - Returns an array of one or two webhook keys. The first key is active. The second key, if present, is expired.
Parameters:
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
GetPublicWebhookKeys(resp ...*http.Response) ([]PublicWebhookKey, error)
/*
ListActions - Returns the list of action templates.
Parameters:
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
ListActions(resp ...*http.Response) ([]Action, error)
/*
TriggerAction - Invokes an action.
Parameters:
actionName: The name of the action as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit.
triggerEvent: The action payload, which should include values for any templated fields.
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
TriggerAction(actionName string, triggerEvent TriggerEvent, resp ...*http.Response) error
/*
UpdateAction - Modifies an action template.
Parameters:
actionName: The name of the action as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit.
actionMutable: Updates to the action template.
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
*/
UpdateAction(actionName string, actionMutable ActionMutable, resp ...*http.Response) (*Action, error)
}
ServicerGenerated represents the interface for implementing all endpoints for this service
type StatusState ¶
type StatusState string
StatusState :
const ( StatusStateQueued StatusState = "QUEUED" StatusStateRunning StatusState = "RUNNING" StatusStateDone StatusState = "DONE" StatusStateFailed StatusState = "FAILED" )
List of StatusState
type TriggerEvent ¶
type TriggerEvent struct {
ActionMetadata *TriggerEventActionMetadata `json:"actionMetadata,omitempty"`
// string-ified ISO-8601 date/time with zone.
CreatedAt *string `json:"createdAt,omitempty"`
// The principal that generated the trigger event.
CreatedBy *string `json:"createdBy,omitempty"`
// A unique identifier for this trigger event. Generated from a hash of all recursively-sorted event field values.
Id *string `json:"id,omitempty"`
Kind *TriggerEventKind `json:"kind,omitempty"`
Payload *RawJsonPayload `json:"payload,omitempty"`
// The tenant within which the trigger event was generated.
Tenant *string `json:"tenant,omitempty"`
// A description of the condition that caused the trigger event.
TriggerCondition *string `json:"triggerCondition,omitempty"`
// The name of the trigger for which this event was created.
TriggerName *string `json:"triggerName,omitempty"`
// A time to live (TTL), expressed as seconds after createdAt, after which the trigger event will no longer be acted upon.
TtlSeconds *int32 `json:"ttlSeconds,omitempty"`
}
type TriggerEventActionMetadata ¶
type TriggerEventActionMetadata struct {
// An array of email addresses to include as recipients. Requires a special permission set for use. Please DO NOT include actual bouncing emails in automated testing.
Addresses []string `json:"addresses,omitempty"`
// An array of tenant member names, whose profile email addresses will be included as recipients.
Members []string `json:"members,omitempty"`
}
type TriggerEventKind ¶
type TriggerEventKind string
TriggerEventKind :
const (
TriggerEventKindTrigger TriggerEventKind = "trigger"
)
List of TriggerEventKind
type TriggerResponse ¶
TriggerResponse for returning status url and parsed statusID (if possible)
type WebhookAction ¶
type WebhookAction struct {
Kind ActionKind `json:"kind"`
// The name of the action, as one or more identifier strings separated by periods. Each identifier string consists of lowercase letters, digits, and underscores, and cannot start with a digit.
Name string `json:"name"`
// The (possibly) templated payload body, which is POSTed to the webhookUrl when invoked.
WebhookPayload string `json:"webhookPayload"`
// Only HTTPS is allowed.
WebhookUrl string `json:"webhookUrl"`
// The date and time this action template was created (ISO-8601 date/time with zone).
CreatedAt *string `json:"createdAt,omitempty"`
// The principal that created this action template.
CreatedBy *string `json:"createdBy,omitempty"`
// A human-readable title for the action. Must be less than 128 characters.
Title *string `json:"title,omitempty"`
// The date and time this action template was updated (ISO-8601 date/time with zone).
UpdatedAt *string `json:"updatedAt,omitempty"`
// The principal that updated this action template.
UpdatedBy *string `json:"updatedBy,omitempty"`
WebhookHeaders map[string][]string `json:"webhookHeaders,omitempty"`
}
type WebhookActionMutable ¶
type WebhookActionMutable struct {
// A human-readable title for the action. Must be less than 128 characters.
Title *string `json:"title,omitempty"`
WebhookHeaders map[string][]string `json:"webhookHeaders,omitempty"`
// The (possibly) templated payload body, which is POSTed to the webhookUrl when invoked.
WebhookPayload *string `json:"webhookPayload,omitempty"`
// Only HTTPS is allowed.
WebhookUrl *string `json:"webhookUrl,omitempty"`
}