status.go 364 字节
Newer Older
E
eoLinker API Management 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
package common

type StatusHandler struct {
	code   int
	status string
}

func (s *StatusHandler) SetStatus(code int, status string) {
	s.code, s.status = code, status
}

func (s *StatusHandler) StatusCode() int {
	return s.code
}

func (s *StatusHandler) Status() string {
	return s.status
}

func NewStatusHandler() *StatusHandler {
	return new(StatusHandler)
}