请求类型枚举值定义

This commit is contained in:
2024-11-25 14:43:40 +08:00
parent 1f5050978f
commit 325efde765
2 changed files with 61 additions and 16 deletions

38
enums/data_location.go Normal file
View File

@ -0,0 +1,38 @@
// Package enums ...
//
// Description : enums ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2024-11-25 14:39
package enums
// RequestDataLocation 请求数据所在位置
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 14:40 2024/11/25
type RequestDataLocation string
func (rdl RequestDataLocation) String() string {
return string(rdl)
}
func (rdl RequestDataLocation) MarshalJSON() ([]byte, error) {
return []byte(rdl.String()), nil
}
// ResponseDataLocation 响应数据所在位置
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 14:41 2024/11/25
type ResponseDataLocation string
func (rdl ResponseDataLocation) String() string {
return string(rdl)
}
func (rdl ResponseDataLocation) MarshalJSON() ([]byte, error) {
return []byte(rdl.String()), nil
}