Documentation ¶
Index ¶
- Variables
- type Law
- func (*Law) Descriptor() ([]byte, []int)deprecated
- func (x *Law) GetCreatedAt() *timestamp.Timestamp
- func (x *Law) GetDescription() string
- func (x *Law) GetDetentionTime() uint32
- func (x *Law) GetFine() uint32
- func (x *Law) GetId() uint64
- func (x *Law) GetLawbookId() uint64
- func (x *Law) GetName() string
- func (x *Law) GetStvoPoints() uint32
- func (x *Law) GetUpdatedAt() *timestamp.Timestamp
- func (*Law) ProtoMessage()
- func (x *Law) ProtoReflect() protoreflect.Message
- func (x *Law) Reset()
- func (m *Law) Sanitize() error
- func (x *Law) String() string
- func (m *Law) Validate() error
- func (m *Law) ValidateAll() error
- type LawBook
- func (*LawBook) Descriptor() ([]byte, []int)deprecated
- func (x *LawBook) GetCreatedAt() *timestamp.Timestamp
- func (x *LawBook) GetDescription() string
- func (x *LawBook) GetId() uint64
- func (x *LawBook) GetLaws() []*Law
- func (x *LawBook) GetName() string
- func (x *LawBook) GetUpdatedAt() *timestamp.Timestamp
- func (*LawBook) ProtoMessage()
- func (x *LawBook) ProtoReflect() protoreflect.Message
- func (x *LawBook) Reset()
- func (m *LawBook) Sanitize() error
- func (x *LawBook) String() string
- func (m *LawBook) Validate() error
- func (m *LawBook) ValidateAll() error
- type LawBookMultiError
- type LawBookValidationError
- type LawMultiError
- type LawValidationError
Constants ¶
This section is empty.
Variables ¶
var File_resources_laws_laws_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Law ¶
type Law struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" sql:"primary_key" alias:"law.id"` // @gotags: sql:"primary_key" alias:"law.id" CreatedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3,oneof" json:"created_at,omitempty"` UpdatedAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3,oneof" json:"updated_at,omitempty"` LawbookId uint64 `protobuf:"varint,4,opt,name=lawbook_id,json=lawbookId,proto3" json:"lawbook_id,omitempty"` // @sanitize Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` // @sanitize Description *string `protobuf:"bytes,6,opt,name=description,proto3,oneof" json:"description,omitempty"` Fine *uint32 `protobuf:"varint,7,opt,name=fine,proto3,oneof" json:"fine,omitempty"` DetentionTime *uint32 `protobuf:"varint,8,opt,name=detention_time,json=detentionTime,proto3,oneof" json:"detention_time,omitempty"` StvoPoints *uint32 `protobuf:"varint,9,opt,name=stvo_points,json=stvoPoints,proto3,oneof" json:"stvo_points,omitempty"` // contains filtered or unexported fields }
func (*Law) Descriptor
deprecated
func (*Law) GetCreatedAt ¶
func (*Law) GetDescription ¶
func (*Law) GetDetentionTime ¶
func (*Law) GetLawbookId ¶
func (*Law) GetStvoPoints ¶
func (*Law) GetUpdatedAt ¶
func (*Law) ProtoMessage ¶
func (*Law) ProtoMessage()
func (*Law) ProtoReflect ¶
func (x *Law) ProtoReflect() protoreflect.Message
func (*Law) Validate ¶
Validate checks the field values on Law with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Law) ValidateAll ¶
ValidateAll checks the field values on Law with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LawMultiError, or nil if none found.
type LawBook ¶
type LawBook struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" sql:"primary_key" alias:"id"` // @gotags: sql:"primary_key" alias:"id" CreatedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3,oneof" json:"created_at,omitempty"` UpdatedAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3,oneof" json:"updated_at,omitempty"` // @sanitize Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // @sanitize Description *string `protobuf:"bytes,5,opt,name=description,proto3,oneof" json:"description,omitempty"` Laws []*Law `protobuf:"bytes,6,rep,name=laws,proto3" json:"laws,omitempty"` // contains filtered or unexported fields }
func (*LawBook) Descriptor
deprecated
func (*LawBook) GetCreatedAt ¶
func (*LawBook) GetDescription ¶
func (*LawBook) GetUpdatedAt ¶
func (*LawBook) ProtoMessage ¶
func (*LawBook) ProtoMessage()
func (*LawBook) ProtoReflect ¶
func (x *LawBook) ProtoReflect() protoreflect.Message
func (*LawBook) Validate ¶
Validate checks the field values on LawBook with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*LawBook) ValidateAll ¶
ValidateAll checks the field values on LawBook with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LawBookMultiError, or nil if none found.
type LawBookMultiError ¶
type LawBookMultiError []error
LawBookMultiError is an error wrapping multiple validation errors returned by LawBook.ValidateAll() if the designated constraints aren't met.
func (LawBookMultiError) AllErrors ¶
func (m LawBookMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LawBookMultiError) Error ¶
func (m LawBookMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LawBookValidationError ¶
type LawBookValidationError struct {
// contains filtered or unexported fields
}
LawBookValidationError is the validation error returned by LawBook.Validate if the designated constraints aren't met.
func (LawBookValidationError) Cause ¶
func (e LawBookValidationError) Cause() error
Cause function returns cause value.
func (LawBookValidationError) Error ¶
func (e LawBookValidationError) Error() string
Error satisfies the builtin error interface
func (LawBookValidationError) ErrorName ¶
func (e LawBookValidationError) ErrorName() string
ErrorName returns error name.
func (LawBookValidationError) Field ¶
func (e LawBookValidationError) Field() string
Field function returns field value.
func (LawBookValidationError) Key ¶
func (e LawBookValidationError) Key() bool
Key function returns key value.
func (LawBookValidationError) Reason ¶
func (e LawBookValidationError) Reason() string
Reason function returns reason value.
type LawMultiError ¶
type LawMultiError []error
LawMultiError is an error wrapping multiple validation errors returned by Law.ValidateAll() if the designated constraints aren't met.
func (LawMultiError) AllErrors ¶
func (m LawMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LawMultiError) Error ¶
func (m LawMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LawValidationError ¶
type LawValidationError struct {
// contains filtered or unexported fields
}
LawValidationError is the validation error returned by Law.Validate if the designated constraints aren't met.
func (LawValidationError) Cause ¶
func (e LawValidationError) Cause() error
Cause function returns cause value.
func (LawValidationError) Error ¶
func (e LawValidationError) Error() string
Error satisfies the builtin error interface
func (LawValidationError) ErrorName ¶
func (e LawValidationError) ErrorName() string
ErrorName returns error name.
func (LawValidationError) Field ¶
func (e LawValidationError) Field() string
Field function returns field value.
func (LawValidationError) Key ¶
func (e LawValidationError) Key() bool
Key function returns key value.
func (LawValidationError) Reason ¶
func (e LawValidationError) Reason() string
Reason function returns reason value.