Documentation ¶
Index ¶
Constants ¶
View Source
const (
FileSystemTableName = "filesystem"
)
View Source
const FsCacheTableName = "fs_cache"
View Source
const (
LinkTableName = "link"
)
View Source
const TimeFormat = "2006-01-02 15:04:05"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FSCache ¶
type FSCache struct { PK int64 `json:"-" gorm:"primaryKey;autoIncrement"` CacheID string `json:"cacheID" gorm:"type:varchar(36);column:cache_id"` CacheHashID string `json:"cacheHashID" gorm:"type:varchar(36);column:cache_hash_id"` FsID string `json:"fsID" gorm:"type:varchar(36);column:fs_id"` CacheDir string `json:"cacheDir" gorm:"type:varchar(4096);column:cache_dir"` NodeName string `json:"nodename" gorm:"type:varchar(256);column:nodename"` UsedSize int `json:"usedSize" gorm:"type:bigint(20);column:usedsize"` ClusterID string `json:"-" gorm:"column:cluster_id;default:''"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"` DeletedAt gorm.DeletedAt `json:"-"` }
type FSCacheConfig ¶
type FSCacheConfig struct { PK int64 `json:"-" gorm:"primaryKey;autoIncrement"` FsID string `json:"fsID" gorm:"type:varchar(36);unique_index"` CacheDir string `json:"cacheDir"` Quota int `json:"quota"` MetaDriver string `json:"metaDriver"` BlockSize int `json:"blockSize"` Debug bool `json:"debug"` NodeAffinityJson string `json:"-" gorm:"column:node_affinity;type:text;default:'{}'"` NodeAffinityMap map[string]interface{} `json:"nodeAffinity" gorm:"-"` NodeTaintTolerationJson string `json:"-" gorm:"column:node_tainttoleration;type:text;default:'{}'"` NodeTaintTolerationMap map[string]interface{} `json:"nodeTaintToleration" gorm:"-"` ExtraConfigJson string `json:"-" gorm:"column:extra_config;type:text;default:'{}'"` ExtraConfigMap map[string]string `json:"extraConfig" gorm:"-"` CreateTime string `json:"createTime" gorm:"-"` UpdateTime string `json:"updateTime,omitempty" gorm:"-"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"` DeletedAt gorm.DeletedAt `json:"-"` }
func (*FSCacheConfig) BeforeSave ¶
func (s *FSCacheConfig) BeforeSave(*gorm.DB) error
func (*FSCacheConfig) TableName ¶
func (s *FSCacheConfig) TableName() string
type FileSystem ¶
type FileSystem struct { Model Name string `json:"name"` Type string `json:"type"` ServerAddress string `json:"serverAddress"` SubPath string `json:"subPath" gorm:"column:subpath"` PropertiesJson string `json:"-" gorm:"column:properties;type:text;default:'{}'"` PropertiesMap map[string]string `json:"properties" gorm:"-"` UserName string `json:"userName"` IndependentMountProcess bool `json:"independentMountProcess"` }
FileSystem defined file system model, which can be used to create file system
func (*FileSystem) AfterFind ¶
func (s *FileSystem) AfterFind(*gorm.DB) error
AfterFind is the callback methods doing after the find file system
func (*FileSystem) BeforeSave ¶
func (s *FileSystem) BeforeSave(*gorm.DB) error
BeforeSave is the callback methods for saving file system
func (FileSystem) TableName ¶
func (FileSystem) TableName() string
type Grant ¶
type Grant struct { Pk int64 `json:"-" gorm:"primaryKey;autoIncrement"` ID string `json:"grantID" gorm:"uniqueIndex"` UserName string `json:"userName"` ResourceType string `json:"resourceType"` ResourceID string `json:"resourceID"` CreatedAt time.Time `json:"createTime"` UpdatedAt time.Time `json:"updateTime,omitempty"` DeletedAt gorm.DeletedAt `json:"-" gorm:"index"` }
type Link ¶
type Link struct { Model FsID string `json:"fsID"` FsPath string `json:"FsPath"` ServerAddress string `json:"serverAddress"` SubPath string `json:"subPath" gorm:"column:subpath"` Type string `json:"type"` PropertiesJson string `json:"-" gorm:"column:properties;type:text;default:'{}'"` PropertiesMap map[string]string `json:"properties" gorm:"-"` UserName string `json:"userName"` }
Link defined file system model, which can be used to create link
func (*Link) BeforeSave ¶
BeforeSave is the callback methods for saving file system
type Model ¶
Click to show internal directories.
Click to hide internal directories.