Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JsonErrors ¶
type JsonErrors json.RawMessage
func NewJsonError ¶
func NewJsonError(code int, message ...string) *JsonErrors
func NewValidationErrors ¶
func NewValidationErrors(ve []byte) *JsonErrors
func (*JsonErrors) Error ¶
func (j *JsonErrors) Error() string
func (*JsonErrors) Errors ¶
func (j *JsonErrors) Errors(e validation.Errors) *JsonErrors
func (*JsonErrors) Message ¶
func (j *JsonErrors) Message(message string) *JsonErrors
type Port ¶
type Port struct { Key string `json:"key" bson:"key"` Name string `json:"name" bson:"name"` City string `json:"city" bson:"city"` Country string `json:"country" bson:"country"` Alias []string `json:"alias" bson:"alias"` Regions []string `json:"regions" bson:"regions"` Coordinates []primitive.Decimal128 `json:"coordinates" bson:"coordinates"` Province string `json:"province" bson:"province"` Timezone string `json:"timezone" bson:"timezone"` Unlocs []string `json:"unlocs" bson:"unlocs"` Code string `json:"code" bson:"code"` }
func (*Port) ValidateAndMarshal ¶
func (p *Port) ValidateAndMarshal() (json.RawMessage, error)
Click to show internal directories.
Click to hide internal directories.