user

package
v0.0.0-...-5fdd26c Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MissingPersonalDataErr = errors.New("missing personal data")
	MissingContactDataErr  = errors.New("missing contact data")
)

Functions

func Assert

func Assert(t *testing.T, expected *User, actual *User)

Types

type Repository

type Repository interface {
	GetByID(ctx context.Context, id uuid.UUID) (*User, error)
	GetByLogin(ctx context.Context, login string) (*User, error)
	Add(ctx context.Context, user *User) error
	Delete(ctx context.Context, id uuid.UUID) error
	Exists(ctx context.Context, login string) (bool, error)
}

type Social

type Social struct {
	UserID       uuid.UUID       `json:"user_id"`
	Social       string          `json:"social"`
	SocialId     string          `json:"social_id"`
	AccessToken  string          `json:"access_token"`
	RefreshToken string          `json:"refresh_token"`
	UserData     json.RawMessage `json:"user_data"`
	CreatedAt    time.Time       `json:"created_at"`
	UpdatedAt    time.Time       `json:"updated_at"`
	DestroyedAt  time.Time       `json:"destroyed_at"`
}

type User

type User struct {
	ID             uuid.UUID
	Login          string
	Password       *string
	Person         domain.Person
	ContactDetails domain.ContactDetails
}

func NewUser

func NewUser(firstName string, sureName string, login string, password string, contactDetails domain.ContactDetails) (*User, error)

Jump to

Keyboard shortcuts

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