database

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxPageSize int64 = 20
	NoTotalCount       int64 = -1
)
View Source
const (
	AscSortDirection  = "asc"
	DescSortDirection = "desc"
)

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

Deprecated: Use DateRange.ProtoReflect.Descriptor instead.

func (*DateRange) GetEnd added in v0.9.3

func (x *DateRange) GetEnd() *timestamp.Timestamp

func (*DateRange) GetStart added in v0.9.3

func (x *DateRange) GetStart() *timestamp.Timestamp

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) Reset added in v0.9.3

func (x *DateRange) Reset()

func (*DateRange) String added in v0.9.3

func (x *DateRange) String() string

func (*DateRange) Validate added in v0.9.3

func (m *DateRange) Validate() error

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

func (m *DateRange) ValidateAll() error

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

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

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

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.

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

Deprecated: Use Sort.ProtoReflect.Descriptor instead.

func (*Sort) GetColumn added in v0.9.3

func (x *Sort) GetColumn() string

func (*Sort) GetDirection added in v0.9.3

func (x *Sort) GetDirection() string

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) Reset added in v0.9.3

func (x *Sort) Reset()

func (*Sort) String added in v0.9.3

func (x *Sort) String() string

func (*Sort) Validate added in v0.9.3

func (m *Sort) Validate() error

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

func (m *Sort) ValidateAll() error

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.

Jump to

Keyboard shortcuts

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