entity

package
v0.0.0-...-2af345c Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2020 License: AGPL-3.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 User

type User struct {
	ID                *value.UserID   `json:"sub"`
	Username          *value.Username `json:"username"`
	PreferredUsername *string         `json:"preferred_username,omitempty"`
	Email             *value.Email    `json:"email"`
	Name              string          `json:"name,omitempty"`
	MiddleName        *string         `json:"middle_name,omitempty"`
	FamilyName        *string         `json:"family_name,omitempty"`
	Locale            string          `json:"locale,omitempty"`
	Picture           *string         `json:"picture,omitempty"`
	Status            string          `json:"status"`
	CreateTime        *time.Time      `json:"create_time,omitempty"`
	UpdateTime        *time.Time      `json:"update_time,omitempty"`
	Enabled           *value.State    `json:"enabled"`
}

func (User) IsValid

func (u User) IsValid() error

func (User) ToPrimitive

func (u User) ToPrimitive() *UserPrimitive

type UserPrimitive

type UserPrimitive struct {
	ID                string     `json:"sub"`
	Username          string     `json:"username"`
	PreferredUsername *string    `json:"preferred_username,omitempty"`
	Email             string     `json:"email"`
	Name              string     `json:"name,omitempty"`
	MiddleName        *string    `json:"middle_name,omitempty"`
	FamilyName        *string    `json:"family_name,omitempty"`
	Locale            string     `json:"locale,omitempty"`
	Picture           *string    `json:"picture,omitempty"`
	Status            string     `json:"status"`
	CreateTime        *time.Time `json:"create_time,omitempty"`
	UpdateTime        *time.Time `json:"update_time,omitempty"`
	Enabled           bool       `json:"enabled"`
}

func (UserPrimitive) ToEntity

func (u UserPrimitive) ToEntity() (*User, error)

Jump to

Keyboard shortcuts

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