Documentation
¶
Index ¶
- Constants
- Variables
- func BuildToken(header map[string]interface{}, claims map[string]interface{}) string
- func RegisterFastTokenSigningMethod()
- type ClientsRepo
- func (fake *ClientsRepo) Create(conn models.ConnectionInterface, client models.Client) (models.Client, error)
- func (fake *ClientsRepo) Find(conn models.ConnectionInterface, id string) (models.Client, error)
- func (fake *ClientsRepo) Update(conn models.ConnectionInterface, client models.Client) (models.Client, error)
- func (fake *ClientsRepo) Upsert(conn models.ConnectionInterface, client models.Client) (models.Client, error)
- type Cloak
- type CloudController
- func (fake *CloudController) GetUsersByOrgGuid(guid, token string) ([]cf.CloudControllerUser, error)
- func (fake *CloudController) GetUsersBySpaceGuid(guid, token string) ([]cf.CloudControllerUser, error)
- func (fake *CloudController) LoadOrganization(guid, token string) (cf.CloudControllerOrganization, error)
- func (fake *CloudController) LoadSpace(guid, token string) (cf.CloudControllerSpace, error)
- type Courier
- type DBConn
- func (conn *DBConn) Begin() error
- func (conn *DBConn) Commit() error
- func (conn DBConn) Delete(list ...interface{}) (int64, error)
- func (conn *DBConn) Exec(query string, args ...interface{}) (sql.Result, error)
- func (conn DBConn) Insert(list ...interface{}) error
- func (conn *DBConn) Rollback() error
- func (conn DBConn) Select(i interface{}, query string, args ...interface{}) ([]interface{}, error)
- func (conn DBConn) SelectOne(i interface{}, query string, args ...interface{}) error
- func (conn *DBConn) Transaction() models.TransactionInterface
- func (conn DBConn) Update(list ...interface{}) (int64, error)
- type DBResult
- type Database
- type ErrorWriter
- type FakeNotify
- type FakePreferenceUpdater
- type FakePreferencesFinder
- type FakePreferencesRepo
- type FakeQueue
- type FakeRegistrar
- type FakeTemplateDeleter
- type FakeTemplateFinder
- type FakeTemplateUpdater
- type FakeTemplatesRepo
- func (fake *FakeTemplatesRepo) Destroy(conn models.ConnectionInterface, templateName string) error
- func (fake FakeTemplatesRepo) Find(conn models.ConnectionInterface, templateName string) (models.Template, error)
- func (fake FakeTemplatesRepo) Upsert(conn models.ConnectionInterface, template models.Template) (models.Template, error)
- type FakeUAAClient
- type FileSystem
- type Finder
- type GlobalUnsubscribesRepo
- type KindsRepo
- func (fake *KindsRepo) Create(conn models.ConnectionInterface, kind models.Kind) (models.Kind, error)
- func (fake *KindsRepo) Find(conn models.ConnectionInterface, id, clientID string) (models.Kind, error)
- func (fake *KindsRepo) Trim(conn models.ConnectionInterface, clientID string, kindIDs []string) (int, error)
- func (fake *KindsRepo) Update(conn models.ConnectionInterface, kind models.Kind) (models.Kind, error)
- func (fake *KindsRepo) Upsert(conn models.ConnectionInterface, kind models.Kind) (models.Kind, error)
- type MailClient
- type MailRecipe
- type Mailer
- type ReceiptsRepo
- type SigningMethodFast
- type SpaceAndOrgLoader
- type TemplatesLoader
- type TokenLoader
- type UnsubscribesRepo
- func (fake *UnsubscribesRepo) Create(conn models.ConnectionInterface, unsubscribe models.Unsubscribe) (models.Unsubscribe, error)
- func (fake *UnsubscribesRepo) Destroy(conn models.ConnectionInterface, unsubscribe models.Unsubscribe) (int, error)
- func (fake *UnsubscribesRepo) Find(conn models.ConnectionInterface, clientID string, kindID string, userID string) (models.Unsubscribe, error)
- func (fake *UnsubscribesRepo) Upsert(conn models.ConnectionInterface, unsubscribe models.Unsubscribe) (models.Unsubscribe, error)
- type UserLoader
Constants ¶
View Source
const ( UAAPrivateKey = "PRIVATE-KEY" UAAPublicKey = "PUBLIC-KEY" )
Variables ¶
View Source
var GUIDGenerator = postal.GUIDGenerationFunc(func() (*uuid.UUID, error) { guid := uuid.UUID([16]byte{0xDE, 0xAD, 0xBE, 0xEF, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55}) return &guid, nil })
Functions ¶
func BuildToken ¶
func RegisterFastTokenSigningMethod ¶
func RegisterFastTokenSigningMethod()
Types ¶
type ClientsRepo ¶
func NewClientsRepo ¶
func NewClientsRepo() *ClientsRepo
func (*ClientsRepo) Create ¶
func (fake *ClientsRepo) Create(conn models.ConnectionInterface, client models.Client) (models.Client, error)
func (*ClientsRepo) Find ¶
func (fake *ClientsRepo) Find(conn models.ConnectionInterface, id string) (models.Client, error)
func (*ClientsRepo) Update ¶
func (fake *ClientsRepo) Update(conn models.ConnectionInterface, client models.Client) (models.Client, error)
func (*ClientsRepo) Upsert ¶
func (fake *ClientsRepo) Upsert(conn models.ConnectionInterface, client models.Client) (models.Client, error)
type CloudController ¶
type CloudController struct {
CurrentToken string
GetUsersBySpaceGuidError error
GetUsersByOrganizationGuidError error
LoadSpaceError error
LoadOrganizationError error
UsersBySpaceGuid map[string][]cf.CloudControllerUser
UsersByOrganizationGuid map[string][]cf.CloudControllerUser
Spaces map[string]cf.CloudControllerSpace
Orgs map[string]cf.CloudControllerOrganization
}
func NewCloudController ¶
func NewCloudController() *CloudController
func (*CloudController) GetUsersByOrgGuid ¶
func (fake *CloudController) GetUsersByOrgGuid(guid, token string) ([]cf.CloudControllerUser, error)
func (*CloudController) GetUsersBySpaceGuid ¶
func (fake *CloudController) GetUsersBySpaceGuid(guid, token string) ([]cf.CloudControllerUser, error)
func (*CloudController) LoadOrganization ¶
func (fake *CloudController) LoadOrganization(guid, token string) (cf.CloudControllerOrganization, error)
func (*CloudController) LoadSpace ¶
func (fake *CloudController) LoadSpace(guid, token string) (cf.CloudControllerSpace, error)
type Courier ¶
type Courier struct {
Error error
Responses []postal.Response
DispatchArguments []interface{}
TheMailer *Mailer
}
func NewCourier ¶
func NewCourier() *Courier
func (*Courier) Mailer ¶
func (fake *Courier) Mailer() postal.MailerInterface
type DBConn ¶
func (*DBConn) Transaction ¶
func (conn *DBConn) Transaction() models.TransactionInterface
type DBResult ¶
type DBResult struct{}
func (DBResult) LastInsertId ¶
func (DBResult) RowsAffected ¶
type Database ¶
type Database struct {
Conn *DBConn
}
func NewDatabase ¶
func NewDatabase() *Database
func (Database) Connection ¶
func (fake Database) Connection() models.ConnectionInterface
type ErrorWriter ¶
type ErrorWriter struct {
Error error
}
func NewErrorWriter ¶
func NewErrorWriter() *ErrorWriter
func (*ErrorWriter) Write ¶
func (writer *ErrorWriter) Write(w http.ResponseWriter, err error)
type FakeNotify ¶
func (*FakeNotify) Execute ¶
func (fake *FakeNotify) Execute(connection models.ConnectionInterface, req *http.Request, context stack.Context, guid postal.TypedGUID, recipe postal.RecipeInterface) ([]byte, error)
type FakePreferenceUpdater ¶
type FakePreferenceUpdater struct {
ExecuteArguments []interface{}
ExecuteError error
}
func NewFakePreferenceUpdater ¶
func NewFakePreferenceUpdater() *FakePreferenceUpdater
func (*FakePreferenceUpdater) Execute ¶
func (fake *FakePreferenceUpdater) Execute(conn models.ConnectionInterface, preferences []models.Preference, globalUnsubscribe bool, userID string) error
type FakePreferencesFinder ¶
type FakePreferencesFinder struct {
ReturnValue services.PreferencesBuilder
FindError error
UserGUID string
}
func NewFakePreferencesFinder ¶
func NewFakePreferencesFinder(returnValue services.PreferencesBuilder) *FakePreferencesFinder
func (*FakePreferencesFinder) Find ¶
func (fake *FakePreferencesFinder) Find(userGUID string) (services.PreferencesBuilder, error)
type FakePreferencesRepo ¶
type FakePreferencesRepo struct {
NonCriticalPreferences []models.Preference
FindError error
}
func NewFakePreferencesRepo ¶
func NewFakePreferencesRepo(nonCriticalPreferences []models.Preference) *FakePreferencesRepo
func (FakePreferencesRepo) FindNonCriticalPreferences ¶
func (fake FakePreferencesRepo) FindNonCriticalPreferences(conn models.ConnectionInterface, userGUID string) ([]models.Preference, error)
type FakeQueue ¶
type FakeQueue struct {
EnqueueError error
// contains filtered or unexported fields
}
func NewFakeQueue ¶
func NewFakeQueue() *FakeQueue
type FakeRegistrar ¶
type FakeRegistrar struct {
RegisterArguments []interface{}
RegisterError error
PruneArguments []interface{}
PruneError error
}
func NewFakeRegistrar ¶
func NewFakeRegistrar() *FakeRegistrar
func (*FakeRegistrar) Prune ¶
func (fake *FakeRegistrar) Prune(conn models.ConnectionInterface, client models.Client, kinds []models.Kind) error
func (*FakeRegistrar) Register ¶
func (fake *FakeRegistrar) Register(conn models.ConnectionInterface, client models.Client, kinds []models.Kind) error
type FakeTemplateDeleter ¶
func NewFakeTemplateDeleter ¶
func NewFakeTemplateDeleter() *FakeTemplateDeleter
func (*FakeTemplateDeleter) Delete ¶
func (fake *FakeTemplateDeleter) Delete(templateName string) error
type FakeTemplateFinder ¶
type FakeTemplateFinder struct {
TemplateName string
FindError error
Templates map[string]models.Template
}
func NewFakeTemplateFinder ¶
func NewFakeTemplateFinder() *FakeTemplateFinder
type FakeTemplateUpdater ¶
func NewFakeTemplateUpdater ¶
func NewFakeTemplateUpdater() *FakeTemplateUpdater
type FakeTemplatesRepo ¶
type FakeTemplatesRepo struct {
Templates map[string]models.Template
FindError error
UpsertError error
DestroyArgument string
DestroyError error
}
func NewFakeTemplatesRepo ¶
func NewFakeTemplatesRepo() *FakeTemplatesRepo
func (*FakeTemplatesRepo) Destroy ¶
func (fake *FakeTemplatesRepo) Destroy(conn models.ConnectionInterface, templateName string) error
func (FakeTemplatesRepo) Find ¶
func (fake FakeTemplatesRepo) Find(conn models.ConnectionInterface, templateName string) (models.Template, error)
func (FakeTemplatesRepo) Upsert ¶
func (fake FakeTemplatesRepo) Upsert(conn models.ConnectionInterface, template models.Template) (models.Template, error)
type FakeUAAClient ¶
type FakeUAAClient struct {
ClientToken uaa.Token
ClientTokenError error
UsersByID map[string]uaa.User
ErrorForUserByID error
AccessToken string
}
func (FakeUAAClient) GetClientToken ¶
func (fake FakeUAAClient) GetClientToken() (uaa.Token, error)
func (*FakeUAAClient) SetToken ¶
func (fake *FakeUAAClient) SetToken(token string)
func (FakeUAAClient) UsersEmailsByIDs ¶
func (fake FakeUAAClient) UsersEmailsByIDs(ids ...string) ([]uaa.User, error)
type FileSystem ¶
func NewFileSystem ¶
func NewFileSystem(rootPath string) FileSystem
func (FileSystem) Exists ¶
func (fs FileSystem) Exists(path string) bool
type Finder ¶
type GlobalUnsubscribesRepo ¶
type GlobalUnsubscribesRepo struct {
// contains filtered or unexported fields
}
func NewGlobalUnsubscribesRepo ¶
func NewGlobalUnsubscribesRepo() *GlobalUnsubscribesRepo
func (*GlobalUnsubscribesRepo) Get ¶
func (fake *GlobalUnsubscribesRepo) Get(conn models.ConnectionInterface, userID string) (bool, error)
func (*GlobalUnsubscribesRepo) Set ¶
func (fake *GlobalUnsubscribesRepo) Set(conn models.ConnectionInterface, userID string, globalUnsubscribe bool) error
type KindsRepo ¶
type KindsRepo struct {
Kinds map[string]models.Kind
UpsertError error
TrimError error
FindError error
TrimArguments []interface{}
}
func NewKindsRepo ¶
func NewKindsRepo() *KindsRepo
type MailClient ¶
func NewMailClient ¶
func NewMailClient() MailClient
func (*MailClient) Connect ¶
func (fake *MailClient) Connect() error
type MailRecipe ¶
type MailRecipe struct {
DispatchArguments []interface{}
Responses []postal.Response
Error error
TrimCalled bool
}
func NewMailRecipe ¶
func NewMailRecipe() *MailRecipe
func (*MailRecipe) Trim ¶
func (fake *MailRecipe) Trim(response []byte) []byte
type ReceiptsRepo ¶
type ReceiptsRepo struct {
CreateUserGUIDs []string
ClientID string
KindID string
CreateReceiptsError bool
}
func NewReceiptsRepo ¶
func NewReceiptsRepo() *ReceiptsRepo
func (*ReceiptsRepo) CreateReceipts ¶
func (fake *ReceiptsRepo) CreateReceipts(conn models.ConnectionInterface, userGUIDs []string, clientID, kindID string) error
type SigningMethodFast ¶
type SigningMethodFast struct{}
func (SigningMethodFast) Alg ¶
func (m SigningMethodFast) Alg() string
type SpaceAndOrgLoader ¶
type SpaceAndOrgLoader struct {
LoadError error
Space cf.CloudControllerSpace
Organization cf.CloudControllerOrganization
}
func NewSpaceAndOrgLoader ¶
func NewSpaceAndOrgLoader() *SpaceAndOrgLoader
func (*SpaceAndOrgLoader) Load ¶
func (fake *SpaceAndOrgLoader) Load(postal.TypedGUID, string) (cf.CloudControllerSpace, cf.CloudControllerOrganization, error)
type TemplatesLoader ¶
func (*TemplatesLoader) LoadTemplates ¶
func (fake *TemplatesLoader) LoadTemplates(subjectSuffix, contentSuffix, clientID, kindID string) (postal.Templates, error)
type TokenLoader ¶
func NewTokenLoader ¶
func NewTokenLoader() *TokenLoader
func (*TokenLoader) Load ¶
func (fake *TokenLoader) Load() (string, error)
type UnsubscribesRepo ¶
type UnsubscribesRepo struct {
Unsubscribes map[string]models.Unsubscribe
}
func NewUnsubscribesRepo ¶
func NewUnsubscribesRepo() *UnsubscribesRepo
func (*UnsubscribesRepo) Create ¶
func (fake *UnsubscribesRepo) Create(conn models.ConnectionInterface, unsubscribe models.Unsubscribe) (models.Unsubscribe, error)
func (*UnsubscribesRepo) Destroy ¶
func (fake *UnsubscribesRepo) Destroy(conn models.ConnectionInterface, unsubscribe models.Unsubscribe) (int, error)
func (*UnsubscribesRepo) Find ¶
func (fake *UnsubscribesRepo) Find(conn models.ConnectionInterface, clientID string, kindID string, userID string) (models.Unsubscribe, error)
func (*UnsubscribesRepo) Upsert ¶
func (fake *UnsubscribesRepo) Upsert(conn models.ConnectionInterface, unsubscribe models.Unsubscribe) (models.Unsubscribe, error)
type UserLoader ¶
func NewUserLoader ¶
func NewUserLoader() *UserLoader
Source Files
¶
- clients_repo.go
- cloak.go
- cloud_controller.go
- connection.go
- courier.go
- database.go
- error_writer.go
- file_system.go
- finder.go
- global_unsubscribes_repo.go
- guid_generator.go
- kinds_repo.go
- mail_client.go
- mail_recipe.go
- mailer.go
- notify.go
- preference_updater.go
- preferences_finder.go
- preferences_repo.go
- queue.go
- receipts_repo.go
- registrar.go
- space_and_org_loader.go
- template_deleter.go
- template_finder.go
- template_updater.go
- templates_loader.go
- templates_repo.go
- token_loader.go
- tokens.go
- uaa_client.go
- unsubscribes_repo.go
- user_loader.go
Click to show internal directories.
Click to hide internal directories.