dto

package
v0.0.0-...-4092974 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2021 License: MIT Imports: 5 Imported by: 0

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) Validate

func (p *Port) Validate() val.Errors

func (*Port) ValidateAndMarshal

func (p *Port) ValidateAndMarshal() (json.RawMessage, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL