messages

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: AGPL-3.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitEmailMessage added in v0.0.3

func InitEmailMessage(m EmailMessage, guid string, et string, template string) error

func InitInviteMessage added in v0.0.5

func InitInviteMessage(m InviteMessage, guid string, ot string, code string) error

func InitQueueAction added in v0.0.5

func InitQueueAction(a ActionMessage, guid string, t string) error

func InitQueueMessage added in v0.0.3

func InitQueueMessage(m QueueMessage, id string, t string) error

Types

type ActionMessage added in v0.0.5

type ActionMessage struct {
	QueueMessage
	// contains filtered or unexported fields
}

func NewQueueAction added in v0.0.4

func NewQueueAction(t string) (*ActionMessage, error)

func NewQueueActionWithGUID added in v0.0.4

func NewQueueActionWithGUID(guid string, t string) (*ActionMessage, error)

func (*ActionMessage) ClearParameter added in v0.0.5

func (m *ActionMessage) ClearParameter(path string) error

func (*ActionMessage) ClearProperty added in v0.0.5

func (m *ActionMessage) ClearProperty(path string) error

func (*ActionMessage) GetParameter added in v0.0.5

func (m *ActionMessage) GetParameter(path string) (interface{}, error)

func (*ActionMessage) GetParameters added in v0.0.5

func (m *ActionMessage) GetParameters() map[string]interface{}

func (*ActionMessage) GetProperties added in v0.0.5

func (m *ActionMessage) GetProperties() map[string]interface{}

func (*ActionMessage) GetProperty added in v0.0.5

func (m *ActionMessage) GetProperty(path string) (interface{}, error)

func (*ActionMessage) HasParameter added in v0.0.5

func (m *ActionMessage) HasParameter(path string) bool

func (*ActionMessage) HasProperty added in v0.0.5

func (m *ActionMessage) HasProperty(path string) bool

func (ActionMessage) MarshalJSON added in v0.0.5

func (m ActionMessage) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshal

func (*ActionMessage) SetParameter added in v0.0.5

func (m *ActionMessage) SetParameter(path string, v interface{}, force bool) error

func (*ActionMessage) SetParameters added in v0.0.5

func (m *ActionMessage) SetParameters(p map[string]interface{}) error

func (*ActionMessage) SetProperties added in v0.0.5

func (m *ActionMessage) SetProperties(p map[string]interface{}) error

func (*ActionMessage) SetProperty added in v0.0.5

func (m *ActionMessage) SetProperty(path string, v interface{}, force bool) error

func (*ActionMessage) SetVersion added in v0.0.5

func (m *ActionMessage) SetVersion(v int) error

func (*ActionMessage) UnmarshalJSON added in v0.0.5

func (m *ActionMessage) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshal

func (*ActionMessage) Version added in v0.0.5

func (m *ActionMessage) Version() int

type EmailMessage

type EmailMessage struct {
	ActionMessage // DERIVED FROM
}

func NewEmailMessage added in v0.0.3

func NewEmailMessage(st string, template string) (*EmailMessage, error)

func NewEmailMessageWithGUID added in v0.0.5

func NewEmailMessageWithGUID(guid string, st string, template string) (*EmailMessage, error)

func (*EmailMessage) BCC

func (m *EmailMessage) BCC() string

func (*EmailMessage) CC

func (m *EmailMessage) CC() string

func (*EmailMessage) ClearHeader added in v0.0.5

func (m *EmailMessage) ClearHeader(n string) error

func (*EmailMessage) ClearHeaders added in v0.0.5

func (m *EmailMessage) ClearHeaders() error

func (*EmailMessage) From

func (m *EmailMessage) From(d string) string

func (*EmailMessage) GetHeaders

func (m *EmailMessage) GetHeaders() map[string]interface{}

func (*EmailMessage) HasHeader

func (m *EmailMessage) HasHeader(n string) bool

func (*EmailMessage) Header

func (m *EmailMessage) Header(n string) string

func (*EmailMessage) IsValid

func (m *EmailMessage) IsValid() bool

func (*EmailMessage) Locale added in v0.0.2

func (m *EmailMessage) Locale() string

func (*EmailMessage) SetBCC

func (m *EmailMessage) SetBCC(bcc string) error

func (*EmailMessage) SetCC

func (m *EmailMessage) SetCC(cc string) error

func (*EmailMessage) SetFrom

func (m *EmailMessage) SetFrom(from string) error

func (*EmailMessage) SetHeader

func (m *EmailMessage) SetHeader(n string, v string) error

func (*EmailMessage) SetLocale added in v0.0.2

func (m *EmailMessage) SetLocale(l string) error

func (*EmailMessage) SetTemplate

func (m *EmailMessage) SetTemplate(t string) error

func (*EmailMessage) SetTo

func (m *EmailMessage) SetTo(to string) error

func (*EmailMessage) Template

func (m *EmailMessage) Template() string

func (*EmailMessage) To

func (m *EmailMessage) To() string

type IActionMessage added in v0.0.5

type IActionMessage interface {
	IMessage

	Version() int

	HasParameter(path string) bool
	GetParameter(path string) (interface{}, error)
	SetParameter(path string, v interface{}, force bool) error
	ClearParameter(path string) error

	GetParameters() map[string]interface{}
	SetParameters(p map[string]interface{}) error

	HasProperty(path string) bool
	GetProperty(path string) (interface{}, error)
	SetProperty(path string, v interface{}, force bool) error
	ClearProperty(path string) error

	GetProperties() map[string]interface{}
	SetProperties(p map[string]interface{}) error
}

type IEmailMessage added in v0.0.5

type IEmailMessage interface {
	IActionMessage

	Template() string
	SetTemplate(t string) error
	Locale() string
	SetLocale(l string) error

	To() string
	SetTo(to string) error
	From(d string) string
	SetFrom(from string) error
	CC() string
	SetCC(cc string) error
	BCC() string
	SetBCC(bcc string) error
	HasHeader(n string) bool
	Header(n string) string
	SetHeader(n string, v string) error
	ClearHeader(n string) error
	ClearHeaders() error
}

type IInviteEmailMessage added in v0.0.5

type IInviteEmailMessage interface {
	IEmailMessage

	Code() string
	SetCode(code string) error
	ByUser() string
	SetByUser(name string) error
	ByEmail() string
	SetByEmail(email string) error
	Message() string
	SetMessage(msg string) error
	ObjectName() string
	SetObjectName(name string) error
	Expiration() *time.Time
	SetExpiration(t time.Time) error
}

type IMessage added in v0.0.5

type IMessage interface {
	IsValid() bool
	ID() string
	Type() string
	Created() *time.Time

	Requeue() int
	RequeueCount() int
	ResetCount() int

	ErrorCode() int
	ErrorMessage() string
	ErrorTime() *time.Time
	IsError() bool
}

type InviteMessage added in v0.0.3

type InviteMessage struct {
	EmailMessage // DERIVED FROM
}

func NewInviteMessage added in v0.0.3

func NewInviteMessage(ot string, code string) (*InviteMessage, error)

func NewInviteMessageWithGUID added in v0.0.5

func NewInviteMessageWithGUID(guid string, ot string, code string) (*InviteMessage, error)

func (*InviteMessage) ByEmail added in v0.0.5

func (m *InviteMessage) ByEmail() string

func (*InviteMessage) ByUser added in v0.0.3

func (m *InviteMessage) ByUser() string

func (*InviteMessage) Code added in v0.0.3

func (m *InviteMessage) Code() string

func (*InviteMessage) Expiration added in v0.0.3

func (m *InviteMessage) Expiration() *time.Time

func (*InviteMessage) IsValid added in v0.0.3

func (m *InviteMessage) IsValid() bool

func (*InviteMessage) Message added in v0.0.3

func (m *InviteMessage) Message() string

func (*InviteMessage) ObjectName added in v0.0.3

func (m *InviteMessage) ObjectName() string

func (*InviteMessage) SetByEmail added in v0.0.5

func (m *InviteMessage) SetByEmail(email string) error

func (*InviteMessage) SetByUser added in v0.0.3

func (m *InviteMessage) SetByUser(name string) error

func (*InviteMessage) SetCode added in v0.0.3

func (m *InviteMessage) SetCode(code string) error

func (*InviteMessage) SetExpiration added in v0.0.3

func (m *InviteMessage) SetExpiration(t time.Time) error

func (*InviteMessage) SetMessage added in v0.0.3

func (m *InviteMessage) SetMessage(msg string) error

func (*InviteMessage) SetObjectName added in v0.0.3

func (m *InviteMessage) SetObjectName(name string) error

type QueueMessage

type QueueMessage struct {
	// contains filtered or unexported fields
}

func (*QueueMessage) Created

func (m *QueueMessage) Created() *time.Time

func (*QueueMessage) ErrorCode

func (m *QueueMessage) ErrorCode() int

func (*QueueMessage) ErrorMessage

func (m *QueueMessage) ErrorMessage() string

func (*QueueMessage) ErrorTime

func (m *QueueMessage) ErrorTime() *time.Time

func (*QueueMessage) ID

func (m *QueueMessage) ID() string

func (*QueueMessage) IsError

func (m *QueueMessage) IsError() bool

func (*QueueMessage) IsValid

func (m *QueueMessage) IsValid() bool

func (*QueueMessage) Requeue

func (m *QueueMessage) Requeue() int

func (*QueueMessage) RequeueCount

func (m *QueueMessage) RequeueCount() int

func (*QueueMessage) ResetCount

func (m *QueueMessage) ResetCount() int

func (*QueueMessage) SetError

func (m *QueueMessage) SetError(c int, msg string) error

func (*QueueMessage) SetID

func (m *QueueMessage) SetID(id string) error

func (*QueueMessage) SetType added in v0.0.2

func (m *QueueMessage) SetType(t string) error

func (*QueueMessage) Type added in v0.0.2

func (m *QueueMessage) Type() string

Jump to

Keyboard shortcuts

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