database

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: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxPageSize int64 = 20
	NoTotalCount       int64 = -1
)

Variables

View Source
var File_resources_common_database_database_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type DataCount

type DataCount struct {
	TotalCount int64 // alias:"total_count"
}

type OrderBy

type OrderBy struct {
	Column string `protobuf:"bytes,1,opt,name=column,proto3" json:"column,omitempty"`
	Desc   bool   `protobuf:"varint,2,opt,name=desc,proto3" json:"desc,omitempty"`
	// contains filtered or unexported fields
}

func (*OrderBy) Descriptor deprecated

func (*OrderBy) Descriptor() ([]byte, []int)

Deprecated: Use OrderBy.ProtoReflect.Descriptor instead.

func (*OrderBy) GetColumn

func (x *OrderBy) GetColumn() string

func (*OrderBy) GetDesc

func (x *OrderBy) GetDesc() bool

func (*OrderBy) ProtoMessage

func (*OrderBy) ProtoMessage()

func (*OrderBy) ProtoReflect

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

func (*OrderBy) Reset

func (x *OrderBy) Reset()

func (*OrderBy) String

func (x *OrderBy) String() string

func (*OrderBy) Validate

func (m *OrderBy) Validate() error

Validate checks the field values on OrderBy 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 (*OrderBy) ValidateAll

func (m *OrderBy) ValidateAll() error

ValidateAll checks the field values on OrderBy 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 OrderByMultiError, or nil if none found.

type OrderByMultiError

type OrderByMultiError []error

OrderByMultiError is an error wrapping multiple validation errors returned by OrderBy.ValidateAll() if the designated constraints aren't met.

func (OrderByMultiError) AllErrors

func (m OrderByMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (OrderByMultiError) Error

func (m OrderByMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type OrderByValidationError

type OrderByValidationError struct {
	// contains filtered or unexported fields
}

OrderByValidationError is the validation error returned by OrderBy.Validate if the designated constraints aren't met.

func (OrderByValidationError) Cause

func (e OrderByValidationError) Cause() error

Cause function returns cause value.

func (OrderByValidationError) Error

func (e OrderByValidationError) Error() string

Error satisfies the builtin error interface

func (OrderByValidationError) ErrorName

func (e OrderByValidationError) ErrorName() string

ErrorName returns error name.

func (OrderByValidationError) Field

func (e OrderByValidationError) Field() string

Field function returns field value.

func (OrderByValidationError) Key

func (e OrderByValidationError) Key() bool

Key function returns key value.

func (OrderByValidationError) Reason

func (e OrderByValidationError) Reason() string

Reason function returns reason value.

type PaginationRequest

type PaginationRequest struct {
	Offset   int64  `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
	PageSize *int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"`
	// contains filtered or unexported fields
}

func (*PaginationRequest) Descriptor deprecated

func (*PaginationRequest) Descriptor() ([]byte, []int)

Deprecated: Use PaginationRequest.ProtoReflect.Descriptor instead.

func (*PaginationRequest) GetOffset

func (x *PaginationRequest) GetOffset() int64

func (*PaginationRequest) GetPageSize

func (x *PaginationRequest) GetPageSize() int64

func (*PaginationRequest) GetResponse

func (p *PaginationRequest) GetResponse(totalCount int64) (*PaginationResponse, int64)

func (*PaginationRequest) GetResponseWithPageSize

func (p *PaginationRequest) GetResponseWithPageSize(totalCount int64, maxPageSize int64) (*PaginationResponse, int64)

func (*PaginationRequest) ProtoMessage

func (*PaginationRequest) ProtoMessage()

func (*PaginationRequest) ProtoReflect

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

func (*PaginationRequest) Reset

func (x *PaginationRequest) Reset()

func (*PaginationRequest) String

func (x *PaginationRequest) String() string

func (*PaginationRequest) Validate

func (m *PaginationRequest) Validate() error

Validate checks the field values on PaginationRequest 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 (*PaginationRequest) ValidateAll

func (m *PaginationRequest) ValidateAll() error

ValidateAll checks the field values on PaginationRequest 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 PaginationRequestMultiError, or nil if none found.

type PaginationRequestMultiError

type PaginationRequestMultiError []error

PaginationRequestMultiError is an error wrapping multiple validation errors returned by PaginationRequest.ValidateAll() if the designated constraints aren't met.

func (PaginationRequestMultiError) AllErrors

func (m PaginationRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PaginationRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type PaginationRequestValidationError

type PaginationRequestValidationError struct {
	// contains filtered or unexported fields
}

PaginationRequestValidationError is the validation error returned by PaginationRequest.Validate if the designated constraints aren't met.

func (PaginationRequestValidationError) Cause

Cause function returns cause value.

func (PaginationRequestValidationError) Error

Error satisfies the builtin error interface

func (PaginationRequestValidationError) ErrorName

ErrorName returns error name.

func (PaginationRequestValidationError) Field

Field function returns field value.

func (PaginationRequestValidationError) Key

Key function returns key value.

func (PaginationRequestValidationError) Reason

Reason function returns reason value.

type PaginationResponse

type PaginationResponse struct {
	TotalCount int64 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
	Offset     int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	End        int64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"`
	PageSize   int64 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// contains filtered or unexported fields
}

func (*PaginationResponse) Descriptor deprecated

func (*PaginationResponse) Descriptor() ([]byte, []int)

Deprecated: Use PaginationResponse.ProtoReflect.Descriptor instead.

func (*PaginationResponse) GetEnd

func (x *PaginationResponse) GetEnd() int64

func (*PaginationResponse) GetOffset

func (x *PaginationResponse) GetOffset() int64

func (*PaginationResponse) GetPageSize

func (x *PaginationResponse) GetPageSize() int64

func (*PaginationResponse) GetTotalCount

func (x *PaginationResponse) GetTotalCount() int64

func (*PaginationResponse) ProtoMessage

func (*PaginationResponse) ProtoMessage()

func (*PaginationResponse) ProtoReflect

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

func (*PaginationResponse) Reset

func (x *PaginationResponse) Reset()

func (*PaginationResponse) String

func (x *PaginationResponse) String() string

func (*PaginationResponse) Update

func (p *PaginationResponse) Update(length int)

func (*PaginationResponse) UpdateWithTotalCount added in v0.8.21

func (p *PaginationResponse) UpdateWithTotalCount(totalCount int64, length int)

func (*PaginationResponse) Validate

func (m *PaginationResponse) Validate() error

Validate checks the field values on PaginationResponse 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 (*PaginationResponse) ValidateAll

func (m *PaginationResponse) ValidateAll() error

ValidateAll checks the field values on PaginationResponse 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 PaginationResponseMultiError, or nil if none found.

type PaginationResponseMultiError

type PaginationResponseMultiError []error

PaginationResponseMultiError is an error wrapping multiple validation errors returned by PaginationResponse.ValidateAll() if the designated constraints aren't met.

func (PaginationResponseMultiError) AllErrors

func (m PaginationResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PaginationResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type PaginationResponseValidationError

type PaginationResponseValidationError struct {
	// contains filtered or unexported fields
}

PaginationResponseValidationError is the validation error returned by PaginationResponse.Validate if the designated constraints aren't met.

func (PaginationResponseValidationError) Cause

Cause function returns cause value.

func (PaginationResponseValidationError) Error

Error satisfies the builtin error interface

func (PaginationResponseValidationError) ErrorName

ErrorName returns error name.

func (PaginationResponseValidationError) Field

Field function returns field value.

func (PaginationResponseValidationError) Key

Key function returns key value.

func (PaginationResponseValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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