Documentation ¶
Index ¶
- Constants
- Variables
- type DataCount
- type DateRange
- func (*DateRange) Descriptor() ([]byte, []int)deprecated
- func (x *DateRange) GetEnd() *timestamp.Timestamp
- func (x *DateRange) GetStart() *timestamp.Timestamp
- func (*DateRange) ProtoMessage()
- func (x *DateRange) ProtoReflect() protoreflect.Message
- func (x *DateRange) Reset()
- func (x *DateRange) String() string
- func (m *DateRange) Validate() error
- func (m *DateRange) ValidateAll() error
- type DateRangeMultiError
- type DateRangeValidationError
- type PaginationRequest
- func (*PaginationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PaginationRequest) GetOffset() int64
- func (x *PaginationRequest) GetPageSize() int64
- func (p *PaginationRequest) GetResponse(totalCount int64) (*PaginationResponse, int64)
- func (p *PaginationRequest) GetResponseWithPageSize(totalCount int64, maxPageSize int64) (*PaginationResponse, int64)
- func (*PaginationRequest) ProtoMessage()
- func (x *PaginationRequest) ProtoReflect() protoreflect.Message
- func (x *PaginationRequest) Reset()
- func (x *PaginationRequest) String() string
- func (m *PaginationRequest) Validate() error
- func (m *PaginationRequest) ValidateAll() error
- type PaginationRequestMultiError
- type PaginationRequestValidationError
- func (e PaginationRequestValidationError) Cause() error
- func (e PaginationRequestValidationError) Error() string
- func (e PaginationRequestValidationError) ErrorName() string
- func (e PaginationRequestValidationError) Field() string
- func (e PaginationRequestValidationError) Key() bool
- func (e PaginationRequestValidationError) Reason() string
- type PaginationResponse
- func (*PaginationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PaginationResponse) GetEnd() int64
- func (x *PaginationResponse) GetOffset() int64
- func (x *PaginationResponse) GetPageSize() int64
- func (x *PaginationResponse) GetTotalCount() int64
- func (*PaginationResponse) ProtoMessage()
- func (x *PaginationResponse) ProtoReflect() protoreflect.Message
- func (x *PaginationResponse) Reset()
- func (x *PaginationResponse) String() string
- func (p *PaginationResponse) Update(length int)
- func (p *PaginationResponse) UpdateWithTotalCount(totalCount int64, length int)
- func (m *PaginationResponse) Validate() error
- func (m *PaginationResponse) ValidateAll() error
- type PaginationResponseMultiError
- type PaginationResponseValidationError
- func (e PaginationResponseValidationError) Cause() error
- func (e PaginationResponseValidationError) Error() string
- func (e PaginationResponseValidationError) ErrorName() string
- func (e PaginationResponseValidationError) Field() string
- func (e PaginationResponseValidationError) Key() bool
- func (e PaginationResponseValidationError) Reason() string
- type Sort
- func (*Sort) Descriptor() ([]byte, []int)deprecated
- func (x *Sort) GetColumn() string
- func (x *Sort) GetDirection() string
- func (*Sort) ProtoMessage()
- func (x *Sort) ProtoReflect() protoreflect.Message
- func (x *Sort) Reset()
- func (x *Sort) String() string
- func (m *Sort) Validate() error
- func (m *Sort) ValidateAll() error
- type SortMultiError
- type SortValidationError
Constants ¶
const ( DefaultMaxPageSize int64 = 20 NoTotalCount int64 = -1 )
const ( AscSortDirection = "asc" DescSortDirection = "desc" )
Variables ¶
var File_resources_common_database_database_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type DateRange ¶ added in v0.9.3
type DateRange struct { Start *timestamp.Timestamp `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` End *timestamp.Timestamp `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` // contains filtered or unexported fields }
func (*DateRange) Descriptor
deprecated
added in
v0.9.3
func (*DateRange) ProtoMessage ¶ added in v0.9.3
func (*DateRange) ProtoMessage()
func (*DateRange) ProtoReflect ¶ added in v0.9.3
func (x *DateRange) ProtoReflect() protoreflect.Message
func (*DateRange) Validate ¶ added in v0.9.3
Validate checks the field values on DateRange 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 (*DateRange) ValidateAll ¶ added in v0.9.3
ValidateAll checks the field values on DateRange 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 DateRangeMultiError, or nil if none found.
type DateRangeMultiError ¶ added in v0.9.3
type DateRangeMultiError []error
DateRangeMultiError is an error wrapping multiple validation errors returned by DateRange.ValidateAll() if the designated constraints aren't met.
func (DateRangeMultiError) AllErrors ¶ added in v0.9.3
func (m DateRangeMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DateRangeMultiError) Error ¶ added in v0.9.3
func (m DateRangeMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DateRangeValidationError ¶ added in v0.9.3
type DateRangeValidationError struct {
// contains filtered or unexported fields
}
DateRangeValidationError is the validation error returned by DateRange.Validate if the designated constraints aren't met.
func (DateRangeValidationError) Cause ¶ added in v0.9.3
func (e DateRangeValidationError) Cause() error
Cause function returns cause value.
func (DateRangeValidationError) Error ¶ added in v0.9.3
func (e DateRangeValidationError) Error() string
Error satisfies the builtin error interface
func (DateRangeValidationError) ErrorName ¶ added in v0.9.3
func (e DateRangeValidationError) ErrorName() string
ErrorName returns error name.
func (DateRangeValidationError) Field ¶ added in v0.9.3
func (e DateRangeValidationError) Field() string
Field function returns field value.
func (DateRangeValidationError) Key ¶ added in v0.9.3
func (e DateRangeValidationError) Key() bool
Key function returns key value.
func (DateRangeValidationError) Reason ¶ added in v0.9.3
func (e DateRangeValidationError) 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 ¶
func (m PaginationRequestMultiError) Error() string
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 ¶
func (e PaginationRequestValidationError) Cause() error
Cause function returns cause value.
func (PaginationRequestValidationError) Error ¶
func (e PaginationRequestValidationError) Error() string
Error satisfies the builtin error interface
func (PaginationRequestValidationError) ErrorName ¶
func (e PaginationRequestValidationError) ErrorName() string
ErrorName returns error name.
func (PaginationRequestValidationError) Field ¶
func (e PaginationRequestValidationError) Field() string
Field function returns field value.
func (PaginationRequestValidationError) Key ¶
func (e PaginationRequestValidationError) Key() bool
Key function returns key value.
func (PaginationRequestValidationError) Reason ¶
func (e PaginationRequestValidationError) Reason() string
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 ¶
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 ¶
func (m PaginationResponseMultiError) Error() string
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 ¶
func (e PaginationResponseValidationError) Cause() error
Cause function returns cause value.
func (PaginationResponseValidationError) Error ¶
func (e PaginationResponseValidationError) Error() string
Error satisfies the builtin error interface
func (PaginationResponseValidationError) ErrorName ¶
func (e PaginationResponseValidationError) ErrorName() string
ErrorName returns error name.
func (PaginationResponseValidationError) Field ¶
func (e PaginationResponseValidationError) Field() string
Field function returns field value.
func (PaginationResponseValidationError) Key ¶
func (e PaginationResponseValidationError) Key() bool
Key function returns key value.
func (PaginationResponseValidationError) Reason ¶
func (e PaginationResponseValidationError) Reason() string
Reason function returns reason value.
type Sort ¶ added in v0.9.3
type Sort struct { Column string `protobuf:"bytes,1,opt,name=column,proto3" json:"column,omitempty"` Direction string `protobuf:"bytes,2,opt,name=direction,proto3" json:"direction,omitempty"` // contains filtered or unexported fields }
func (*Sort) Descriptor
deprecated
added in
v0.9.3
func (*Sort) GetDirection ¶ added in v0.9.3
func (*Sort) ProtoMessage ¶ added in v0.9.3
func (*Sort) ProtoMessage()
func (*Sort) ProtoReflect ¶ added in v0.9.3
func (x *Sort) ProtoReflect() protoreflect.Message
func (*Sort) Validate ¶ added in v0.9.3
Validate checks the field values on Sort 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 (*Sort) ValidateAll ¶ added in v0.9.3
ValidateAll checks the field values on Sort 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 SortMultiError, or nil if none found.
type SortMultiError ¶ added in v0.9.3
type SortMultiError []error
SortMultiError is an error wrapping multiple validation errors returned by Sort.ValidateAll() if the designated constraints aren't met.
func (SortMultiError) AllErrors ¶ added in v0.9.3
func (m SortMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SortMultiError) Error ¶ added in v0.9.3
func (m SortMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SortValidationError ¶ added in v0.9.3
type SortValidationError struct {
// contains filtered or unexported fields
}
SortValidationError is the validation error returned by Sort.Validate if the designated constraints aren't met.
func (SortValidationError) Cause ¶ added in v0.9.3
func (e SortValidationError) Cause() error
Cause function returns cause value.
func (SortValidationError) Error ¶ added in v0.9.3
func (e SortValidationError) Error() string
Error satisfies the builtin error interface
func (SortValidationError) ErrorName ¶ added in v0.9.3
func (e SortValidationError) ErrorName() string
ErrorName returns error name.
func (SortValidationError) Field ¶ added in v0.9.3
func (e SortValidationError) Field() string
Field function returns field value.
func (SortValidationError) Key ¶ added in v0.9.3
func (e SortValidationError) Key() bool
Key function returns key value.
func (SortValidationError) Reason ¶ added in v0.9.3
func (e SortValidationError) Reason() string
Reason function returns reason value.