values

package
v0.0.0-...-9cb16bd Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserDBValue

type UserDBValue struct {
	ID string `bson:"_id"`

	// Account information
	Username string `bson:"username"`
	Password string `bson:"password"`
	Email    string `bson:"email"`

	// Timestamps
	CreatedAt time.Time  `bson:"created_at"`
	UpdatedAt *time.Time `bson:"updated_at"`
}

func NewUserDBValueFromUser

func NewUserDBValueFromUser(user *entity.User) *UserDBValue

NewUserDBValueFromUser converts a user entity to a user value

func (*UserDBValue) ToUserEntity

func (u *UserDBValue) ToUserEntity() *entity.User

ToUserEntity converts a user db value to a user entity

func (*UserDBValue) ToUserValue

func (u *UserDBValue) ToUserValue() *UserValue

ToUserValue converts a user db value to a user value

type UserValue

type UserValue struct {
	ID string `json:"id" bson:"_id"`

	// Account information
	Username string `json:"username" bson:"username"`
	Email    string `json:"email" bson:"email"`

	// Timestamps
	CreatedAt time.Time  `json:"created_at" bson:"created_at"`
	UpdatedAt *time.Time `json:"updated_at" bson:"updated_at"`
}

func NewUserValueFromUser

func NewUserValueFromUser(user *entity.User) *UserValue

NewUserValueFromUser converts a user entity to a user value

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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