email_respository

package
v0.0.0-...-0eeeb36 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailRepository

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

func DefaultEmailRepository

func DefaultEmailRepository(dbx *sqlx.DB) *EmailRepository

func (*EmailRepository) Add

func (er *EmailRepository) Add(e *email_model.Email) error

func (*EmailRepository) Delete

func (er *EmailRepository) Delete(id int64) error

func (*EmailRepository) Get

func (er *EmailRepository) Get(id int64) (*email_model.Email, error)

func (*EmailRepository) GetByAddress

func (er *EmailRepository) GetByAddress(address string) (*email_model.Email, error)

func (*EmailRepository) GetByUserId

func (er *EmailRepository) GetByUserId(userId int64) ([]email_model.Email, error)

func (*EmailRepository) GetPrimaryByUserId

func (er *EmailRepository) GetPrimaryByUserId(userId int64) (*email_model.Email, error)

func (*EmailRepository) PromoteEmail

func (er *EmailRepository) PromoteEmail(emailId int64, userId int64) error

func (*EmailRepository) Update

func (er *EmailRepository) Update(email *email_model.Email) error

type IEmailRepository

type IEmailRepository interface {
	Add(*email_model.Email) error
	Get(int64) (*email_model.Email, error)
	GetByAddress(string) (*email_model.Email, error)
	GetByUserId(int64) ([]email_model.Email, error)
	GetPrimaryByUserId(int64) (*email_model.Email, error)
	PromoteEmail(emailId int64, userId int64) error
	Update(email *email_model.Email) error
	Delete(int64) error
}

Jump to

Keyboard shortcuts

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