model

package
v0.0.0-...-4eea697 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWT

type JWT struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
}

type User

type User = users.IUsersUser

type UserAuthRequest

type UserAuthRequest struct {
	UserID   string `json:"userID"`
	Password string `json:"password"`
}

func (*UserAuthRequest) Validate

func (u *UserAuthRequest) Validate() (bool, error)

type UserCreateRequest

type UserCreateRequest struct {
	UserID      string `json:"userID"`
	Password    string `json:"password"`
	Role        uint8  `json:"role"`
	Name        string `json:"name,omitempty"`
	Address     string `json:"address,omitempty"`
	Description string `json:"description,omitempty"`
	PictuteURL  string `json:"pictureURL,omitempty"`
}

Fields Name, Address, Description are required for Doctor role

func (*UserCreateRequest) Validate

func (u *UserCreateRequest) Validate() (bool, error)

type UserGroup

type UserGroup struct {
	GroupID     *uuid.UUID `json:"groupID"`
	Name        string     `json:"name"`
	Description string     `json:"description"`
	Members     []string   `json:"members"`

	Key         [32]byte `json:"-" msgpack:"-"`
	KeyEncr     []byte   `json:"-" msgpack:"-"`
	IDEncr      []byte   `json:"-" msgpack:"-"`
	ContentEncr []byte   `json:"-" msgpack:"-"`
	MembersEncr [][]byte `json:"-" msgpack:"-"`
	Packed      []byte   `json:"-" msgpack:"-"`
}

type UserInfo

type UserInfo struct {
	Role        string     `json:"role"`
	UserID      string     `json:"userID,omitempty"`
	Name        string     `json:"name,omitempty"`
	Address     string     `json:"address,omitempty"`
	Description string     `json:"description,omitempty"`
	PictuteURL  string     `json:"pictureURL,omitempty"`
	Code        string     `json:"code,omitempty"`
	TimeCreated string     `json:"timeCreated"`
	EhrID       *uuid.UUID `json:"ehrID,omitempty"`

	Timestamp []byte `json:"-" msgpack:"timestamp"`
}

Jump to

Keyboard shortcuts

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