subscriber

package
v1.42.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

Query returns a datastore query for subscribers.

Types

type Subscriber

type Subscriber struct {
	mixin.Model[Subscriber]

	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`

	Email  string `json:"email"`
	FormId string `json:"formId"`
	UserId string `json:"userId,omitempty"`

	Unsubscribed    bool      `json:"unsubscribed"`
	UnsubscribeDate time.Time `json:"unsubscribeDate,omitempty"`

	Client client.Client `json:"client"`

	Tags []string `json:"tags" orm:"default:[]"`

	Metadata  Map    `json:"metadata" datastore:"-" orm:"default:{}"`
	Metadata_ string `json:"-" datastore:",noindex"`
}

func Fake

func Fake(db *datastore.Datastore, userId string) *Subscriber

func FromJSON

func FromJSON(db *datastore.Datastore, data []byte) *Subscriber

func New

func New(db *datastore.Datastore) *Subscriber

New creates a new Subscriber wired to the given datastore.

func (*Subscriber) BeforeCreate

func (s *Subscriber) BeforeCreate() error

Hooks

func (*Subscriber) BeforeUpdate

func (s *Subscriber) BeforeUpdate(previous *Subscriber) error

func (*Subscriber) Load

func (s *Subscriber) Load(ps []datastore.Property) (err error)

func (Subscriber) Md5

func (s Subscriber) Md5() string

func (Subscriber) MergeFields

func (s Subscriber) MergeFields() map[string]interface{}

func (Subscriber) Name

func (s Subscriber) Name() string

func (*Subscriber) Normalize

func (s *Subscriber) Normalize()

func (*Subscriber) Save

func (s *Subscriber) Save() (ps []datastore.Property, err error)

Jump to

Keyboard shortcuts

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