template

package
v2.0.2-beta.7 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 4 Imported by: 1

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

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 Get

func Get(ctx context.Context, params *GetParams) (*clerk.Template, error)

Get retrieves details for a 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.

func Update

func Update(ctx context.Context, params *UpdateParams) (*clerk.Template, error)

Update updates an existing template or creates a new one with the provided params.

Types

type Client

type Client struct {
	Backend clerk.Backend
}

Client is used to invoke the Templates API.

func NewClient

func NewClient(config *clerk.ClientConfig) *Client

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, params *DeleteParams) (*clerk.DeletedResource, error)

Delete deletes a custom user template.

func (*Client) Get

func (c *Client) Get(ctx context.Context, params *GetParams) (*clerk.Template, error)

Get retrieves details for a 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.

func (*Client) Update

func (c *Client) Update(ctx context.Context, params *UpdateParams) (*clerk.Template, error)

Update updates an existing template or creates a new one with the provided params.

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 PreviewParams struct {
	clerk.APIParams
	Subject       *string            `json:"subject,omitempty"`
	Body          *string            `json:"body,omitempty"`
	FromEmailName *string            `json:"from_email_name,omitempty"`
	TemplateType  clerk.TemplateType `json:"-"`
	Slug          string             `json:"-"`
}

type RevertParams

type RevertParams struct {
	TemplateType clerk.TemplateType `json:"-"`
	Slug         string             `json:"-"`
}

type ToggleDeliveryParams

type ToggleDeliveryParams struct {
	clerk.APIParams
	DeliveredByClerk *bool              `json:"delivered_by_clerk,omitempty"`
	TemplateType     clerk.TemplateType `json:"-"`
	Slug             string             `json:"-"`
}

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:"-"`
}

Jump to

Keyboard shortcuts

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