model

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameCluster = "cluster"
View Source
const TableNameClusterBind = "cluster_bind"
View Source
const TableNameLabel = "label"
View Source
const TableNameNamespace = "namespace"
View Source
const TableNameProject = "project"
View Source
const TableNameServiceaccount = "serviceaccount"
View Source
const TableNameUser = "user"

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	ID          int32     `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	ClusterID   string    `gorm:"column:cluster_id;not null;default:0" json:"cluster_id"`
	ClusterName string    `gorm:"column:cluster_name;not null" json:"cluster_name"`
	Describe    string    `gorm:"column:describe;not null" json:"describe"`
	Labels      string    `gorm:"column:labels;not null" json:"labels"`
	CreatedAt   time.Time `gorm:"column:created_at" json:"created_at"`
	UpdatedAt   time.Time `gorm:"column:updated_at" json:"updated_at"`
}

Cluster mapped from table <cluster>

func (*Cluster) TableName

func (*Cluster) TableName() string

TableName Cluster's table name

type ClusterBind

type ClusterBind struct {
	ID          int32     `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	ProjectID   string    `gorm:"column:project_id;not null;default:0" json:"project_id"`
	ClusterID   string    `gorm:"column:cluster_id;not null;default:0" json:"cluster_id"`
	ProjectName string    `gorm:"column:project_name;not null" json:"project_name"`
	ClusterName string    `gorm:"column:cluster_name;not null" json:"cluster_name"`
	CreatedAt   time.Time `gorm:"column:created_at" json:"created_at"`
	UpdatedAt   time.Time `gorm:"column:updated_at" json:"updated_at"`
}

ClusterBind mapped from table <cluster_bind>

func (*ClusterBind) TableName

func (*ClusterBind) TableName() string

TableName ClusterBind's table name

type Label

type Label struct {
	ID        int32     `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	LabelID   string    `gorm:"column:label_id;not null;default:0" json:"label_id"`
	Key       string    `gorm:"column:key;not null" json:"key"`
	Value     string    `gorm:"column:value;not null" json:"value"`
	CreatedAt time.Time `gorm:"column:created_at" json:"created_at"`
	UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at"`
}

Label mapped from table <label>

func (*Label) TableName

func (*Label) TableName() string

TableName Label's table name

type Namespace

type Namespace struct {
	ID        int32     `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	NsID      string    `gorm:"column:ns_id;not null;default:0" json:"ns_id"`
	NsName    string    `gorm:"column:ns_name;not null" json:"ns_name"`
	ClusterID string    `gorm:"column:cluster_id;not null;default:0" json:"cluster_id"`
	SaID      string    `gorm:"column:sa_id;not null;default:0" json:"sa_id"`
	SaName    string    `gorm:"column:sa_name;not null" json:"sa_name"`
	CreatedAt time.Time `gorm:"column:created_at" json:"created_at"`
	UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at"`
}

Namespace mapped from table <namespace>

func (*Namespace) TableName

func (*Namespace) TableName() string

TableName Namespace's table name

type Project

type Project struct {
	ID          int32     `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	ProjectID   string    `gorm:"column:project_id;not null;default:0" json:"project_id"`
	ProjectName string    `gorm:"column:project_name;not null" json:"project_name"`
	Describe    string    `gorm:"column:describe;not null" json:"describe"`
	CreatedAt   time.Time `gorm:"column:created_at" json:"created_at"`
	UpdatedAt   time.Time `gorm:"column:updated_at" json:"updated_at"`
}

Project mapped from table <project>

func (*Project) TableName

func (*Project) TableName() string

TableName Project's table name

type Serviceaccount

type Serviceaccount struct {
	ID        int32     `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	SaID      string    `gorm:"column:sa_id;not null;default:0" json:"sa_id"`
	SaName    string    `gorm:"column:sa_name;not null" json:"sa_name"`
	SaToken   string    `gorm:"column:sa_token;not null" json:"sa_token"`
	CreatedAt time.Time `gorm:"column:created_at" json:"created_at"`
	UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at"`
}

Serviceaccount mapped from table <serviceaccount>

func (*Serviceaccount) TableName

func (*Serviceaccount) TableName() string

TableName Serviceaccount's table name

type User

type User struct {
	ID        int32     `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	Username  string    `gorm:"column:username;not null" json:"username"`
	Password  string    `gorm:"column:password;not null" json:"password"`
	CreatedAt time.Time `gorm:"column:created_at" json:"created_at"`
	UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at"`
}

User mapped from table <user>

func (*User) TableName

func (*User) TableName() string

TableName User's table name

Jump to

Keyboard shortcuts

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