| 1234567891011121314151617181920212223242526272829303132 |
- // package msg_serve -- сообщения на обслуживание входящих запросов.
- package msg_serve
- import (
- "gitp78su.ipnodns.ru/svi/kern/v4/lev0/defs"
- mKh "gitp78su.ipnodns.ru/svi/kern/v4/lev0/helpers"
- )
- // ServeReq -- входящий запрос на обслуживание.
- type ServeReq struct {
- Topic_ *defs.Topic `json:"topic"`
- Uuid_ string `json:"uuid"`
- BinReq_ []byte `json:"req"`
- }
- // SelfCheck -- проверяет структуру на правильность полей.
- func (sf *ServeReq) SelfCheck() {
- mKh.Hassert(sf.Topic_.Get() != "", "ServeReq.SelfCheck(): topic is empty")
- mKh.Hassert(sf.Uuid_ != "", "ServeReq.SelfCheck(): uuid is empty")
- }
- // ServeResp -- ответ на входящий запрос.
- type ServeResp struct {
- Status_ string `json:"status"`
- Uuid_ string `json:"uuid"`
- BinResp_ []byte `json:"resp"`
- }
- // SelfCheck -- проверяет правильность своих полей.
- func (sf *ServeResp) SelfCheck() {
- mKh.Hassert(sf.Status_ != "", "ServeResp.SelfCheck(): status is empty")
- }
|