iris_common_model

package module
v0.0.0-...-7f7e1ea Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

README

iris-common-model

  • iris app 通用数据model

  • 依赖pg

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Schema  iris.Map
	Citus   iris.Map
	Builtin iris.Map
	Indexes map[string][]string
)

Functions

func AccessKey

func AccessKey() string

func Base64Decode

func Base64Decode(str string) string

func Base64Encode

func Base64Encode(str string) string

func CheckId

func CheckId(s string) bool

func ExtractToken

func ExtractToken(req *http.Request, config *toml.Tree) string

func GetBool

func GetBool(tree *toml.Tree, key string, values ...bool) bool

func GetClaims

func GetClaims(str string) jwt.MapClaims

func GetDuration

func GetDuration(tree *toml.Tree, key string, values ...time.Duration) time.Duration

func GetFloat64

func GetFloat64(tree *toml.Tree, key string, values ...float64) float64

func GetInt

func GetInt(tree *toml.Tree, key string, values ...int) int

func GetInt64

func GetInt64(tree *toml.Tree, key string, values ...int64) int64

func GetJSON

func GetJSON(value interface{}) []byte

func GetString

func GetString(tree *toml.Tree, key string, values ...string) string

func GetStringArray

func GetStringArray(tree *toml.Tree, key string, values ...[]string) []string

func GetTree

func GetTree(tree *toml.Tree, key string) *toml.Tree

func GetUint64

func GetUint64(tree *toml.Tree, key string, values ...uint64) uint64

func HS256

func HS256(str string, key string) string

func HS384

func HS384(str string, key string) string

func HS512

func HS512(str string, key string) string

func Hash

func Hash(str string, config *toml.Tree, flag bool) string

func HexDecode

func HexDecode(str string) string

func HexEncode

func HexEncode(str string) string

func Id

func Id() string

func Key

func Key(phrase string) string

func MD5

func MD5(str string) string

func ParseString

func ParseString(value interface{}, values ...string) string

func ParseToken

func ParseToken(str string, key string) (jwt.MapClaims, bool)

func Sha256

func Sha256(str string) string

func Sha384

func Sha384(str string) string

func Sha512

func Sha512(str string) string

func Sign256

func Sign256(claims jwt.Claims, secret string) string

func Sign384

func Sign384(claims jwt.Claims, secret string) string

func Sign512

func Sign512(claims jwt.MapClaims, secret string) string

func SignClaims

func SignClaims(claims jwt.MapClaims, config *toml.Tree, key ...string) string

func StringifyTime

func StringifyTime(t time.Time) string

func Token

func Token(header string, signature string) string

Types

type Application

type Application struct {
	Id           string    `pg:"id,pk,type:uuid" json:"id"`
	Name         string    `pg:"name,notnull" json:"name"`
	Description  string    `pg:"description" json:"description"`
	Token        string    `pg:"token,notnull" json:"token"`
	Content      iris.Map  `pg:"content,type:jsonb" json:"content"`
	Tags         []string  `pg:"tags,type:uuid[]" json:"tags"`
	ManagerId    string    `pg:"manager_id,notnull,type:uuid" json:"manager_id"`
	Visibility   string    `pg:"visibility,default:'internal'" json:"visibility"`
	Status       string    `pg:"status,default:'active'" json:"status"`
	Metrics      iris.Map  `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo    iris.Map  `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt    time.Time `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt    time.Time `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId string    `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version      uint64    `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*Application) BasicInfo

func (a *Application) BasicInfo() iris.Map

func (*Application) Init

func (a *Application) Init() *Application

type Collection

type Collection struct {
	Id           string    `pg:"id,pk,type:uuid" json:"id"`
	Name         string    `pg:"name,notnull" json:"name"`
	Type         string    `pg:"type,notnull" json:"type"`
	Description  string    `pg:"description" json:"description"`
	RepositoryId string    `pg:"repository_id,notnull,type:uuid" json:"repository_id"`
	Content      iris.Map  `pg:"content,type:jsonb" json:"content"`
	Tags         []string  `pg:"tags,type:uuid[]" json:"tags"`
	CustomerId   string    `pg:"customer_id,type:uuid" json:"customer_id"`
	ManagerId    string    `pg:"manager_id,notnull,type:uuid" json:"manager_id"`
	Visibility   string    `pg:"visibility,default:'internal'" json:"visibility"`
	Status       string    `pg:"status,default:'active'" json:"status"`
	Metrics      iris.Map  `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo    iris.Map  `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt    time.Time `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt    time.Time `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId string    `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version      uint64    `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*Collection) BasicInfo

func (c *Collection) BasicInfo() iris.Map

func (*Collection) Init

func (c *Collection) Init() *Collection

type Component

type Component struct {
	Id           string    `pg:"id,pk,type:uuid" json:"id"`
	Name         string    `pg:"name,notnull" json:"name"`
	Description  string    `pg:"description" json:"description"`
	ParentId     string    `pg:"parent_id,type:uuid" json:"parent_id"`
	Tenants      []string  `pg:"tenants,type:uuid[]" json:"tenants"`
	Content      iris.Map  `pg:"content,type:jsonb" json:"content"`
	ManagerId    string    `pg:"manager_id,notnull,type:uuid" json:"manager_id"`
	Visibility   string    `pg:"visibility,default:'internal'" json:"visibility"`
	Status       string    `pg:"status,default:'active'" json:"status"`
	Metrics      iris.Map  `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo    iris.Map  `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt    time.Time `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt    time.Time `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId string    `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version      uint64    `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*Component) BasicInfo

func (c *Component) BasicInfo() iris.Map

func (*Component) Init

func (c *Component) Init() *Component

type Dataset

type Dataset struct {
	Id            string    `pg:"id,pk,type:uuid" json:"id"`
	Name          string    `pg:"name,notnull" json:"name"`
	Type          string    `pg:"type,notnull" json:"type"`
	Description   string    `pg:"description" json:"description"`
	Content       iris.Map  `pg:"content,type:jsonb" json:"content"`
	Tags          []string  `pg:"tags,type:uuid[]" json:"tags"`
	ApplicationId string    `pg:"application_id,notnull,type:uuid" json:"application_id"`
	ValidFrom     time.Time `pg:"valid_from,default:now()" json:"valid_from"`
	ExpiresAt     time.Time `pg:"expires_at,default:now()" json:"expires_at"`
	Message       string    `pg:"message" json:"message"`
	ManagerId     string    `pg:"manager_id,notnull,type:uuid" json:"manager_id"`
	Visibility    string    `pg:"visibility,default:'internal'" json:"visibility"`
	Status        string    `pg:"status,default:'active'" json:"status"`
	Metrics       iris.Map  `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo     iris.Map  `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt     time.Time `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt     time.Time `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId  string    `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version       uint64    `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*Dataset) BasicInfo

func (d *Dataset) BasicInfo() iris.Map

func (*Dataset) Init

func (d *Dataset) Init() *Dataset

type DatasetCache

type DatasetCache struct {
	Dataset   Dataset
	CreatedAt time.Time
	Count     uint64
}

type Field

type Field struct {
	Id           string    `pg:"id,pk,type:uuid" json:"id"`
	Name         string    `pg:"name,notnull" json:"name"`
	Type         string    `pg:"type,notnull" json:"type"`
	Description  string    `pg:"description" json:"description"`
	CollectionId string    `pg:"collection_id,notnull,type:uuid" json:"collection_id"`
	ReferenceId  string    `pg:"reference_id,type:uuid" json:"reference_id"`
	Equivalents  []string  `pg:"equivalents,type:uuid[]" json:"equivalents"`
	Content      iris.Map  `pg:"content,type:jsonb" json:"content"`
	Tags         []string  `pg:"tags,type:uuid[]" json:"tags"`
	ManagerId    string    `pg:"manager_id,notnull,type:uuid" json:"manager_id"`
	Visibility   string    `pg:"visibility,default:'internal'" json:"visibility"`
	Status       string    `pg:"status,default:'active'" json:"status"`
	Metrics      iris.Map  `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo    iris.Map  `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt    time.Time `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt    time.Time `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId string    `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version      uint64    `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*Field) BasicInfo

func (f *Field) BasicInfo() iris.Map

func (*Field) Init

func (f *Field) Init() *Field

type Form

type Form struct {
	Id           string     `pg:"id,pk,type:uuid" json:"id"`
	Name         string     `pg:"name,notnull" json:"name"`
	Description  string     `pg:"description" json:"description"`
	Rules        []iris.Map `pg:"rules,type:jsonb" json:"rules"`
	DatasetId    string     `pg:"dataset_id,notnull,type:uuid" json:"dataset_id"`
	CustomerId   string     `pg:"customer_id,type:uuid" json:"customer_id"`
	ValidFrom    time.Time  `pg:"valid_from,default:now()" json:"valid_from"`
	ExpiresAt    time.Time  `pg:"expires_at,default:now()" json:"expires_at"`
	Content      iris.Map   `pg:"content,type:jsonb" json:"content"`
	ManagerId    string     `pg:"manager_id,notnull,type:uuid" json:"manager_id"`
	Visibility   string     `pg:"visibility,default:'internal'" json:"visibility"`
	Status       string     `pg:"status,default:'active'" json:"status"`
	Metrics      iris.Map   `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo    iris.Map   `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt    time.Time  `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt    time.Time  `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId string     `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version      uint64     `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*Form) BasicInfo

func (f *Form) BasicInfo() iris.Map

func (*Form) Init

func (f *Form) Init() *Form

type Group

type Group struct {
	Id           string    `pg:"id,pk,type:uuid" json:"id"`
	Name         string    `pg:"name,notnull" json:"name"`
	Members      []string  `pg:"members,type:uuid[]" json:"members"`
	Description  string    `pg:"description" json:"description"`
	AccessKey    string    `pg:"access_key,notnull" json:"access_key"`
	ManagerId    string    `pg:"manager_id,notnull,type:uuid" json:"manager_id"`
	Visibility   string    `pg:"visibility,default:'internal'" json:"visibility"`
	Status       string    `pg:"status,default:'active'" json:"status"`
	Metrics      iris.Map  `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo    iris.Map  `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt    time.Time `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt    time.Time `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId string    `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version      uint64    `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*Group) BasicInfo

func (g *Group) BasicInfo() iris.Map

func (*Group) GetMap

func (g *Group) GetMap() iris.Map

func (*Group) Init

func (g *Group) Init() *Group

type Log

type Log struct {
	Id           string    `pg:"id,pk,type:uuid" json:"id"`
	Service      string    `pg:"service,notnull" json:"service"`
	ServerHost   string    `pg:"server_host,notnull" json:"server_host"`
	ClientIP     net.IP    `pg:"client_ip,notnull" json:"client_ip"`
	RecordedAt   time.Time `pg:"recorded_at,notnull" json:"recorded_at"`
	Level        string    `pg:"level" json:"level"`
	Topic        string    `pg:"topic" json:"topic"`
	Message      string    `pg:"message,notnull" json:"message"`
	Content      iris.Map  `pg:"content,type:jsonb" json:"content"`
	Source       string    `pg:"source" json:"source"`
	Visibility   string    `pg:"visibility,default:'internal'" json:"visibility"`
	Status       string    `pg:"status,default:'active'" json:"status"`
	Metrics      iris.Map  `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo    iris.Map  `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt    time.Time `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt    time.Time `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId string    `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version      uint64    `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*Log) BasicInfo

func (l *Log) BasicInfo() iris.Map

func (*Log) Init

func (l *Log) Init() *Log

func (*Log) Normalize

func (l *Log) Normalize() *Log

type Order

type Order struct {
	Id            string    `pg:"id,pk,type:uuid" json:"id"`
	Name          string    `pg:"name,notnull" json:"name"`
	Description   string    `pg:"description" json:"description"`
	ApplicationId string    `pg:"application_id,notnull,type:uuid" json:"application_id"`
	DatasetId     string    `pg:"dataset_id,notnull,type:uuid" json:"dataset_id"`
	Content       iris.Map  `pg:"content,type:jsonb" json:"content"`
	Message       string    `pg:"message" json:"message"`
	ManagerId     string    `pg:"manager_id,notnull,type:uuid" json:"manager_id"`
	Visibility    string    `pg:"visibility,default:'internal'" json:"visibility"`
	Status        string    `pg:"status,default:'active'" json:"status"`
	Metrics       iris.Map  `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo     iris.Map  `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt     time.Time `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt     time.Time `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId  string    `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version       uint64    `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*Order) BasicInfo

func (o *Order) BasicInfo() iris.Map

func (*Order) Init

func (o *Order) Init() *Order

type Policy

type Policy struct {
	Id           string    `pg:"id,pk,type:uuid" json:"id"`
	Name         string    `pg:"name,notnull" json:"name"`
	TenantId     string    `pg:"tenant_id,notnull,type:uuid" json:"tenant_id"`
	Subjects     []string  `pg:"subjects,array" json:"subjects"`
	Resources    []string  `pg:"resources,array" json:"resources"`
	Description  string    `pg:"description" json:"description"`
	Actions      []string  `pg:"actions,array" json:"actions"`
	Effect       string    `pg:"effect,default:'allow'" json:"effect"`
	Conditions   iris.Map  `pg:"conditions,type:jsonb" json:"conditions"`
	ValidFrom    time.Time `pg:"valid_from,default:now()" json:"valid_from"`
	ExpiresAt    time.Time `pg:"expires_at,default:now()" json:"expires_at"`
	ManagerId    string    `pg:"manager_id,notnull,type:uuid" json:"manager_id"`
	Visibility   string    `pg:"visibility,default:'internal'" json:"visibility"`
	Status       string    `pg:"status,default:'active'" json:"status"`
	Metrics      iris.Map  `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo    iris.Map  `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt    time.Time `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt    time.Time `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId string    `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version      uint64    `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*Policy) BasicInfo

func (p *Policy) BasicInfo() iris.Map

func (*Policy) GetMap

func (p *Policy) GetMap() iris.Map

func (*Policy) Init

func (p *Policy) Init() *Policy

type Project

type Project struct {
	Id           string    `pg:"id,pk,type:uuid" json:"id"`
	Name         string    `pg:"name,notnull" json:"name"`
	Description  string    `pg:"description" json:"description"`
	ParentId     string    `pg:"parent_id,type:uuid" json:"parent_id"`
	Tenants      []string  `pg:"tenants,type:uuid[]" json:"tenants"`
	Content      iris.Map  `pg:"content,type:jsonb" json:"content"`
	ManagerId    string    `pg:"manager_id,notnull,type:uuid" json:"manager_id"`
	Visibility   string    `pg:"visibility,default:'internal'" json:"visibility"`
	Status       string    `pg:"status,default:'active'" json:"status"`
	Metrics      iris.Map  `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo    iris.Map  `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt    time.Time `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt    time.Time `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId string    `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version      uint64    `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*Project) BasicInfo

func (p *Project) BasicInfo() iris.Map

func (*Project) Init

func (p *Project) Init() *Project

type Record

type Record struct {
	Id           string    `pg:"id,pk,type:uuid" json:"id"`
	Collection   string    `pg:"collection,notnull" json:"collection"`
	Content      iris.Map  `pg:"content,notnull,type:jsonb" json:"content"`
	RecordedAt   time.Time `pg:"recorded_at,notnull" json:"recorded_at"`
	Integrity    string    `pg:"integrity,notnull" json:"integrity"`
	Signature    string    `pg:"signature,notnull" json:"signature"`
	Visibility   string    `pg:"visibility,default:'internal'" json:"visibility"`
	Status       string    `pg:"status,default:'active'" json:"status"`
	Metrics      iris.Map  `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo    iris.Map  `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt    time.Time `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt    time.Time `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId string    `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version      uint64    `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*Record) BasicInfo

func (r *Record) BasicInfo() iris.Map

func (*Record) Init

func (r *Record) Init() *Record

type Repository

type Repository struct {
	Id           string    `pg:"id,pk,type:uuid" json:"id"`
	Name         string    `pg:"name,notnull" json:"name"`
	Type         string    `pg:"type,notnull" json:"type"`
	Description  string    `pg:"description" json:"description"`
	Content      iris.Map  `pg:"content,type:jsonb" json:"content"`
	Tags         []string  `pg:"tags,type:uuid[]" json:"tags"`
	ProviderId   string    `pg:"provider_id,notnull,type:uuid" json:"provider_id"`
	Tenants      []string  `pg:"tenants,type:uuid[]" json:"tenants"`
	ManagerId    string    `pg:"manager_id,notnull,type:uuid" json:"manager_id"`
	Visibility   string    `pg:"visibility,default:'internal'" json:"visibility"`
	Status       string    `pg:"status,default:'active'" json:"status"`
	Metrics      iris.Map  `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo    iris.Map  `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt    time.Time `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt    time.Time `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId string    `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version      uint64    `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*Repository) BasicInfo

func (r *Repository) BasicInfo() iris.Map

func (*Repository) Init

func (r *Repository) Init() *Repository

type Resource

type Resource struct {
	Id           string    `pg:"id, pk, type:uuid" json:"id"`
	Name         string    `pg:"name, notnull"json:"name"`
	Type         string    `pg:"type,notnull" json:"type"`
	Category     string    `pg:"category,notnull" json:"category"`
	Mime         string    `pg:"mime,notnull" json:"mime"`
	Path         string    `pg:"path,notnull" json:"path"`
	Description  string    `pg:"description" json:"description"`
	Content      iris.Map  `pg:"content,type:jsonb" json:"content"`
	Tenants      []string  `pg:"tenants,type:uuid[]" json:"tenants"`
	ProviderId   string    `pg:"provider_id,notnull,type:uuid" json:"provider_id"`
	ManagerId    string    `pg:"manager_id,notnull" json:"manager_id"`
	Visibility   string    `pg:"visibility,default:'internal'" json:"visibility"`
	Status       string    `pg:"status,default:'active'" json:"status"`
	Metrics      iris.Map  `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo    iris.Map  `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt    time.Time `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt    time.Time `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId string    `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version      uint64    `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*Resource) BasicInfo

func (r *Resource) BasicInfo() iris.Map

func (*Resource) Init

func (r *Resource) Init() *Resource

type Screen

type Screen struct {
	Id           string    `pg:"id,pk,type:uuid" json:"id"`
	Name         string    `pg:"name,notnull" json:"name"`
	Description  string    `pg:"description" json:"description"`
	CustomerId   string    `pg:"customer_id,type:uuid" json:"customer_id"`
	ValidFrom    time.Time `pg:"valid_from,default:now()" json:"valid_from"`
	ExpiresAt    time.Time `pg:"expires_at,default:now()" json:"expires_at"`
	Content      iris.Map  `pg:"content,type:jsonb" json:"content"`
	ManagerId    string    `pg:"manager_id,notnull,type:uuid" json:"manager_id"`
	Visibility   string    `pg:"visibility,default:'internal'" json:"visibility"`
	Status       string    `pg:"status,default:'active'" json:"status"`
	Metrics      iris.Map  `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo    iris.Map  `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt    time.Time `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt    time.Time `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId string    `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version      uint64    `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*Screen) BasicInfo

func (s *Screen) BasicInfo() iris.Map

func (*Screen) Init

func (s *Screen) Init() *Screen

type Tag

type Tag struct {
	Id           string    `pg:"id,pk,type:uuid" json:"id"`
	Name         string    `pg:"name,notnull" json:"name"`
	Category     string    `pg:"category,notnull" json:"category"`
	Description  string    `pg:"description" json:"description"`
	Content      iris.Map  `pg:"content,type:jsonb" json:"content"`
	ParentId     string    `pg:"parent_id,type:uuid" json:"parent_id"`
	ManagerId    string    `pg:"manager_id,notnull,type:uuid" json:"manager_id"`
	Visibility   string    `pg:"visibility,default:'internal'" json:"visibility"`
	Status       string    `pg:"status,default:'active'" json:"status"`
	Metrics      iris.Map  `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo    iris.Map  `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt    time.Time `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt    time.Time `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId string    `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version      uint64    `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*Tag) BasicInfo

func (t *Tag) BasicInfo() iris.Map

func (*Tag) Init

func (t *Tag) Init() *Tag

type Task

type Task struct {
	Id           string    `pg:"id,pk,type:uuid" json:"id"`
	Name         string    `pg:"name,notnull" json:"name"`
	Type         string    `pg:"type,notnull" json:"type"`
	Description  string    `pg:"description" json:"description"`
	Content      iris.Map  `pg:"content,type:jsonb" json:"content"`
	InputId      string    `pg:"input_id,type:uuid" json:"input_id"`
	OutputId     string    `pg:"output_id,type:uuid" json:"output_id"`
	Dependencies []string  `pg:"dependencies,type:uuid[]" json:"dependencies"`
	CustomerId   string    `pg:"customer_id,type:uuid" json:"customer_id"`
	ValidFrom    time.Time `pg:"valid_from,default:now()" json:"valid_from"`
	ExpiresAt    time.Time `pg:"expires_at,default:now()" json:"expires_at"`
	Priority     uint64    `pg:"priority,default:0" json:"priority"`
	Schedule     string    `pg:"schedule" json:"schedule"`
	LastTime     time.Time `pg:"last_time,default:'epoch'" json:"last_time"`
	NextTime     time.Time `pg:"next_time,default:'epoch'" json:"next_time"`
	ManagerId    string    `pg:"manager_id,notnull,type:uuid" json:"manager_id"`
	Visibility   string    `pg:"visibility,default:'internal'" json:"visibility"`
	Status       string    `pg:"status,default:'active'" json:"status"`
	Metrics      iris.Map  `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo    iris.Map  `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt    time.Time `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt    time.Time `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId string    `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version      uint64    `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*Task) BasicInfo

func (t *Task) BasicInfo() iris.Map

func (*Task) Init

func (t *Task) Init() *Task

type User

type User struct {
	Id           string    `pg:"id,pk,type:uuid" json:"id"`
	Name         string    `pg:"name,notnull" json:"name"`
	Account      string    `pg:"account,notnull" json:"account"`
	Password     string    `pg:"password,notnull" json:"password"`
	Mobile       string    `pg:"mobile" json:"mobile"`
	Email        string    `pg:"email" json:"email"`
	Avatar       string    `pg:"avatar" json:"avatar"`
	Description  string    `pg:"description" json:"description"`
	LoggedIP     net.IP    `pg:"logged_ip" json:"logged_ip"`
	LoggedIn     time.Time `pg:"logged_in,default:now()" json:"logged_in"`
	LoggedOut    time.Time `pg:"logged_out,default:now()" json:"logged_out"`
	Role         string    `pg:"role,default:'user'" json:"role"`
	ManagerId    string    `pg:"manager_id,notnull,type:uuid" json:"manager_id"`
	Visibility   string    `pg:"visibility,default:'internal'" json:"visibility"`
	Status       string    `pg:"status,default:'active'" json:"status"`
	Metrics      iris.Map  `pg:"metrics,type:jsonb" json:"metrics"`
	OtherInfo    iris.Map  `pg:"other_info,type:jsonb" json:"other_info"`
	CreatedAt    time.Time `pg:"created_at,default:now()" json:"created_at"`
	UpdatedAt    time.Time `pg:"updated_at,default:now()" json:"updated_at"`
	MaintainerId string    `pg:"maintainer_id,notnull,type:uuid" json:"maintainer_id"`
	Version      uint64    `pg:"version,default:0" json:"version"`
	// contains filtered or unexported fields
}

func (*User) BasicInfo

func (u *User) BasicInfo() iris.Map

用户基本信息

func (*User) CheckRole

func (u *User) CheckRole(prefix string) bool

func (*User) GetMap

func (u *User) GetMap() iris.Map

func (*User) Init

func (u *User) Init(raw bool, conf *toml.Tree) *User

初始化

Jump to

Keyboard shortcuts

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