Documentation
¶
Index ¶
- Variables
- func ValidateAccountModelFieldCreatedAt(val time.Time) error
- func ValidateAccountModelFieldLogin(val string) error
- func ValidateAccountModelFieldName(val string) error
- func ValidateAccountModelFieldRev(val uuid.UUID) error
- func ValidateAccountModelFieldSomeExternalUuid(val uuid.UUID) error
- type Account
- func (m *Account) GetId() int64
- func (m *Account) GetIsDeleted() bool
- func (m *Account) GetLogin() string
- func (m *Account) GetName() string
- func (m *Account) SetIsDeleted(val bool)
- func (m *Account) SetLogin(val string)
- func (m *Account) SetName(val string)
- func (m *Account) String() string
- func (m *Account) Validate() error
Constants ¶
This section is empty.
Variables ¶
var ErrAccountModelFieldCreatedAtInvalidValue = scope_error.New(
"Account model field CreatedAt invalid value")
Error: Account model field CreatedAt invalid value.
var ErrAccountModelFieldLoginInvalidValue = scope_error.New(
"Account model field Login invalid value")
Error: Account model field Login invalid value.
var ErrAccountModelFieldNameInvalidValue = scope_error.New(
"Account model field Name invalid value")
Error: Account model field Name invalid value.
var ErrAccountModelFieldNameMustHaveLenGreaterThan3 = errors.New( "must have len greater than 3") // name generated by user provided error text
Error: Account model field name validator: must have len greater than 3.
var ErrAccountModelFieldRevInvalidValue = scope_error.New(
"Account model field Rev invalid value")
Error: Account model field Rev invalid value.
var ErrAccountModelFieldSomeExternalUuidInvalidValue = scope_error.New(
"Account model field SomeExternalUuid invalid value")
Error: Account model field SomeExternalUuid invalid value.
Functions ¶
func ValidateAccountModelFieldCreatedAt ¶
ValidateAccountModelFieldCreatedAt validates model field CreatedAt value.
Raises ErrAccountModelFieldValidationError with cause ErrAccountModelFieldCreatedAtInvalidValue.
func ValidateAccountModelFieldLogin ¶
ValidateAccountModelFieldLogin validates model field Login value.
Raises ErrAccountModelFieldValidationError with cause ErrAccountModelFieldLoginInvalidValue.
func ValidateAccountModelFieldName ¶
ValidateAccountModelFieldName validates model field Name value.
Raises ErrAccountModelFieldValidationError with cause ErrAccountModelFieldNameInvalidValue.
func ValidateAccountModelFieldRev ¶
ValidateAccountModelFieldRev validates model field Rev value.
Raises ErrAccountModelFieldValidationError with cause ErrAccountModelFieldRevInvalidValue.
func ValidateAccountModelFieldSomeExternalUuid ¶
ValidateAccountModelFieldSomeExternalUuid validates model field SomeExternalUuid value.
Raises ErrAccountModelFieldValidationError with cause ErrAccountModelFieldSomeExternalUuidInvalidValue.
Types ¶
type Account ¶
type Account struct {
Login string
Name string
// Value expected to be hashed.
Password string
// Used for soft-delete.
IsDeleted bool
Rev uuid.UUID
SomeExternalUuid uuid.UUID
Color uint8
MyByte int8
Binary []byte
CreatedAt time.Time
// contains filtered or unexported fields
}
func AccountWithDefaults ¶
func AccountWithDefaults() *Account
AccountWithDefaults constructs model Account with default values defined in schema.
Example:
// construct a new model
myModel := AccountWithDefaults()
// set public fields directly
myModel.SomePublicField = 4221
// or via setter (if generated)
myModel.SetName("Bob")
func (*Account) GetId ¶
GetId gets field id value.
Generated due to schema field marked with Getter().
Note: getter can help to satisfy some interface(s).
func (*Account) GetIsDeleted ¶
GetIsDeleted gets field IsDeleted value.
Generated due to schema field marked with Getter().
Note: getter can help to satisfy some interface(s).
func (*Account) GetLogin ¶
GetLogin gets field Login value.
Generated due to schema field marked with Getter().
Note: getter can help to satisfy some interface(s).
func (*Account) GetName ¶
GetName gets field Name value.
Generated due to schema field marked with Getter().
Note: getter can help to satisfy some interface(s).
func (*Account) SetIsDeleted ¶
SetIsDeleted sets field IsDeleted value.
Generated due to schema field marked with Setter().
Note: setter can help to satisfy some interface(s).
func (*Account) SetLogin ¶
SetLogin sets field Login value.
Generated due to schema field marked with Setter().
Note: setter can help to satisfy some interface(s).