Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- type ClientsRepo
- func (repo ClientsRepo) Create(conn ConnectionInterface, client Client) (Client, error)
- func (repo ClientsRepo) Find(conn ConnectionInterface, id string) (Client, error)
- func (repo ClientsRepo) Update(conn ConnectionInterface, client Client) (Client, error)
- func (repo ClientsRepo) Upsert(conn ConnectionInterface, client Client) (Client, error)
- type ClientsRepoInterface
- type Connection
- type ConnectionInterface
- type DB
- type DatabaseInterface
- type ErrDuplicateRecord
- type ErrRecordNotFound
- type GlobalUnsubscribe
- type GlobalUnsubscribesRepo
- type GlobalUnsubscribesRepoInterface
- type IDSet
- type Kind
- type KindsRepo
- func (repo KindsRepo) Create(conn ConnectionInterface, kind Kind) (Kind, error)
- func (repo KindsRepo) Find(conn ConnectionInterface, id, clientID string) (Kind, error)
- func (repo KindsRepo) Trim(conn ConnectionInterface, clientID string, kindIDs []string) (int, error)
- func (repo KindsRepo) Update(conn ConnectionInterface, kind Kind) (Kind, error)
- func (repo KindsRepo) Upsert(conn ConnectionInterface, kind Kind) (Kind, error)
- type KindsRepoInterface
- type Preference
- type PreferencesRepo
- type PreferencesRepoInterface
- type Receipt
- type ReceiptsRepo
- func (repo ReceiptsRepo) Create(conn ConnectionInterface, receipt Receipt) (Receipt, error)
- func (repo ReceiptsRepo) CreateReceipts(conn ConnectionInterface, userGUIDs []string, clientID, kindID string) error
- func (repo ReceiptsRepo) Find(conn ConnectionInterface, userGUID, clientID, kindID string) (Receipt, error)
- func (repo ReceiptsRepo) Update(conn ConnectionInterface, receipt Receipt) (Receipt, error)
- type ReceiptsRepoInterface
- type Template
- type TemplatesRepo
- func (repo TemplatesRepo) Create(conn ConnectionInterface, template Template) (Template, error)
- func (repo TemplatesRepo) Destroy(conn ConnectionInterface, templateName string) error
- func (repo TemplatesRepo) Find(conn ConnectionInterface, templateName string) (Template, error)
- func (repo TemplatesRepo) Upsert(conn ConnectionInterface, template Template) (Template, error)
- type TemplatesRepoInterface
- type Transaction
- func (transaction *Transaction) Begin() error
- func (transaction *Transaction) Commit() error
- func (transaction *Transaction) Delete(v ...interface{}) (int64, error)
- func (transaction *Transaction) Exec(query string, v ...interface{}) (sql.Result, error)
- func (transaction *Transaction) Insert(v ...interface{}) error
- func (transaction *Transaction) Rollback() error
- func (transaction *Transaction) Select(holder interface{}, query string, args ...interface{}) ([]interface{}, error)
- func (transaction *Transaction) SelectOne(holder interface{}, query string, args ...interface{}) error
- func (transaction *Transaction) Transaction() TransactionInterface
- func (transaction *Transaction) Update(v ...interface{}) (int64, error)
- type TransactionInterface
- type Unsubscribe
- type Unsubscribes
- type UnsubscribesRepo
- func (repo UnsubscribesRepo) Create(conn ConnectionInterface, unsubscribe Unsubscribe) (Unsubscribe, error)
- func (repo UnsubscribesRepo) Destroy(conn ConnectionInterface, unsubscribe Unsubscribe) (int, error)
- func (repo UnsubscribesRepo) Find(conn ConnectionInterface, clientID string, kindID string, userID string) (Unsubscribe, error)
- func (repo UnsubscribesRepo) FindAllByUserID(conn ConnectionInterface, userID string) ([]Unsubscribe, error)
- func (repo UnsubscribesRepo) Upsert(conn ConnectionInterface, unsubscribe Unsubscribe) (Unsubscribe, error)
- type UnsubscribesRepoInterface
Constants ¶
View Source
const ( UserBodyTemplateName = "user_body" SpaceBodyTemplateName = "space_body" EmailBodyTemplateName = "email_body" OrganizationBodyTemplateName = "organization_body" SubjectMissingTemplateName = "subject.missing" SubjectProvidedTemplateName = "subject.provided" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ClientsRepo ¶
type ClientsRepo struct{}
func NewClientsRepo ¶
func NewClientsRepo() ClientsRepo
func (ClientsRepo) Create ¶
func (repo ClientsRepo) Create(conn ConnectionInterface, client Client) (Client, error)
func (ClientsRepo) Find ¶
func (repo ClientsRepo) Find(conn ConnectionInterface, id string) (Client, error)
func (ClientsRepo) Update ¶
func (repo ClientsRepo) Update(conn ConnectionInterface, client Client) (Client, error)
func (ClientsRepo) Upsert ¶
func (repo ClientsRepo) Upsert(conn ConnectionInterface, client Client) (Client, error)
type ClientsRepoInterface ¶
type ClientsRepoInterface interface {
Create(ConnectionInterface, Client) (Client, error)
Find(ConnectionInterface, string) (Client, error)
Update(ConnectionInterface, Client) (Client, error)
Upsert(ConnectionInterface, Client) (Client, error)
}
type Connection ¶
func (*Connection) Transaction ¶
func (conn *Connection) Transaction() TransactionInterface
type ConnectionInterface ¶
type ConnectionInterface interface {
Delete(...interface{}) (int64, error)
Insert(...interface{}) error
Select(interface{}, string, ...interface{}) ([]interface{}, error)
SelectOne(interface{}, string, ...interface{}) error
Update(...interface{}) (int64, error)
Exec(string, ...interface{}) (sql.Result, error)
Transaction() TransactionInterface
}
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func (*DB) Connection ¶
func (database *DB) Connection() ConnectionInterface
type DatabaseInterface ¶
type DatabaseInterface interface {
Connection() ConnectionInterface
TraceOn(string, gorp.GorpLogger)
}
type ErrDuplicateRecord ¶
type ErrDuplicateRecord struct{}
func (ErrDuplicateRecord) Error ¶
func (err ErrDuplicateRecord) Error() string
type ErrRecordNotFound ¶
type ErrRecordNotFound struct{}
func (ErrRecordNotFound) Error ¶
func (err ErrRecordNotFound) Error() string
type GlobalUnsubscribe ¶
type GlobalUnsubscribesRepo ¶
type GlobalUnsubscribesRepo struct{}
func NewGlobalUnsubscribesRepo ¶
func NewGlobalUnsubscribesRepo() GlobalUnsubscribesRepo
func (GlobalUnsubscribesRepo) Get ¶
func (repo GlobalUnsubscribesRepo) Get(conn ConnectionInterface, userGUID string) (bool, error)
func (GlobalUnsubscribesRepo) Set ¶
func (repo GlobalUnsubscribesRepo) Set(conn ConnectionInterface, userGUID string, unsubscribe bool) error
type GlobalUnsubscribesRepoInterface ¶
type GlobalUnsubscribesRepoInterface interface {
Set(ConnectionInterface, string, bool) error
Get(ConnectionInterface, string) (bool, error)
}
type KindsRepo ¶
type KindsRepo struct{}
func NewKindsRepo ¶
func NewKindsRepo() KindsRepo
func (KindsRepo) Create ¶
func (repo KindsRepo) Create(conn ConnectionInterface, kind Kind) (Kind, error)
func (KindsRepo) Find ¶
func (repo KindsRepo) Find(conn ConnectionInterface, id, clientID string) (Kind, error)
type KindsRepoInterface ¶
type KindsRepoInterface interface {
Create(ConnectionInterface, Kind) (Kind, error)
Find(ConnectionInterface, string, string) (Kind, error)
Update(ConnectionInterface, Kind) (Kind, error)
Upsert(ConnectionInterface, Kind) (Kind, error)
Trim(ConnectionInterface, string, []string) (int, error)
}
type Preference ¶
type PreferencesRepo ¶
type PreferencesRepo struct {
// contains filtered or unexported fields
}
func NewPreferencesRepo ¶
func NewPreferencesRepo() PreferencesRepo
func (PreferencesRepo) FindNonCriticalPreferences ¶
func (repo PreferencesRepo) FindNonCriticalPreferences(conn ConnectionInterface, userGUID string) ([]Preference, error)
type PreferencesRepoInterface ¶
type PreferencesRepoInterface interface {
FindNonCriticalPreferences(ConnectionInterface, string) ([]Preference, error)
}
type ReceiptsRepo ¶
type ReceiptsRepo struct{}
func NewReceiptsRepo ¶
func NewReceiptsRepo() ReceiptsRepo
func (ReceiptsRepo) Create ¶
func (repo ReceiptsRepo) Create(conn ConnectionInterface, receipt Receipt) (Receipt, error)
func (ReceiptsRepo) CreateReceipts ¶
func (repo ReceiptsRepo) CreateReceipts(conn ConnectionInterface, userGUIDs []string, clientID, kindID string) error
func (ReceiptsRepo) Find ¶
func (repo ReceiptsRepo) Find(conn ConnectionInterface, userGUID, clientID, kindID string) (Receipt, error)
func (ReceiptsRepo) Update ¶
func (repo ReceiptsRepo) Update(conn ConnectionInterface, receipt Receipt) (Receipt, error)
type ReceiptsRepoInterface ¶
type ReceiptsRepoInterface interface {
CreateReceipts(ConnectionInterface, []string, string, string) error
}
type TemplatesRepo ¶
type TemplatesRepo struct{}
func NewTemplatesRepo ¶
func NewTemplatesRepo() TemplatesRepo
func (TemplatesRepo) Create ¶
func (repo TemplatesRepo) Create(conn ConnectionInterface, template Template) (Template, error)
func (TemplatesRepo) Destroy ¶
func (repo TemplatesRepo) Destroy(conn ConnectionInterface, templateName string) error
func (TemplatesRepo) Find ¶
func (repo TemplatesRepo) Find(conn ConnectionInterface, templateName string) (Template, error)
func (TemplatesRepo) Upsert ¶
func (repo TemplatesRepo) Upsert(conn ConnectionInterface, template Template) (Template, error)
type TemplatesRepoInterface ¶
type TemplatesRepoInterface interface {
Find(ConnectionInterface, string) (Template, error)
Upsert(ConnectionInterface, Template) (Template, error)
Destroy(ConnectionInterface, string) error
}
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) Begin ¶
func (transaction *Transaction) Begin() error
func (*Transaction) Commit ¶
func (transaction *Transaction) Commit() error
func (*Transaction) Delete ¶
func (transaction *Transaction) Delete(v ...interface{}) (int64, error)
func (*Transaction) Exec ¶
func (transaction *Transaction) Exec(query string, v ...interface{}) (sql.Result, error)
func (*Transaction) Insert ¶
func (transaction *Transaction) Insert(v ...interface{}) error
func (*Transaction) Rollback ¶
func (transaction *Transaction) Rollback() error
func (*Transaction) Select ¶
func (transaction *Transaction) Select(holder interface{}, query string, args ...interface{}) ([]interface{}, error)
func (*Transaction) SelectOne ¶
func (transaction *Transaction) SelectOne(holder interface{}, query string, args ...interface{}) error
func (*Transaction) Transaction ¶
func (transaction *Transaction) Transaction() TransactionInterface
func (*Transaction) Update ¶
func (transaction *Transaction) Update(v ...interface{}) (int64, error)
type TransactionInterface ¶
type TransactionInterface interface {
ConnectionInterface
Begin() error
Commit() error
Rollback() error
}
func NewTransaction ¶
func NewTransaction(conn *Connection) TransactionInterface
type Unsubscribe ¶
type Unsubscribes ¶
type Unsubscribes []Unsubscribe
func (Unsubscribes) Contains ¶
func (unsubscribes Unsubscribes) Contains(clientID, kindID string) bool
type UnsubscribesRepo ¶
type UnsubscribesRepo struct{}
func NewUnsubscribesRepo ¶
func NewUnsubscribesRepo() UnsubscribesRepo
func (UnsubscribesRepo) Create ¶
func (repo UnsubscribesRepo) Create(conn ConnectionInterface, unsubscribe Unsubscribe) (Unsubscribe, error)
func (UnsubscribesRepo) Destroy ¶
func (repo UnsubscribesRepo) Destroy(conn ConnectionInterface, unsubscribe Unsubscribe) (int, error)
func (UnsubscribesRepo) Find ¶
func (repo UnsubscribesRepo) Find(conn ConnectionInterface, clientID string, kindID string, userID string) (Unsubscribe, error)
func (UnsubscribesRepo) FindAllByUserID ¶
func (repo UnsubscribesRepo) FindAllByUserID(conn ConnectionInterface, userID string) ([]Unsubscribe, error)
func (UnsubscribesRepo) Upsert ¶
func (repo UnsubscribesRepo) Upsert(conn ConnectionInterface, unsubscribe Unsubscribe) (Unsubscribe, error)
type UnsubscribesRepoInterface ¶
type UnsubscribesRepoInterface interface {
Create(ConnectionInterface, Unsubscribe) (Unsubscribe, error)
Upsert(ConnectionInterface, Unsubscribe) (Unsubscribe, error)
Find(ConnectionInterface, string, string, string) (Unsubscribe, error)
Destroy(ConnectionInterface, Unsubscribe) (int, error)
}
Click to show internal directories.
Click to hide internal directories.