Documentation
¶
Index ¶
- Constants
- type MSPProject
- type MSPProjectDB
- type MSPTenant
- type MSPTenantDB
- func (db *MSPTenantDB) DeleteTenantByTenantID(tenantId string) (*MSPTenant, error)
- func (db *MSPTenantDB) InsertTenant(tenant *MSPTenant) (*MSPTenant, *errors.DatabaseError)
- func (db *MSPTenantDB) QueryTenant(tenantID string) (*MSPTenant, error)
- func (db *MSPTenantDB) QueryTenantByProjectID(projectID string) ([]*MSPTenant, error)
- func (db *MSPTenantDB) QueryTenantByProjectIDAndWorkspace(projectID, workspace string) (*MSPTenant, error)
Constants ¶
View Source
const ( TableMSPTenant = "msp_tenant" TableMSPProject = "msp_project" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MSPProject ¶ added in v1.2.0
type MSPProject struct { Id string `gorm:"column:id" db:"id" json:"id" form:"id"` // MSP project ID Name string `gorm:"column:name" db:"name" json:"name" form:"name"` // MSP project name DisplayName string `gorm:"column:display_name" db:"display_name" json:"display_name" form:"display_name"` // MSP project display name Type string `gorm:"column:type" db:"type" json:"type" form:"type"` // MSP project type CreatedAt time.Time `gorm:"column:created_at" db:"created_at" json:"created_at" form:"created_at"` // Create time UpdatedAt time.Time `gorm:"column:updated_at" db:"updated_at" json:"updated_at" form:"updated_at"` // Update time IsDeleted bool `gorm:"column:is_deleted" db:"is_deleted" json:"is_deleted" form:"is_deleted"` // Deleted or not }
MSPProject TODO remove msp project table
func (MSPProject) TableName ¶ added in v1.2.0
func (MSPProject) TableName() string
type MSPProjectDB ¶ added in v1.2.0
MSPProjectDB msp_project
func (*MSPProjectDB) Create ¶ added in v1.2.0
func (db *MSPProjectDB) Create(project *MSPProject) (*MSPProject, error)
func (*MSPProjectDB) Delete ¶ added in v1.2.0
func (db *MSPProjectDB) Delete(id string) (*MSPProject, error)
func (*MSPProjectDB) Query ¶ added in v1.2.0
func (db *MSPProjectDB) Query(id string) (*MSPProject, error)
type MSPTenant ¶
type MSPTenant struct { Id string `gorm:"column:id" db:"id" json:"id" form:"id"` // Tenant id Type string `gorm:"column:type" db:"type" json:"type" form:"type"` // Tenant type(dop 、msp) RelatedProjectId string `gorm:"column:related_project_id" db:"related_project_id" json:"related_project_id" form:"related_project_id"` // Project id RelatedWorkspace string `gorm:"column:related_workspace" db:"related_workspace" json:"related_workspace" form:"related_workspace"` // Workspace( DEV、TEST、STAGING、PROD、DEFAULT) CreatedAt time.Time `gorm:"column:created_at" db:"created_at" json:"create_time" form:"create_time"` // Create time UpdatedAt time.Time `gorm:"column:updated_at" db:"updated_at" json:"update_time" form:"update_time"` // Update time IsDeleted bool `gorm:"column:is_deleted" db:"is_deleted" json:"is_deleted" form:"is_deleted"` // Delete or not }
type MSPTenantDB ¶
MSPTenantDB msp_tenant
func (*MSPTenantDB) DeleteTenantByTenantID ¶ added in v1.2.0
func (db *MSPTenantDB) DeleteTenantByTenantID(tenantId string) (*MSPTenant, error)
func (*MSPTenantDB) InsertTenant ¶
func (db *MSPTenantDB) InsertTenant(tenant *MSPTenant) (*MSPTenant, *errors.DatabaseError)
func (*MSPTenantDB) QueryTenant ¶
func (db *MSPTenantDB) QueryTenant(tenantID string) (*MSPTenant, error)
func (*MSPTenantDB) QueryTenantByProjectID ¶ added in v1.2.0
func (db *MSPTenantDB) QueryTenantByProjectID(projectID string) ([]*MSPTenant, error)
func (*MSPTenantDB) QueryTenantByProjectIDAndWorkspace ¶ added in v1.2.0
func (db *MSPTenantDB) QueryTenantByProjectIDAndWorkspace(projectID, workspace string) (*MSPTenant, error)
Click to show internal directories.
Click to hide internal directories.