Documentation ¶
Index ¶
Constants ¶
View Source
const TableNameMysqlIDL = "idl"
View Source
const TableNameMysqlRepository = "repository"
View Source
const TableNameMysqlTemplate = "template"
View Source
const TableNameMysqlTemplateItem = "template_item"
View Source
const TableNameMysqlToken = "token"
View Source
const TableNameMysqlUser = "user"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MysqlIDL ¶
type MysqlIDL struct { ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:id" json:"id"` // id IdlRepositoryID int64 `gorm:"column:idl_repository_id;not null;comment:repository id" json:"idl_repository_id"` // idl repository id ServiceRepositoryID int64 `gorm:"column:service_repository_id;not null;comment:repository id" json:"service_repository_id"` // service repository id ParentIdlID int64 `gorm:"column:parent_idl_id;comment:null if main idl else import idl" json:"parent_idl_id"` // null if main idl else import idl IdlPath string `gorm:"column:idl_path;not null;comment:idl path" json:"idl_path"` // idl path CommitHash string `gorm:"column:commit_hash;not null;comment:idl file commit hash" json:"commit_hash"` // idl file commit hash ServiceName string `gorm:"column:service_name;not null;comment:service name" json:"service_name"` // service name LastSyncTime time.Time `gorm:"column:last_sync_time;not null;default:CURRENT_TIMESTAMP;comment:last update time" json:"last_sync_time"` // last update time Status int32 `gorm:"column:status;default:1;comment:status" json:"status"` IsDeleted soft_delete.DeletedAt `gorm:"column:is_deleted;softDelete:flag;not null;comment:is deleted" json:"is_deleted"` // is deleted CreateTime time.Time `gorm:"column:create_time;autoCreateTime;not null;default:CURRENT_TIMESTAMP;comment:create time" json:"create_time"` // create time UpdateTime time.Time `gorm:"column:update_time;autoUpdateTime;not null;default:CURRENT_TIMESTAMP;comment:update time" json:"update_time"` // update time }
MysqlIDL mapped from table <idl>
type MysqlIDLWithRepositoryInfo ¶
type MysqlIDLWithRepositoryInfo struct { MysqlIDL IdlRepository MysqlRepository `gorm:"foreignKey:idl_repository_id;references:id"` ServiceRepository MysqlRepository `gorm:"foreignKey:service_repository_id;references:id"` }
type MysqlRepository ¶
type MysqlRepository struct { ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:repository id" json:"id"` // repository id RepositoryType int32 `gorm:"column:repository_type;not null;comment:repo type" json:"repository_type"` // repo type Domain string `gorm:"column:domain;not null;comment:repo domain" json:"domain"` // repo domain Owner string `gorm:"column:owner;not null;comment:repo owner" json:"owner"` // repo owner RepositoryName string `gorm:"column:repository_name;not null;comment:repo name" json:"repository_name"` // repo name Branch string `gorm:"column:branch;not null;comment:repo branch" json:"branch"` // repo branch StoreType int32 `gorm:"column:store_type;not null;comment:store type" json:"store_type"` // store type LastUpdateTime time.Time `gorm:"column:last_update_time;comment:last update time" json:"last_update_time"` // last update time LastSyncTime time.Time `gorm:"column:last_sync_time;comment:last sync time" json:"last_sync_time"` // last sync time TokenId int64 `gorm:"column:token_id;comment:repository token id" json:"token_id"` // repository token id Status int32 `gorm:"column:status;default:1;comment:status" json:"status"` IsDeleted soft_delete.DeletedAt `gorm:"column:is_deleted;softDelete:flag;not null;comment:is deleted" json:"is_deleted"` // is deleted CreateTime time.Time `gorm:"column:create_time;autoCreateTime;default:CURRENT_TIMESTAMP;comment:create time" json:"create_time"` // create time UpdateTime time.Time `gorm:"column:update_time;autoUpdateTime;default:CURRENT_TIMESTAMP;comment:update time" json:"update_time"` // update time }
MysqlRepository mapped from table <repository>
func (*MysqlRepository) TableName ¶
func (*MysqlRepository) TableName() string
TableName MysqlRepository's table name
type MysqlTemplate ¶
type MysqlTemplate struct { ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:template id" json:"id"` // template id Name string `gorm:"column:name;not null;comment:template name" json:"name"` // template name Type int32 `gorm:"column:type;not null;comment:template type" json:"type"` // template type IsDeleted soft_delete.DeletedAt `gorm:"column:is_deleted;not null;softDelete:flag;comment:is deleted" json:"is_deleted"` // is deleted CreateTime time.Time `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP;comment:create time" json:"create_time"` // create time UpdateTime time.Time `gorm:"column:update_time;not null;default:CURRENT_TIMESTAMP;comment:update time" json:"update_time"` // update time }
MysqlTemplate mapped from table <template>
func (*MysqlTemplate) TableName ¶
func (*MysqlTemplate) TableName() string
TableName MysqlTemplate's table name
type MysqlTemplateItem ¶
type MysqlTemplateItem struct { ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:template item id" json:"id"` // template item id TemplateID int64 `gorm:"column:template_id;not null;comment:template id" json:"template_id"` // template id Name string `gorm:"column:name;not null;comment:template item name" json:"name"` // template item name Content string `gorm:"column:content;comment:template content" json:"content"` // template content IsDeleted soft_delete.DeletedAt `gorm:"column:is_deleted;softDelete:flag;not null;comment:is deleted" json:"is_deleted"` // is deleted CreateTime time.Time `gorm:"column:create_time;autoCreateTime;not null;default:CURRENT_TIMESTAMP;comment:create time" json:"create_time"` // create time UpdateTime time.Time `gorm:"column:update_time;autoUpdateTime;not null;default:CURRENT_TIMESTAMP;comment:update time" json:"update_time"` // update time }
MysqlTemplateItem mapped from table <template_item>
func (*MysqlTemplateItem) TableName ¶
func (*MysqlTemplateItem) TableName() string
TableName MysqlTemplateItem's table name
type MysqlToken ¶
type MysqlToken struct { ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:id" json:"id"` // id Owner string `gorm:"column:owner;not null;comment:token owner" json:"owner"` // token owner OwnerID int64 `gorm:"column:owner_id;comment:token owner id" json:"owner_id"` // token owner id RepositoryType int32 `gorm:"column:repository_type;not null;comment:repository type (1: gitlab, 2: github)" json:"repository_type"` // repository type (1: gitlab, 2: github) RepositoryDomain string `gorm:"column:repository_domain;not null;comment:repository api domain" json:"repository_domain"` // repository api domain Status int32 `gorm:"column:status;not null;comment:token status (1: expired, 2: valid)" json:"status"` // token status (1: expired, 2: valid) TokenType int32 `gorm:"column:token_type;not null;comment:token type (1: personal, 2: organization)" json:"token_type"` // token type (1: personal, 2: organization) Token string `gorm:"column:token;not null;comment:repository token" json:"token"` // repository token ExpirationTime time.Time `gorm:"column:expiration_time;comment:token expiration time" json:"expiration_time"` // token expiration time IsDeleted soft_delete.DeletedAt `gorm:"column:is_deleted;softDelete:flag;not null;comment:is deleted" json:"is_deleted"` // is deleted CreateTime time.Time `gorm:"column:create_time;autoCreateTime;not null;default:CURRENT_TIMESTAMP;comment:create time" json:"create_time"` // create time UpdateTime time.Time `gorm:"column:update_time;autoUpdateTime;not null;default:CURRENT_TIMESTAMP;comment:update time" json:"update_time"` // update time }
MysqlToken mapped from table <token>
func (*MysqlToken) TableName ¶
func (*MysqlToken) TableName() string
TableName MysqlToken's table name
type MysqlUser ¶
type MysqlUser struct { UserID int64 `gorm:"column:user_id;primaryKey;comment:user id" json:"user_id"` // user id Name string `gorm:"column:name;not null;comment:user name" json:"name"` // user name IsDeleted soft_delete.DeletedAt `gorm:"column:is_deleted;not null;softDelete:flag;comment:is deleted" json:"is_deleted"` // is deleted CreateTime time.Time `gorm:"column:create_time;autoCreateTime;not null;default:CURRENT_TIMESTAMP;comment:create time" json:"create_time"` // create time UpdateTime time.Time `gorm:"column:update_time;autoUpdateTime;not null;default:CURRENT_TIMESTAMP;comment:update time" json:"update_time"` // update time }
MysqlUser mapped from table <user>
Click to show internal directories.
Click to hide internal directories.