Documentation ¶
Overview ¶
Code generated by "gen"; DO NOT EDIT. This file is meant to be re-generated in place and/or deleted at any time.
Package template provides the Templates API.
Index ¶
- func Delete(ctx context.Context, params *DeleteParams) (*clerk.DeletedResource, error)
- func Get(ctx context.Context, params *GetParams) (*clerk.Template, error)
- func List(ctx context.Context, params *ListParams) (*clerk.TemplateList, error)
- func Preview(ctx context.Context, params *PreviewParams) (*clerk.TemplatePreview, error)
- func Revert(ctx context.Context, params *RevertParams) (*clerk.Template, error)
- func ToggleDelivery(ctx context.Context, params *ToggleDeliveryParams) (*clerk.Template, error)
- func Update(ctx context.Context, params *UpdateParams) (*clerk.Template, error)
- type Client
- func (c *Client) Delete(ctx context.Context, params *DeleteParams) (*clerk.DeletedResource, error)
- func (c *Client) Get(ctx context.Context, params *GetParams) (*clerk.Template, error)
- func (c *Client) List(ctx context.Context, params *ListParams) (*clerk.TemplateList, error)
- func (c *Client) Preview(ctx context.Context, params *PreviewParams) (*clerk.TemplatePreview, error)
- func (c *Client) Revert(ctx context.Context, params *RevertParams) (*clerk.Template, error)
- func (c *Client) ToggleDelivery(ctx context.Context, params *ToggleDeliveryParams) (*clerk.Template, error)
- func (c *Client) Update(ctx context.Context, params *UpdateParams) (*clerk.Template, error)
- type DeleteParams
- type GetParams
- type ListParams
- type PreviewParams
- type RevertParams
- type ToggleDeliveryParams
- type UpdateParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(ctx context.Context, params *DeleteParams) (*clerk.DeletedResource, error)
Delete deletes a custom user template.
func List ¶
func List(ctx context.Context, params *ListParams) (*clerk.TemplateList, error)
List returns a list of templates of a given type.
func Preview ¶
func Preview(ctx context.Context, params *PreviewParams) (*clerk.TemplatePreview, error)
Preview returns a preview of a template.
func Revert ¶
func Revert(ctx context.Context, params *RevertParams) (*clerk.Template, error)
Revert reverts a template to its default state.
func ToggleDelivery ¶
func ToggleDelivery(ctx context.Context, params *ToggleDeliveryParams) (*clerk.Template, error)
ToggleDelivery sets the delivery by Clerk for a template.
Types ¶
type Client ¶
type Client struct {
Backend clerk.Backend
}
Client is used to invoke the Templates API.
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, params *DeleteParams) (*clerk.DeletedResource, error)
Delete deletes a custom user template.
func (*Client) List ¶
func (c *Client) List(ctx context.Context, params *ListParams) (*clerk.TemplateList, error)
List returns a list of templates of a given type.
func (*Client) Preview ¶
func (c *Client) Preview(ctx context.Context, params *PreviewParams) (*clerk.TemplatePreview, error)
Preview returns a preview of a template.
func (*Client) Revert ¶
func (c *Client) Revert(ctx context.Context, params *RevertParams) (*clerk.Template, error)
Revert reverts a template to its default state.
func (*Client) ToggleDelivery ¶
func (c *Client) ToggleDelivery(ctx context.Context, params *ToggleDeliveryParams) (*clerk.Template, error)
ToggleDelivery sets the delivery by Clerk for a template.
type DeleteParams ¶
type DeleteParams struct { TemplateType clerk.TemplateType `json:"-"` Slug string `json:"-"` }
type GetParams ¶
type GetParams struct { TemplateType clerk.TemplateType `json:"-"` Slug string `json:"-"` }
type ListParams ¶
type ListParams struct {
TemplateType clerk.TemplateType `json:"-"`
}
type PreviewParams ¶
type RevertParams ¶
type RevertParams struct { TemplateType clerk.TemplateType `json:"-"` Slug string `json:"-"` }
type ToggleDeliveryParams ¶
type UpdateParams ¶
type UpdateParams struct { clerk.APIParams Name *string `json:"name,omitempty"` Subject *string `json:"subject,omitempty"` Markup *string `json:"markup,omitempty"` Body *string `json:"body,omitempty"` FromEmailName *string `json:"from_email_name,omitempty"` DeliveredByClerk *bool `json:"delivered_by_clerk,omitempty"` TemplateType clerk.TemplateType `json:"-"` Slug string `json:"-"` }