Documentation ¶
Index ¶
- type Core
- type Factory
- type Note
- type NoteGroup
- type NoteStore
- func (x *NoteStore) Create(userID, message string) (string, error)
- func (x *NoteStore) DeleteOneByIDAndUser(ID string, userID string) (affected int, err error)
- func (x *NoteStore) FindAllByUser(dest *NoteGroup, userID string) (total int, err error)
- func (x *NoteStore) FindOneByIDAndUser(dest *Note, ID string, userID string) (exists bool, err error)
- func (x *NoteStore) New() Note
- func (x *NoteStore) NewGroup() NoteGroup
- func (x *NoteStore) Update(ID, userID, message string) (affected int, err error)
- type User
- type UserGroup
- type UserStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Note ¶
type Note struct { ID string `db:"id"` UserID string `db:"user_id"` Message string `db:"message"` CreatedAt *time.Time `db:"created_at"` UpdatedAt *time.Time `db:"updated_at"` DeletedAt *time.Time `db:"deleted_at"` }
Note is a note of a user.
func (*Note) PrimaryKey ¶
PrimaryKey returns the primary key field.
type NoteGroup ¶
type NoteGroup []Note
NoteGroup represents a group.
func (NoteGroup) PrimaryKey ¶
PrimaryKey returns the primary key field.
type NoteStore ¶
type NoteStore struct {
Core
}
NoteStore .
func (*NoteStore) DeleteOneByIDAndUser ¶
DeleteOneByIDAndUser removes one item from a user.
func (*NoteStore) FindAllByUser ¶
FindAllByUser returns items for a user.
func (*NoteStore) FindOneByIDAndUser ¶
func (x *NoteStore) FindOneByIDAndUser(dest *Note, ID string, userID string) (exists bool, err error)
FindOneByIDAndUser returns an item for a user.
type User ¶
type User struct { ID string `db:"id"` FirstName string `db:"first_name"` LastName string `db:"last_name"` Email string `db:"email"` Password string `db:"password"` StatusID uint8 `db:"status_id"` CreatedAt *time.Time `db:"created_at"` UpdatedAt *time.Time `db:"updated_at"` DeletedAt *time.Time `db:"deleted_at"` }
User is a user of the system.
func (*User) PrimaryKey ¶
PrimaryKey returns the primary key field.
type UserGroup ¶
type UserGroup []User
UserGroup represents a group.
func (UserGroup) PrimaryKey ¶
PrimaryKey returns the primary key field.
Click to show internal directories.
Click to hide internal directories.