common

package
v0.0.0-...-9139306 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Order_name = map[int32]string{
		0: "ASC",
		1: "DESC",
	}
	Order_value = map[string]int32{
		"ASC":  0,
		"DESC": 1,
	}
)

Enum value maps for Order.

View Source
var File_common_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CommonCreate

type CommonCreate struct {
	Id        string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
	// contains filtered or unexported fields
}

func (*CommonCreate) Descriptor deprecated

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

Deprecated: Use CommonCreate.ProtoReflect.Descriptor instead.

func (*CommonCreate) GetCreatedAt

func (x *CommonCreate) GetCreatedAt() *timestamppb.Timestamp

func (*CommonCreate) GetId

func (x *CommonCreate) GetId() string

func (*CommonCreate) GetUpdatedAt

func (x *CommonCreate) GetUpdatedAt() *timestamppb.Timestamp

func (*CommonCreate) ProtoMessage

func (*CommonCreate) ProtoMessage()

func (*CommonCreate) ProtoReflect

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

func (*CommonCreate) Reset

func (x *CommonCreate) Reset()

func (*CommonCreate) String

func (x *CommonCreate) String() string

func (*CommonCreate) Validate

func (m *CommonCreate) Validate() error

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

func (m *CommonCreate) ValidateAll() error

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

type CommonCreateMultiError

type CommonCreateMultiError []error

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

func (CommonCreateMultiError) AllErrors

func (m CommonCreateMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CommonCreateMultiError) Error

func (m CommonCreateMultiError) Error() string

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

type CommonCreateValidationError

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

CommonCreateValidationError is the validation error returned by CommonCreate.Validate if the designated constraints aren't met.

func (CommonCreateValidationError) Cause

Cause function returns cause value.

func (CommonCreateValidationError) Error

Error satisfies the builtin error interface

func (CommonCreateValidationError) ErrorName

func (e CommonCreateValidationError) ErrorName() string

ErrorName returns error name.

func (CommonCreateValidationError) Field

Field function returns field value.

func (CommonCreateValidationError) Key

Key function returns key value.

func (CommonCreateValidationError) Reason

Reason function returns reason value.

type CommonDeletesRequest

type CommonDeletesRequest struct {
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

func (*CommonDeletesRequest) Descriptor deprecated

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

Deprecated: Use CommonDeletesRequest.ProtoReflect.Descriptor instead.

func (*CommonDeletesRequest) GetIds

func (x *CommonDeletesRequest) GetIds() []string

func (*CommonDeletesRequest) ProtoMessage

func (*CommonDeletesRequest) ProtoMessage()

func (*CommonDeletesRequest) ProtoReflect

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

func (*CommonDeletesRequest) Reset

func (x *CommonDeletesRequest) Reset()

func (*CommonDeletesRequest) String

func (x *CommonDeletesRequest) String() string

func (*CommonDeletesRequest) Validate

func (m *CommonDeletesRequest) Validate() error

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

func (m *CommonDeletesRequest) ValidateAll() error

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

type CommonDeletesRequestMultiError

type CommonDeletesRequestMultiError []error

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

func (CommonDeletesRequestMultiError) AllErrors

func (m CommonDeletesRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CommonDeletesRequestMultiError) Error

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

type CommonDeletesRequestValidationError

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

CommonDeletesRequestValidationError is the validation error returned by CommonDeletesRequest.Validate if the designated constraints aren't met.

func (CommonDeletesRequestValidationError) Cause

Cause function returns cause value.

func (CommonDeletesRequestValidationError) Error

Error satisfies the builtin error interface

func (CommonDeletesRequestValidationError) ErrorName

ErrorName returns error name.

func (CommonDeletesRequestValidationError) Field

Field function returns field value.

func (CommonDeletesRequestValidationError) Key

Key function returns key value.

func (CommonDeletesRequestValidationError) Reason

Reason function returns reason value.

type CommonUpdate

type CommonUpdate struct {
	Id        string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
	// contains filtered or unexported fields
}

func (*CommonUpdate) Descriptor deprecated

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

Deprecated: Use CommonUpdate.ProtoReflect.Descriptor instead.

func (*CommonUpdate) GetId

func (x *CommonUpdate) GetId() string

func (*CommonUpdate) GetUpdatedAt

func (x *CommonUpdate) GetUpdatedAt() *timestamppb.Timestamp

func (*CommonUpdate) ProtoMessage

func (*CommonUpdate) ProtoMessage()

func (*CommonUpdate) ProtoReflect

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

func (*CommonUpdate) Reset

func (x *CommonUpdate) Reset()

func (*CommonUpdate) String

func (x *CommonUpdate) String() string

func (*CommonUpdate) Validate

func (m *CommonUpdate) Validate() error

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

func (m *CommonUpdate) ValidateAll() error

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

type CommonUpdateMultiError

type CommonUpdateMultiError []error

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

func (CommonUpdateMultiError) AllErrors

func (m CommonUpdateMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CommonUpdateMultiError) Error

func (m CommonUpdateMultiError) Error() string

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

type CommonUpdateValidationError

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

CommonUpdateValidationError is the validation error returned by CommonUpdate.Validate if the designated constraints aren't met.

func (CommonUpdateValidationError) Cause

Cause function returns cause value.

func (CommonUpdateValidationError) Error

Error satisfies the builtin error interface

func (CommonUpdateValidationError) ErrorName

func (e CommonUpdateValidationError) ErrorName() string

ErrorName returns error name.

func (CommonUpdateValidationError) Field

Field function returns field value.

func (CommonUpdateValidationError) Key

Key function returns key value.

func (CommonUpdateValidationError) Reason

Reason function returns reason value.

type Order

type Order int32

分页排序

const (
	// 升序
	Order_ASC Order = 0
	// 降序
	Order_DESC Order = 1
)

func (Order) Descriptor

func (Order) Descriptor() protoreflect.EnumDescriptor

func (Order) Enum

func (x Order) Enum() *Order

func (Order) EnumDescriptor deprecated

func (Order) EnumDescriptor() ([]byte, []int)

Deprecated: Use Order.Descriptor instead.

func (Order) Number

func (x Order) Number() protoreflect.EnumNumber

func (Order) String

func (x Order) String() string

func (Order) Type

func (Order) Type() protoreflect.EnumType

type PagingRequest

type PagingRequest struct {

	// 页码
	Page *uint32 `protobuf:"varint,1,opt,name=page,proto3,oneof" json:"page,omitempty"`
	// 每页条目数
	PageSize *uint32 `protobuf:"varint,2,opt,name=pageSize,proto3,oneof" json:"pageSize,omitempty"`
	// 查询参数
	Query map[string]string `` /* 151-byte string literal not displayed */
	// 排序
	OrderBy map[string]Order `` /* 174-byte string literal not displayed */
	// contains filtered or unexported fields
}

分页通用请求

func (*PagingRequest) Descriptor deprecated

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

Deprecated: Use PagingRequest.ProtoReflect.Descriptor instead.

func (*PagingRequest) GetOrderBy

func (x *PagingRequest) GetOrderBy() map[string]Order

func (*PagingRequest) GetPage

func (x *PagingRequest) GetPage() uint32

func (*PagingRequest) GetPageSize

func (x *PagingRequest) GetPageSize() uint32

func (*PagingRequest) GetQuery

func (x *PagingRequest) GetQuery() map[string]string

func (*PagingRequest) ProtoMessage

func (*PagingRequest) ProtoMessage()

func (*PagingRequest) ProtoReflect

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

func (*PagingRequest) Reset

func (x *PagingRequest) Reset()

func (*PagingRequest) String

func (x *PagingRequest) String() string

func (*PagingRequest) Validate

func (m *PagingRequest) Validate() error

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

func (m *PagingRequest) ValidateAll() error

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

type PagingRequestMultiError

type PagingRequestMultiError []error

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

func (PagingRequestMultiError) AllErrors

func (m PagingRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PagingRequestMultiError) Error

func (m PagingRequestMultiError) Error() string

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

type PagingRequestValidationError

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

PagingRequestValidationError is the validation error returned by PagingRequest.Validate if the designated constraints aren't met.

func (PagingRequestValidationError) Cause

Cause function returns cause value.

func (PagingRequestValidationError) Error

Error satisfies the builtin error interface

func (PagingRequestValidationError) ErrorName

func (e PagingRequestValidationError) ErrorName() string

ErrorName returns error name.

func (PagingRequestValidationError) Field

Field function returns field value.

func (PagingRequestValidationError) Key

Key function returns key value.

func (PagingRequestValidationError) Reason

Reason function returns reason value.

type PagingResponse

type PagingResponse struct {
	Total uint32       `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	Items []*anypb.Any `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

分页通用结果

func (*PagingResponse) Descriptor deprecated

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

Deprecated: Use PagingResponse.ProtoReflect.Descriptor instead.

func (*PagingResponse) GetItems

func (x *PagingResponse) GetItems() []*anypb.Any

func (*PagingResponse) GetTotal

func (x *PagingResponse) GetTotal() uint32

func (*PagingResponse) ProtoMessage

func (*PagingResponse) ProtoMessage()

func (*PagingResponse) ProtoReflect

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

func (*PagingResponse) Reset

func (x *PagingResponse) Reset()

func (*PagingResponse) String

func (x *PagingResponse) String() string

func (*PagingResponse) Validate

func (m *PagingResponse) Validate() error

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

func (m *PagingResponse) ValidateAll() error

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

type PagingResponseMultiError

type PagingResponseMultiError []error

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

func (PagingResponseMultiError) AllErrors

func (m PagingResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PagingResponseMultiError) Error

func (m PagingResponseMultiError) Error() string

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

type PagingResponseValidationError

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

PagingResponseValidationError is the validation error returned by PagingResponse.Validate if the designated constraints aren't met.

func (PagingResponseValidationError) Cause

Cause function returns cause value.

func (PagingResponseValidationError) Error

Error satisfies the builtin error interface

func (PagingResponseValidationError) ErrorName

func (e PagingResponseValidationError) ErrorName() string

ErrorName returns error name.

func (PagingResponseValidationError) Field

Field function returns field value.

func (PagingResponseValidationError) Key

Key function returns key value.

func (PagingResponseValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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