ent

package
v0.0.0-...-ae06870 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Identification

type Identification struct {
	Id     uint64 `json:"id,omitempty"`
	UserId uint64 `json:"user_id,omitempty"`

	DNI      field.DNI `json:"dni,omitempty"`
	Verified bool      `json:"verified,omitempty"`

	Name    field.Name    `json:"name,omitempty"`
	Surname field.Surname `json:"surname,omitempty"`

	License uint64 `json:"license,omitempty"`
	Tome    uint64 `json:"tome,omitempty"`
	Folio   uint64 `json:"folio,omitempty"`

	CUE uint64 `json:"cue,omitempty"`
}

func (*Identification) GetId

func (o *Identification) GetId() uint64

func (*Identification) SQLMap

func (o *Identification) SQLMap() map[string]driver.Value

func (*Identification) SQLTable

func (o *Identification) SQLTable() string

func (*Identification) SetId

func (o *Identification) SetId(id uint64)

func (*Identification) String

func (i *Identification) String() string

func (*Identification) ToPb

type Onboarding

type Onboarding struct {
	Id         uint64        `json:"id,omitempty"`
	Email      field.Email   `json:"email,omitempty"`
	Role       field.Role    `json:"role,omitempty"`
	Stage      field.Stage   `json:"stage"`
	Name       field.Name    `json:"name,omitempty"`
	Surname    field.Surname `json:"surname,omitempty"`
	CategoryId uint64        `json:"category_id,omitempty"`
	AddressId  uint64        `json:"address_id,omitempty"`
}

func (*Onboarding) Category

func (*Onboarding) Close

func (o *Onboarding) Close(ctx context.Context, db *sqlx.DB, pwd string) (*User, *Identification, error)

func (*Onboarding) GetId

func (o *Onboarding) GetId() uint64

func (*Onboarding) Identification

func (o *Onboarding) Identification(ctx context.Context, db *sqlx.DB) (*OnboardingIdentification, error)

func (*Onboarding) MustStage

func (o *Onboarding) MustStage(s field.Stage) error

func (*Onboarding) SQLMap

func (o *Onboarding) SQLMap() map[string]driver.Value

func (*Onboarding) SQLTable

func (o *Onboarding) SQLTable() string

func (*Onboarding) SetCategory

func (o *Onboarding) SetCategory(categoryName string) (err error)

func (*Onboarding) SetId

func (o *Onboarding) SetId(id uint64)

func (*Onboarding) String

func (o *Onboarding) String() string

func (*Onboarding) ToPb

func (o *Onboarding) ToPb() *pbusers.Onboarding

func (*Onboarding) ToUser

func (o *Onboarding) ToUser() *User

func (*Onboarding) ValidateByStage

func (o *Onboarding) ValidateByStage(ctx context.Context, db *sqlx.DB) (code codes.Code, err error)

func (*Onboarding) ValidateShared

func (o *Onboarding) ValidateShared(ctx context.Context, db *sqlx.DB) (code codes.Code, err error)

type OnboardingIdentification

type OnboardingIdentification struct {
	Id           uint64 `json:"id,omitempty"`
	OnboardingId uint64 `json:"onboarding_id,omitempty"`

	DNI field.DNI `json:"dni,omitempty"`

	Name    field.Name    `json:"name,omitempty"`
	Surname field.Surname `json:"surname,omitempty"`

	License uint64 `json:"license,omitempty"`
	Tome    uint64 `json:"tome,omitempty"`
	Folio   uint64 `json:"folio,omitempty"`

	CUE uint64 `json:"cue,omitempty"`
}

func (*OnboardingIdentification) Close

func (oi *OnboardingIdentification) Close(ctx context.Context, db *sqlx.DB, userId uint64) (*Identification, error)

func (*OnboardingIdentification) GetId

func (o *OnboardingIdentification) GetId() uint64

func (*OnboardingIdentification) SQLMap

func (o *OnboardingIdentification) SQLMap() map[string]driver.Value

func (*OnboardingIdentification) SQLTable

func (o *OnboardingIdentification) SQLTable() string

func (*OnboardingIdentification) SetId

func (o *OnboardingIdentification) SetId(id uint64)

func (*OnboardingIdentification) String

func (oi *OnboardingIdentification) String() string

func (*OnboardingIdentification) ToIdentification

func (o *OnboardingIdentification) ToIdentification() *Identification

func (*OnboardingIdentification) ToPb

type User

type User struct {
	Id uint64 `json:"id,omitempty"`

	Email        field.Email `json:"email,omitempty"`
	PasswordHash string      `json:"password_hash,omitempty"`

	CategoryId uint64        `json:"category_id,omitempty"`
	Name       field.Name    `json:"name,omitempty"`
	Surname    field.Surname `json:"surname,omitempty"`

	Role field.Role `json:"role,omitempty"`

	AddressId uint64 `json:"address_id,omitempty"`
}

func FindUser

func FindUser(ctx context.Context, db *sqlx.DB, uid uint64) (*User, error)

func (*User) AssignPassword

func (u *User) AssignPassword(pwd string) error

func (*User) Category

func (*User) GetId

func (u *User) GetId() uint64

func (*User) Identification

func (u *User) Identification(ctx context.Context, db *sqlx.DB) (*Identification, error)

func (*User) Image

func (u *User) Image(ctx context.Context, img pbimages.ImagesClient) (*pbimages.Image, error)

func (*User) SQLMap

func (u *User) SQLMap() map[string]driver.Value

func (*User) SQLTable

func (u *User) SQLTable() string

func (*User) SetId

func (u *User) SetId(id uint64)

func (*User) String

func (u *User) String() string

func (*User) ToPb

func (u *User) ToPb() *pbusers.User

func (*User) Validate

func (u *User) Validate() *xerrors.Errors

type Validable

type Validable interface {
	Validate() error
	Name() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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