Documentation ¶ Index ¶ Variables type BaseModel func NewBaseModel(version int, createdAt, updatedAt time.Time, createdBy, updatedBy int) (*BaseModel, error) type ContextKey Constants ¶ This section is empty. Variables ¶ View Source var ( Validator = validator.New() ErrInvalidArgument = errors.New("invalid argument") ErrPermissionDenied = errors.New("permission denied") ) Functions ¶ This section is empty. Types ¶ type BaseModel ¶ type BaseModel struct { Version int `validate:"required,gte=1"` CreatedAt time.Time UpdatedAt time.Time CreatedBy int `validate:"gte=0"` UpdatedBy int `validate:"gte=0"` } func NewBaseModel ¶ func NewBaseModel(version int, createdAt, updatedAt time.Time, createdBy, updatedBy int) (*BaseModel, error) type ContextKey ¶ type ContextKey string Source Files ¶ View all Source files base_model.goinit.go Click to show internal directories. Click to hide internal directories.