Documentation ¶
Index ¶
Constants ¶
View Source
const (
SubjectCreated = "User.Created"
)
Variables ¶
View Source
var ( NotFound = rescode.New(2000, http.StatusNotFound, codes.NotFound, "user_not_found") Disabled = rescode.New(2001, http.StatusForbidden, codes.Unavailable, "user_disabled") VerifyRequired = rescode.New(2002, http.StatusForbidden, codes.Unavailable, "user_verify_required") EmailAlreadyExists = rescode.New(2003, http.StatusConflict, codes.AlreadyExists, "email_already_exists") )
Functions ¶
This section is empty.
Types ¶
type EventCreated ¶
type FindByEmailOpts ¶
type FindByEmailOpts struct {
Email string `example:"john@doe.com"`
}
type FindByIdOpts ¶
type FindByTokenOpts ¶
type FindByTokenOpts struct {
Token string
}
type IsExistsByEmailOpts ¶
type IsExistsByEmailOpts struct {
Email string `example:"john@doe.com"`
}
type Repo ¶
type Repo interface { FindByEmail(ctx context.Context, t trace.Tracer, opts FindByEmailOpts) (*User, error) FindById(ctx context.Context, t trace.Tracer, opts FindByIdOpts) (*User, error) FindByToken(ctx context.Context, t trace.Tracer, opts FindByTokenOpts) (*User, error) IsExistsByEmail(ctx context.Context, t trace.Tracer, opts IsExistsByEmailOpts) (bool, error) Save(ctx context.Context, t trace.Tracer, opts SaveOpts) error }
type User ¶
type User struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Email string `json:"email"` IsActive bool `json:"is_active"` TempToken *string `json:"temp_token"` VerifiedAt *time.Time `json:"verified_at"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt time.Time `json:"deleted_at"` }
Click to show internal directories.
Click to hide internal directories.