laws

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Law.ProtoReflect.Descriptor instead.

func (*Law) GetCreatedAt

func (x *Law) GetCreatedAt() *timestamp.Timestamp

func (*Law) GetDescription

func (x *Law) GetDescription() string

func (*Law) GetDetentionTime

func (x *Law) GetDetentionTime() uint32

func (*Law) GetFine

func (x *Law) GetFine() uint32

func (*Law) GetId

func (x *Law) GetId() uint64

func (*Law) GetLawbookId

func (x *Law) GetLawbookId() uint64

func (*Law) GetName

func (x *Law) GetName() string

func (*Law) GetStvoPoints

func (x *Law) GetStvoPoints() uint32

func (*Law) GetUpdatedAt

func (x *Law) GetUpdatedAt() *timestamp.Timestamp

func (*Law) ProtoMessage

func (*Law) ProtoMessage()

func (*Law) ProtoReflect

func (x *Law) ProtoReflect() protoreflect.Message

func (*Law) Reset

func (x *Law) Reset()

func (*Law) Sanitize added in v0.8.3

func (m *Law) Sanitize() error

func (*Law) String

func (x *Law) String() string

func (*Law) Validate

func (m *Law) Validate() error

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

func (m *Law) ValidateAll() error

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) Descriptor() ([]byte, []int)

Deprecated: Use LawBook.ProtoReflect.Descriptor instead.

func (*LawBook) GetCreatedAt

func (x *LawBook) GetCreatedAt() *timestamp.Timestamp

func (*LawBook) GetDescription

func (x *LawBook) GetDescription() string

func (*LawBook) GetId

func (x *LawBook) GetId() uint64

func (*LawBook) GetLaws

func (x *LawBook) GetLaws() []*Law

func (*LawBook) GetName

func (x *LawBook) GetName() string

func (*LawBook) GetUpdatedAt

func (x *LawBook) GetUpdatedAt() *timestamp.Timestamp

func (*LawBook) ProtoMessage

func (*LawBook) ProtoMessage()

func (*LawBook) ProtoReflect

func (x *LawBook) ProtoReflect() protoreflect.Message

func (*LawBook) Reset

func (x *LawBook) Reset()

func (*LawBook) Sanitize added in v0.8.3

func (m *LawBook) Sanitize() error

func (*LawBook) String

func (x *LawBook) String() string

func (*LawBook) Validate

func (m *LawBook) Validate() error

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

func (m *LawBook) ValidateAll() error

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.

Jump to

Keyboard shortcuts

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