models

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig added in v0.0.26

type AppConfig struct {
	WebHostPort     string `json:"web_host_port" env:"WEB_HOST_PORT"`
	ApiHttpHostPort string `json:"api_http_host_port" env:"API_HTTP_HOST_PORT"`
	ApiGrpcHostPort string `json:"api_grpc_host_port" env:"API_GRPC_HOST_PORT"`
	ApiWsHostPort   string `json:"api_ws_host_port" env:"API_WS_HOST_PORT"`
	WebSwagger      bool   `json:"web_swagger" env:"WEB_SWAGGER"`
	Debug           bool   `json:"debug" env:"DEBUG"`
}

type Image

type Image struct {
	Id        int64     `json:"id"`
	Thumb     string    `json:"thumb"`
	Url       string    `json:"url"`
	Image     string    `json:"image"`
	MimeType  string    `json:"mime_type"`
	Title     string    `json:"title"`
	Size      int64     `json:"size"`
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type Login added in v0.0.26

type Login struct {
	Email      string `json:"email"`
	Password   string `json:"password"`
	RememberMe bool   `json:"rememberMe"`
}

type Role

type Role struct {
	Name        string              `json:"name"`
	Description string              `json:"description"`
	Parent      *Role               `json:"parent"`
	Children    []*Role             `json:"children"`
	AccessList  map[string][]string `json:"access_list"`
	CreatedAt   time.Time           `json:"created_at"`
	UpdatedAt   time.Time           `json:"updated_at"`
}

type User

type User struct {
	Id              int64          `json:"id"`
	Nickname        string         `json:"nickname"`
	FirstName       string         `json:"first_name"`
	LastName        string         `json:"last_name"`
	Email           string         `json:"email"`
	History         []*UserHistory `json:"history"`
	Status          string         `json:"status"`
	Image           *Image         `json:"image"`
	SignInCount     int64          `json:"sign_in_count"`
	CurrentSignInIp string         `json:"current_sign_in_ip"`
	LastSignInIp    string         `json:"last_sign_in_ip"`
	CreatedBy       *User          `json:"created_by"`
	Role            *Role          `json:"role"`
	Meta            []*UserMeta    `json:"meta"`
	Lang            string         `json:"lang"`
	CurrentSignInAt *time.Time     `json:"current_sign_in_at"`
	LastSignInAt    *time.Time     `json:"last_sign_in_at"`
	CreatedAt       time.Time      `json:"created_at"`
	UpdatedAt       time.Time      `json:"updated_at"`
}

type UserHistory added in v0.0.6

type UserHistory struct {
	Ip   string    `json:"ip"`
	Time time.Time `json:"time"`
}

type UserMeta

type UserMeta struct {
	Id    int64  `orm:"pk;auto" json:"id"`
	User  *User  `orm:"rel(fk)" json:"-"`
	Key   string `orm:"size(255)" valid:"MaxSize(255)" json:"key"`
	Value string `orm:"size(255)" valid:"MaxSize(255)" json:"value"`
}

type Version added in v0.0.22

type Version struct {
	Version     string `json:"version"`
	Revision    string `json:"revision"`
	RevisionURL string `json:"revision_url"`
	Generated   string `json:"generated"`
	Developers  string `json:"developers"`
	BuildNum    string `json:"build_num"`
	DockerImage string `json:"docker_image"`
}

func GetServerVersion added in v0.0.22

func GetServerVersion() (ver Version)

Jump to

Keyboard shortcuts

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