Documentation ¶
Index ¶
Constants ¶
View Source
const ( PGErrMsgNoRowsFound = "pg: no rows in result set" PGErrMsgNoMultiRowsFound = "pg: multiple rows in result set" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Member ¶
type Member struct { ID string `json:"id"` Email string `json:"email" binding:"required,email"` PasswordDigest string `json:"-"` Name string `json:"name" binding:"required"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt time.Time `pg:",soft_delete" json:"deletedAt"` }
type MemberDAO ¶
type MemberDAO interface { Create(member Member) (string, *util.BusinessError) Get(memberID string) (Member, *util.BusinessError) Update(member Member) *util.BusinessError Delete(memberID string) *util.BusinessError }
type PGMemberDAO ¶
type PGMemberDAO struct {
// contains filtered or unexported fields
}
func NewPGMemberDAO ¶
func NewPGMemberDAO(client *pg.DB) *PGMemberDAO
func (*PGMemberDAO) Create ¶
func (p *PGMemberDAO) Create(member Member) (string, *util.BusinessError)
func (*PGMemberDAO) Delete ¶
func (p *PGMemberDAO) Delete(memberID string) *util.BusinessError
func (*PGMemberDAO) Get ¶
func (p *PGMemberDAO) Get(memberID string) (Member, *util.BusinessError)
func (*PGMemberDAO) Update ¶
func (p *PGMemberDAO) Update(member Member) *util.BusinessError
Click to show internal directories.
Click to hide internal directories.