models

package
Version: v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: GPL-3.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 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 Log added in v0.0.23

type Log struct {
	Id        int64           `json:"id"`
	Body      string          `json:"body"`
	Level     common.LogLevel `json:"level"`
	CreatedAt time.Time       `json:"created_at"`
}

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
t or T : Toggle theme light dark auto
y or Y : Canonical URL