types

package
v0.0.0-...-2cf57f6 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// UserNormal means a individual user, not organization
	UserNormal UserTypeEnum = "user"
	// UserOrganization means an organization contains some users
	UserOrganization UserTypeEnum = "organization"

	// UserRoleAdmin means an admin user
	UserRoleAdmin UserSystemRole = "admin"
	// UserRoleNothing means a normal user
	UserRoleNothing UserSystemRole = "admin"
)

Functions

This section is empty.

Types

type App

type App struct {
	SeqID     int       `db:"seq"`
	ID        string    `db:"id"`
	Owner     string    `db:"owner"`
	Name      string    `db:"name"`
	Spec      *AppSpec  `db:"spec"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
}

type AppSpec

type AppSpec api.AppSpec

func (*AppSpec) Scan

func (ss *AppSpec) Scan(src interface{}) error

func (*AppSpec) Value

func (ss *AppSpec) Value() (driver.Value, error)

type RoleBinding

type RoleBinding struct {
	Seq         int    `db:"seq"`
	UserSeqID   int    `db:"user_seq"`
	TargetSeqID int    `db:"org_seq"`
	Role        string `db:"role"`
}

type Token

type Token struct {
	SeqID     int       `db:"seq"`
	ID        string    `db:"id"`
	Token     string    `db:"token"`
	Owner     string    `db:"owner"`
	Author    string    `db:"author"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
}

type User

type User struct {
	SeqID      int          `db:"seq"`
	ID         string       `db:"id"`
	UserType   UserTypeEnum `db:"type"`
	Name       string       `db:"name"`
	CreatedAt  time.Time    `db:"created_at"`
	UpdatedAt  time.Time    `db:"updated_at"`
	SystemRole string       `db:"system_role"`
}

type UserSystemRole

type UserSystemRole string

UserSystemRole represents the role of users

func (*UserSystemRole) Scan

func (e *UserSystemRole) Scan(src interface{}) error

func (UserSystemRole) Value

func (e UserSystemRole) Value() (driver.Value, error)

type UserTypeEnum

type UserTypeEnum string

UserTypeEnum represents the type of users

func (*UserTypeEnum) Scan

func (e *UserTypeEnum) Scan(src interface{}) error

func (UserTypeEnum) Value

func (e UserTypeEnum) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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