Documentation ¶
Index ¶
- func CanDoEvent(optType string, synType int, target, targetID string) bool
- func CloseRequest(req *http.Request)
- func CloseResponse(res *http.Response)
- func CreateEvent(target, optType, targetID, tenantID, reqBody, userName string, synType int) (*dbmodel.ServiceEvent, error)
- func HackVolumeOptionDetail(volumeType string, detail *api_model.VolumeTypeStruct, more ...interface{})
- func HackVolumeOptionDetailFromDB(detail *api_model.VolumeTypeStruct, data *dbmodel.TenantServiceVolumeType)
- func ParseVolumeTypeOption(detail *pb.StorageClassDetail) string
- func SetVolumeDefaultValue(info *dbmodel.TenantServiceVolume)
- func UpdateEvent(eventID string, statusCode int)
- type APIHandleError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanDoEvent ¶
CanDoEvent check can do event or not
func CreateEvent ¶
func CreateEvent(target, optType, targetID, tenantID, reqBody, userName string, synType int) (*dbmodel.ServiceEvent, error)
CreateEvent save event
func HackVolumeOptionDetail ¶
func HackVolumeOptionDetail(volumeType string, detail *api_model.VolumeTypeStruct, more ...interface{})
HackVolumeOptionDetail hack volume Option detail, like accessMode, sharePolicy, backupPolicy
func HackVolumeOptionDetailFromDB ¶
func HackVolumeOptionDetailFromDB(detail *api_model.VolumeTypeStruct, data *dbmodel.TenantServiceVolumeType)
HackVolumeOptionDetailFromDB hack volumeOptionDetail from db
func ParseVolumeTypeOption ¶
func ParseVolumeTypeOption(detail *pb.StorageClassDetail) string
ParseVolumeTypeOption parse volume Option name show and volume type
func SetVolumeDefaultValue ¶
func SetVolumeDefaultValue(info *dbmodel.TenantServiceVolume)
SetVolumeDefaultValue set volume default value
Types ¶
type APIHandleError ¶
APIHandleError handle create err for api
func CreateAPIHandleError ¶
func CreateAPIHandleError(code int, err error) *APIHandleError
CreateAPIHandleError create APIHandleError
func CreateAPIHandleErrorFromDBError ¶
func CreateAPIHandleErrorFromDBError(msg string, err error) *APIHandleError
CreateAPIHandleErrorFromDBError from db error create APIHandleError
func CreateAPIHandleErrorf ¶
func CreateAPIHandleErrorf(code int, format string, args ...interface{}) *APIHandleError
CreateAPIHandleErrorf create handle error
func (*APIHandleError) Error ¶
func (a *APIHandleError) Error() string
func (*APIHandleError) Handle ¶
func (a *APIHandleError) Handle(r *http.Request, w http.ResponseWriter)
Handle 处理
func (*APIHandleError) String ¶
func (a *APIHandleError) String() string
Click to show internal directories.
Click to hide internal directories.