Documentation ¶
Index ¶
- Variables
- type User
- func (u *User) Create(ctx *context.Context, client *datastore.Client) error
- func (u *User) CreateFromGoogleClaims(ctx *context.Context, client *datastore.Client, claims map[string]interface{}) error
- func (u *User) Delete(ctx *context.Context, client *datastore.Client) error
- func (u *User) Dto() *UserDto
- func (u *User) GetByGID(ctx *context.Context, gid string, client *datastore.Client) error
- func (u *User) GetById(ctx *context.Context, client *datastore.Client, id int64) error
- func (u *User) GetByIdWithTrash(ctx *context.Context, client *datastore.Client, id int64) error
- func (u *User) SoftDelete(ctx *context.Context, client *datastore.Client) error
- func (u *User) Update(ctx *context.Context, client *datastore.Client) error
- type UserDto
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDuplicateEmail = errors.New("email has been picked by another account")
View Source
var ErrDuplicateGoogleId = errors.New("google account has been registered by another account")
View Source
var ErrDuplicateUsername = errors.New("username has been picked by another account")
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { Id *datastore.Key `datastore:"__key__" json:"id"` Name string `json:"name"` Username string `json:"username"` Email string `json:"email"` GoogleId string `json:"-"` Picture string `json:"picture"` Blocked bool `json:"-" default:"false"` CreatedAt *time.Time `json:"created_at"` UpdatedAt *time.Time `json:"updated_at"` DeletedAt *time.Time `json:"-"` }
func (*User) CreateFromGoogleClaims ¶
func (*User) GetByIdWithTrash ¶
func (*User) SoftDelete ¶
Click to show internal directories.
Click to hide internal directories.