request_type.go 337 B

123456789101112131415161718192021222324
  1. package microservice
  2. import "git.ali33.ru/fcg-xvii/go-tools/json"
  3. type RequestType byte
  4. const (
  5. RequestQuestion RequestType = iota
  6. RequestEvent
  7. RequestAnswer
  8. RequestClose
  9. )
  10. // Data
  11. type Data interface {
  12. Type() RequestType
  13. JSONMap() json.Map
  14. }
  15. func MakeQuestion(data json.Map) *Question {
  16. return &Question{
  17. data: data,
  18. }
  19. }