Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrorParamsEmpty errors.CodeError = iota + errors.MinPkgMailer ErrorMailerConfigInvalid ErrorMailerHtml ErrorMailerText )
Variables ¶
This section is empty.
Functions ¶
func IsCodeError ¶
func IsCodeError() bool
Types ¶
type Config ¶ added in v1.8.1
type Config struct { Theme string `json:"theme,omitempty" yaml:"theme,omitempty" toml:"theme,omitempty" mapstructure:"theme,omitempty" validate:"required"` Direction string `` /* 135-byte string literal not displayed */ Name string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty" validate:"required"` Link string `json:"link,omitempty" yaml:"link,omitempty" toml:"link,omitempty" mapstructure:"link,omitempty" validate:"required,url"` Logo string `json:"logo,omitempty" yaml:"logo,omitempty" toml:"logo,omitempty" mapstructure:"logo,omitempty" validate:"required,url"` Copyright string `` /* 135-byte string literal not displayed */ TroubleText string `` /* 143-byte string literal not displayed */ DisableCSSInline bool `` /* 143-byte string literal not displayed */ Body libhms.Body `json:"body" yaml:"body" toml:"body" mapstructure:"body" validate:"required"` }
type Mailer ¶
type Mailer interface { Clone() Mailer SetTheme(t Themes) GetTheme() Themes SetTextDirection(d TextDirection) GetTextDirection() TextDirection SetBody(b *hermes.Body) GetBody() *hermes.Body SetCSSInline(disable bool) SetName(name string) GetName() string SetCopyright(copy string) GetCopyright() string SetLink(link string) GetLink() string SetLogo(logoUrl string) GetLogo() string SetTroubleText(text string) GetTroubleText() string ParseData(data map[string]string) GenerateHTML() (*bytes.Buffer, liberr.Error) GeneratePlainText() (*bytes.Buffer, liberr.Error) }
type TextDirection ¶
type TextDirection uint8
const ( LeftToRight TextDirection = iota RightToLeft )
func ParseTextDirection ¶
func ParseTextDirection(direction string) TextDirection
func (TextDirection) String ¶
func (d TextDirection) String() string
Click to show internal directories.
Click to hide internal directories.