Documentation ¶
Index ¶
- type BaseConfig
- type CacheConfig
- type Config
- type MongodbConfig
- type Service
- func (self *Service) GetRequestAllIP(r *http.Request) (ip string)
- func (self *Service) GetRequestIP(r *http.Request) (ip string)
- func (self *Service) GetRequestPayload(r *http.Request) (payload string)
- func (self *Service) LogRequest(r *http.Request, typ string, deleteDuration time.Duration) primitive.ObjectID
- func (self *Service) LogRequestAuth(r *http.Request) primitive.ObjectID
- func (self *Service) LogRequestLogin(r *http.Request) primitive.ObjectID
- func (self *Service) LogRequestOperate(r *http.Request) primitive.ObjectID
- func (self *Service) LogResponse(rw http.ResponseWriter, r *http.Request)
- func (self *Service) LogResponseAuth(rw http.ResponseWriter, r *http.Request)
- func (self *Service) LogResponseLogin(rw http.ResponseWriter, r *http.Request)
- func (self *Service) LogResponseOperate(rw http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseConfig ¶
type BaseConfig struct { MaxUploadFileSize int64 `json:"max_file_size"` DefaultDeleteDuration config.Duration `json:"default_delete_duration"` DefaultLoginDeleteDuration config.Duration `json:"default_login_delete_duration"` DefaultAuthDeleteDuration config.Duration `json:"default_auth_delete_duration"` DefaultOperateDeleteDuration config.Duration `json:"default_operate_delete_duration"` LogLoginPath []string `json:"log_login_path"` LogAuthPath []string `json:"log_auth_path"` LogFilePath []string `json:"log_file_path"` LogOperateExcludePath []string `json:"log_operate_exclude_path"` }
type CacheConfig ¶
type Config ¶
type Config struct { MongodbConfig CacheConfig BaseConfig }
type MongodbConfig ¶
type Service ¶
func (*Service) GetRequestPayload ¶
func (*Service) LogRequest ¶
func (*Service) LogRequestAuth ¶
func (*Service) LogRequestLogin ¶
func (*Service) LogRequestOperate ¶
func (*Service) LogResponse ¶
func (self *Service) LogResponse(rw http.ResponseWriter, r *http.Request)
func (*Service) LogResponseAuth ¶
func (self *Service) LogResponseAuth(rw http.ResponseWriter, r *http.Request)
func (*Service) LogResponseLogin ¶
func (self *Service) LogResponseLogin(rw http.ResponseWriter, r *http.Request)
func (*Service) LogResponseOperate ¶
func (self *Service) LogResponseOperate(rw http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.