fmodel

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiEntry

type ApiEntry struct {
	Path   string
	Method string
	Perm   PermDef
	In     interface{}
	Out    interface{}
}

type BaseVO

type BaseVO struct {
	ID PK `json:"id"`
}

type CookieName

type CookieName string
const (
	COOKIE_SESSION CookieName = "SESSIONID"
	COOKIE_TENANT  CookieName = "TENANTID"
)

type CtxKey

type CtxKey string
const (
	CTX_REQ     CtxKey = "REQ"
	CTX_RES     CtxKey = "RES"
	CTX_DONE    CtxKey = "DONE"
	CTX_ID      CtxKey = "ID"
	CTX_START   CtxKey = "START"
	CTX_SESSION CtxKey = "SESSION"
)

type DBVersion

type DBVersion struct {
	ID    string
	Desc  string
	RunAt time.Time
}

func (DBVersion) TableName

func (d DBVersion) TableName() string

type EMPTY

type EMPTY struct{}

type File

type File struct {
	BaseVO
	Name      string
	Tenant    string
	MimeType  string
	Len       int64
	Owner     string
	Content   []byte
	CreatedAt time.Time
}

type HeaderName

type HeaderName string
const (
	HEADER_APIKEY HeaderName = "X-APIKEY"
	HEADER_TENAT  HeaderName = "X-TENANT"
)

type LoginRequest

type LoginRequest struct {
	Tenant   string `json:"tenant"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type LoginResponse

type LoginResponse struct {
}

type PK

type PK int64

type PermDef

type PermDef string
const (
	PERM_ALL     PermDef = ""
	PERM_AUTH    PermDef = "+"
	PERM_ROOT    PermDef = "*"
	PERM_USERADM PermDef = "user-adm"
)

type RawSession

type RawSession struct {
	Id   string
	Data []byte
}

type SecGroup

type SecGroup struct {
	BaseVO
	Name  string     `json:"name"`
	Perms []*SecPerm `json:"perms" gorm:"many2many:sec_group_perms;"`
}

type SecPerm

type SecPerm struct {
	BaseVO
	Name string `json:"name"`
	Val  string `json:"val"`
}

type SecUser

type SecUser struct {
	BaseVO
	Username string      `json:"username"`
	Email    string      `json:"email"`
	Hash     string      `json:"-"`
	Tenant   string      `json:"tenant"`
	Enabled  *bool       `json:"enabled"`
	Groups   []*SecGroup `json:"groups" gorm:"many2many:sec_user_groups;"`
}

type Session

type Session struct {
	Username  string             `json:"username"`
	Sessionid string             `json:"sessionid"`
	Perms     map[PermDef]string `json:"perms"`
	Tenant    string             `json:"tenant"`
	CreatedAt time.Time          `json:"created_at"`
	Hash      []byte             `json:"-"`
}

type VO

type VO interface {
	GetID() uint
}

Jump to

Keyboard shortcuts

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