Documentation ¶
Index ¶
Constants ¶
View Source
const ( Required = "required" Invalid = "invalid" IsNotInreger = "is_not_integer" )
View Source
const DateLayout = "2006-01-02"
Variables ¶
View Source
var (
ErrResourceNotFound = NewError("resource.not_found")
)
Functions ¶
This section is empty.
Types ¶
type Operation ¶
type Operation struct { Person string `json:"person" db:"person"` RegAddress *string `json:"reg_addr_koatuu,omitempty" db:"reg_address"` RegCode int `json:"registration_code" db:"code"` Reg string `json:"registration" db:"name"` Date string `json:"date" db:"reg_date"` DepCode int32 `json:"dep_code" db:"office_id"` Dep string `json:"dep" db:"office_name"` Brand string `json:"brand" db:"make"` Model string `json:"model" db:"model"` VIN *string `json:"vin,omitempty" db:"vin"` Year int16 `json:"year" db:"year"` Color string `json:"color" db:"color"` Kind string `json:"kind" db:"kind"` Body string `json:"body" db:"body"` Purpose string `json:"purpose" db:"purpose"` Fuel *string `json:"fuel,omitempty" db:"fuel"` Capacity *int `json:"capacity,omitempty" db:"capacity"` OwnWeight *float64 `json:"own_weight,omitempty" db:"own_weight"` TotalWeight *float64 `json:"total_weight,omitempty" db:"total_weight"` Number string `json:"number" db:"number"` ResourceID int64 `json:"-" db:"resource_id"` }
Operation represents entity in the domain.Store.
func TestOperation ¶
TestOperation return special operations for testing purposes.
func (*Operation) PrettyPerson ¶
type Resource ¶
type Resource struct { ID int64 `json:"id" db:"id"` UID string `json:"uid" db:"uid"` Name string `json:"name" db:"name"` URL string `json:"url" db:"url"` LastModified time.Time `json:"last_modified" db:"last_modified"` CreatedAt time.Time `json:"created_at" db:"created_at"` }
Resource represents entity from the data.gov.ua web portal.
func TestResource ¶
TestResource return special resource for testing purposes.
type Revision ¶
type Revision struct { ID string `json:"id" db:"id"` URL string `json:"url" db:"url"` FileHashSum *string `json:"file_hash_sum" db:"file_hash_sum"` Deleted int32 `json:"deleted" db:"deleted"` Added int32 `json:"added" db:"added"` CreatedAt time.Time `json:"created_at" db:"created_at"` }
Revision represents entity in the domain.Store.
type ValidationError ¶ added in v0.0.31
func NewValidationError ¶ added in v0.0.31
func NewValidationError(messages map[string][]string) ValidationError
func (*ValidationError) Append ¶ added in v0.0.31
func (e *ValidationError) Append(field string, message ...string)
func (ValidationError) Error ¶ added in v0.0.31
func (e ValidationError) Error() string
func (ValidationError) WithPrefix ¶ added in v0.0.31
func (e ValidationError) WithPrefix(prefix string) ValidationError
Click to show internal directories.
Click to hide internal directories.