args

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Announcement

type Announcement struct {
	ImageURL            string        `json:"image_url"`
	Title               string        `json:"title"`
	DescriptionMarkDown Markdown      `json:"description"`
	DescriptionHTML     template.HTML `json:"-"`
	Link                string        `json:"link"`
}

Announcement ...

func (*Announcement) Process

func (a *Announcement) Process() (err error)

type ArgsI

type ArgsI interface {
	Process() (err error)
}

type ContactInfo

type ContactInfo struct {
	Line        string `json:"line,omitempty"`
	Email       string `json:"email,omitempty"`
	Facebook    string `json:"facebook,omitempty"`
	Youtube     string `json:"youtube,omitempty"`
	Twitter     string `json:"twitter,omitempty"`
	Instagram   string `json:"instagram,omitempty"`
	PhoneNumber string `json:"phone,omitempty"`
	Name        string `json:"name"`
	Website     string `json:"website,omitempty"`
}

ContactInfo ...

type EmailAddress

type EmailAddress struct {
	Name    string `json:"name"`
	Address string `json:"email"`
}

EmailAddress ...

type FeatureUpdatesArgs

type FeatureUpdatesArgs struct {
	SharedArgs
	Announcements []Announcement `json:"announcements"`
	Style         StyleEnum      `json:"style"`
}

FeatureUpdatesArgs is the default args for feature-updates layout

func (*FeatureUpdatesArgs) Process

func (f *FeatureUpdatesArgs) Process() (err error)

type Item

type Item struct {
	ProductName  string `json:"product_nickname"`
	ProductQty   int    `json:"product_qty"`
	ProductPrice string `json:"product_price"`
}

Item ...

type Markdown

type Markdown string

type Option

type Option struct {
	Color       string `json:"color,omitempty"`
	ReplyText   string `json:"option_text,omitempty"`
	URL         string `json:"option_url,omitempty"`
	Description string `json:"display_text,omitempty"`
}

Option ...

type ReceiptArgs

type ReceiptArgs struct {
	SharedArgs
	OrderNumber   string   `json:"order_number"`
	OrderCreated  string   `json:"order_created"`
	PaymentOption string   `json:"payment_option"`
	Items         []Item   `json:"items"`
	Total         Total    `json:"total"`
	Options       []Option `json:"options"`
}

ReceiptArgs is the default args for receipt

func (*ReceiptArgs) Process

func (r *ReceiptArgs) Process() (err error)

type SharedArgs

type SharedArgs struct {
	FromEmail                     EmailAddress  `json:"from"`
	ToEmail                       EmailAddress  `json:"to"`
	Subject                       string        `json:"subject"`
	HeaderImageURL                string        `json:"header_image_url"`
	TopContentMarkdown            Markdown      `json:"top_content"`
	TopContentHTML                template.HTML `json:"-"`
	EndContentMarkdown            Markdown      `json:"end_content"`
	EndContentHTML                template.HTML `json:"-"`
	ContactInfo                   *ContactInfo  `json:"contact_info"`
	UnsubscribeDisclaimerMarkdown Markdown      `json:"unsubscribe_disclaimer"`
	UnsubscribeDisclaimerHTML     template.HTML `json:"-"`
}

SharedArgs ...

func (*SharedArgs) Process

func (s *SharedArgs) Process() (err error)

type StyleEnum

type StyleEnum string

StyleEnum is the style enum types

const (
	LeftRight  StyleEnum = "left-right"
	LargeImage StyleEnum = "large-image"
)

Styles

type Total

type Total struct {
	SubTotal            string  `json:"order_subtotal"`
	TaxRate             *string `json:"order_tax_rate,omitempty"`
	Tax                 *string `json:"order_tax,omitempty"`
	Discount            *string `json:"order_discount,omitempty"`
	Total               string  `json:"order_total"`
	OrderShippingOption *string `json:"order_shipping_option,omitempty"`
	OrderShipping       *string `json:"order_shipping,omitempty"`
}

Total ...

Jump to

Keyboard shortcuts

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