v1

package
v0.2.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CacheServer_Set_FullMethodName       = "/cacheserver.v1.CacheServer/Set"
	CacheServer_Get_FullMethodName       = "/cacheserver.v1.CacheServer/Get"
	CacheServer_Del_FullMethodName       = "/cacheserver.v1.CacheServer/Del"
	CacheServer_SetSecret_FullMethodName = "/cacheserver.v1.CacheServer/SetSecret"
	CacheServer_GetSecret_FullMethodName = "/cacheserver.v1.CacheServer/GetSecret"
	CacheServer_DelSecret_FullMethodName = "/cacheserver.v1.CacheServer/DelSecret"
)

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "OrderNotFound",
		1: "OrderAlreadyExists",
		2: "OrderCreateFailed",
	}
	ErrorReason_value = map[string]int32{
		"OrderNotFound":      0,
		"OrderAlreadyExists": 1,
		"OrderCreateFailed":  2,
	}
)

Enum value maps for ErrorReason.

View Source
var CacheServer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cacheserver.v1.CacheServer",
	HandlerType: (*CacheServerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Set",
			Handler:    _CacheServer_Set_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _CacheServer_Get_Handler,
		},
		{
			MethodName: "Del",
			Handler:    _CacheServer_Del_Handler,
		},
		{
			MethodName: "SetSecret",
			Handler:    _CacheServer_SetSecret_Handler,
		},
		{
			MethodName: "GetSecret",
			Handler:    _CacheServer_GetSecret_Handler,
		},
		{
			MethodName: "DelSecret",
			Handler:    _CacheServer_DelSecret_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cacheserver/v1/cacheserver.proto",
}

CacheServer_ServiceDesc is the grpc.ServiceDesc for CacheServer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_cacheserver_v1_cacheserver_proto protoreflect.FileDescriptor
View Source
var File_cacheserver_v1_errors_proto protoreflect.FileDescriptor

Functions

func ErrorOrderAlreadyExists

func ErrorOrderAlreadyExists(format string, args ...interface{}) *errors.Error

订单已存在,无法创建用户

func ErrorOrderCreateFailed

func ErrorOrderCreateFailed(format string, args ...interface{}) *errors.Error

创建订单失败,可能是由于服务器或其他问题导致的创建过程中的错误

func ErrorOrderNotFound

func ErrorOrderNotFound(format string, args ...interface{}) *errors.Error

订单找不到 ,可能是订单不存在或输入的订单标识有误

func IsOrderAlreadyExists

func IsOrderAlreadyExists(err error) bool

订单已存在,无法创建用户

func IsOrderCreateFailed

func IsOrderCreateFailed(err error) bool

创建订单失败,可能是由于服务器或其他问题导致的创建过程中的错误

func IsOrderNotFound

func IsOrderNotFound(err error) bool

订单找不到 ,可能是订单不存在或输入的订单标识有误

func RegisterCacheServerServer

func RegisterCacheServerServer(s grpc.ServiceRegistrar, srv CacheServerServer)

Types

type CacheServerClient

type CacheServerClient interface {
	Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	Del(ctx context.Context, in *DelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	SetSecret(ctx context.Context, in *SetSecretRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetSecret(ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption) (*GetSecretResponse, error)
	DelSecret(ctx context.Context, in *DelSecretRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

CacheServerClient is the client API for CacheServer service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type CacheServerServer

type CacheServerServer interface {
	Set(context.Context, *SetRequest) (*emptypb.Empty, error)
	Get(context.Context, *GetRequest) (*GetResponse, error)
	Del(context.Context, *DelRequest) (*emptypb.Empty, error)
	SetSecret(context.Context, *SetSecretRequest) (*emptypb.Empty, error)
	GetSecret(context.Context, *GetSecretRequest) (*GetSecretResponse, error)
	DelSecret(context.Context, *DelSecretRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

CacheServerServer is the server API for CacheServer service. All implementations must embed UnimplementedCacheServerServer for forward compatibility.

type DelRequest

type DelRequest struct {
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Key       string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*DelRequest) Descriptor deprecated

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

Deprecated: Use DelRequest.ProtoReflect.Descriptor instead.

func (*DelRequest) GetKey

func (x *DelRequest) GetKey() string

func (*DelRequest) GetNamespace

func (x *DelRequest) GetNamespace() string

func (*DelRequest) ProtoMessage

func (*DelRequest) ProtoMessage()

func (*DelRequest) ProtoReflect

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

func (*DelRequest) Reset

func (x *DelRequest) Reset()

func (*DelRequest) String

func (x *DelRequest) String() string

func (*DelRequest) Validate

func (m *DelRequest) Validate() error

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

func (m *DelRequest) ValidateAll() error

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

type DelRequestMultiError

type DelRequestMultiError []error

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

func (DelRequestMultiError) AllErrors

func (m DelRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DelRequestMultiError) Error

func (m DelRequestMultiError) Error() string

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

type DelRequestValidationError

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

DelRequestValidationError is the validation error returned by DelRequest.Validate if the designated constraints aren't met.

func (DelRequestValidationError) Cause

func (e DelRequestValidationError) Cause() error

Cause function returns cause value.

func (DelRequestValidationError) Error

Error satisfies the builtin error interface

func (DelRequestValidationError) ErrorName

func (e DelRequestValidationError) ErrorName() string

ErrorName returns error name.

func (DelRequestValidationError) Field

Field function returns field value.

func (DelRequestValidationError) Key

Key function returns key value.

func (DelRequestValidationError) Reason

func (e DelRequestValidationError) Reason() string

Reason function returns reason value.

type DelSecretRequest

type DelSecretRequest struct {
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*DelSecretRequest) Descriptor deprecated

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

Deprecated: Use DelSecretRequest.ProtoReflect.Descriptor instead.

func (*DelSecretRequest) GetKey

func (x *DelSecretRequest) GetKey() string

func (*DelSecretRequest) ProtoMessage

func (*DelSecretRequest) ProtoMessage()

func (*DelSecretRequest) ProtoReflect

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

func (*DelSecretRequest) Reset

func (x *DelSecretRequest) Reset()

func (*DelSecretRequest) String

func (x *DelSecretRequest) String() string

func (*DelSecretRequest) Validate

func (m *DelSecretRequest) Validate() error

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

func (m *DelSecretRequest) ValidateAll() error

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

type DelSecretRequestMultiError

type DelSecretRequestMultiError []error

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

func (DelSecretRequestMultiError) AllErrors

func (m DelSecretRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DelSecretRequestMultiError) Error

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

type DelSecretRequestValidationError

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

DelSecretRequestValidationError is the validation error returned by DelSecretRequest.Validate if the designated constraints aren't met.

func (DelSecretRequestValidationError) Cause

Cause function returns cause value.

func (DelSecretRequestValidationError) Error

Error satisfies the builtin error interface

func (DelSecretRequestValidationError) ErrorName

ErrorName returns error name.

func (DelSecretRequestValidationError) Field

Field function returns field value.

func (DelSecretRequestValidationError) Key

Key function returns key value.

func (DelSecretRequestValidationError) Reason

Reason function returns reason value.

type ErrorReason

type ErrorReason int32
const (
	// 订单找不到 ,可能是订单不存在或输入的订单标识有误
	ErrorReason_OrderNotFound ErrorReason = 0
	// 订单已存在,无法创建用户
	ErrorReason_OrderAlreadyExists ErrorReason = 1
	// 创建订单失败,可能是由于服务器或其他问题导致的创建过程中的错误
	ErrorReason_OrderCreateFailed ErrorReason = 2
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

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

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

type GetRequest

type GetRequest struct {
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Key       string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetKey

func (x *GetRequest) GetKey() string

func (*GetRequest) GetNamespace

func (x *GetRequest) GetNamespace() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

func (*GetRequest) Validate

func (m *GetRequest) Validate() error

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

func (m *GetRequest) ValidateAll() error

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

type GetRequestMultiError

type GetRequestMultiError []error

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

func (GetRequestMultiError) AllErrors

func (m GetRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetRequestMultiError) Error

func (m GetRequestMultiError) Error() string

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

type GetRequestValidationError

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

GetRequestValidationError is the validation error returned by GetRequest.Validate if the designated constraints aren't met.

func (GetRequestValidationError) Cause

func (e GetRequestValidationError) Cause() error

Cause function returns cause value.

func (GetRequestValidationError) Error

Error satisfies the builtin error interface

func (GetRequestValidationError) ErrorName

func (e GetRequestValidationError) ErrorName() string

ErrorName returns error name.

func (GetRequestValidationError) Field

Field function returns field value.

func (GetRequestValidationError) Key

Key function returns key value.

func (GetRequestValidationError) Reason

func (e GetRequestValidationError) Reason() string

Reason function returns reason value.

type GetResponse

type GetResponse struct {
	Value  *anypb.Any           `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	Expire *durationpb.Duration `protobuf:"bytes,2,opt,name=expire,proto3" json:"expire,omitempty"`
	// contains filtered or unexported fields
}

func (*GetResponse) Descriptor deprecated

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

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetExpire

func (x *GetResponse) GetExpire() *durationpb.Duration

func (*GetResponse) GetValue

func (x *GetResponse) GetValue() *anypb.Any

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

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

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

func (*GetResponse) Validate

func (m *GetResponse) Validate() error

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

func (m *GetResponse) ValidateAll() error

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

type GetResponseMultiError

type GetResponseMultiError []error

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

func (GetResponseMultiError) AllErrors

func (m GetResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetResponseMultiError) Error

func (m GetResponseMultiError) Error() string

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

type GetResponseValidationError

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

GetResponseValidationError is the validation error returned by GetResponse.Validate if the designated constraints aren't met.

func (GetResponseValidationError) Cause

Cause function returns cause value.

func (GetResponseValidationError) Error

Error satisfies the builtin error interface

func (GetResponseValidationError) ErrorName

func (e GetResponseValidationError) ErrorName() string

ErrorName returns error name.

func (GetResponseValidationError) Field

Field function returns field value.

func (GetResponseValidationError) Key

Key function returns key value.

func (GetResponseValidationError) Reason

Reason function returns reason value.

type GetSecretRequest

type GetSecretRequest struct {
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSecretRequest) Descriptor deprecated

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

Deprecated: Use GetSecretRequest.ProtoReflect.Descriptor instead.

func (*GetSecretRequest) GetKey

func (x *GetSecretRequest) GetKey() string

func (*GetSecretRequest) ProtoMessage

func (*GetSecretRequest) ProtoMessage()

func (*GetSecretRequest) ProtoReflect

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

func (*GetSecretRequest) Reset

func (x *GetSecretRequest) Reset()

func (*GetSecretRequest) String

func (x *GetSecretRequest) String() string

func (*GetSecretRequest) Validate

func (m *GetSecretRequest) Validate() error

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

func (m *GetSecretRequest) ValidateAll() error

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

type GetSecretRequestMultiError

type GetSecretRequestMultiError []error

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

func (GetSecretRequestMultiError) AllErrors

func (m GetSecretRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetSecretRequestMultiError) Error

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

type GetSecretRequestValidationError

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

GetSecretRequestValidationError is the validation error returned by GetSecretRequest.Validate if the designated constraints aren't met.

func (GetSecretRequestValidationError) Cause

Cause function returns cause value.

func (GetSecretRequestValidationError) Error

Error satisfies the builtin error interface

func (GetSecretRequestValidationError) ErrorName

ErrorName returns error name.

func (GetSecretRequestValidationError) Field

Field function returns field value.

func (GetSecretRequestValidationError) Key

Key function returns key value.

func (GetSecretRequestValidationError) Reason

Reason function returns reason value.

type GetSecretResponse

type GetSecretResponse struct {
	UserID      string                 `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
	Name        string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	SecretID    string                 `protobuf:"bytes,3,opt,name=secretID,proto3" json:"secretID,omitempty"`
	SecretKey   string                 `protobuf:"bytes,4,opt,name=secretKey,proto3" json:"secretKey,omitempty"`
	Expires     int64                  `protobuf:"varint,5,opt,name=expires,proto3" json:"expires,omitempty"`
	Status      int32                  `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"`
	Description string                 `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"`
	CreatedAt   *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
	UpdatedAt   *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSecretResponse) Descriptor deprecated

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

Deprecated: Use GetSecretResponse.ProtoReflect.Descriptor instead.

func (*GetSecretResponse) GetCreatedAt

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

func (*GetSecretResponse) GetDescription

func (x *GetSecretResponse) GetDescription() string

func (*GetSecretResponse) GetExpires

func (x *GetSecretResponse) GetExpires() int64

func (*GetSecretResponse) GetName

func (x *GetSecretResponse) GetName() string

func (*GetSecretResponse) GetSecretID

func (x *GetSecretResponse) GetSecretID() string

func (*GetSecretResponse) GetSecretKey

func (x *GetSecretResponse) GetSecretKey() string

func (*GetSecretResponse) GetStatus

func (x *GetSecretResponse) GetStatus() int32

func (*GetSecretResponse) GetUpdatedAt

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

func (*GetSecretResponse) GetUserID

func (x *GetSecretResponse) GetUserID() string

func (*GetSecretResponse) ProtoMessage

func (*GetSecretResponse) ProtoMessage()

func (*GetSecretResponse) ProtoReflect

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

func (*GetSecretResponse) Reset

func (x *GetSecretResponse) Reset()

func (*GetSecretResponse) String

func (x *GetSecretResponse) String() string

func (*GetSecretResponse) Validate

func (m *GetSecretResponse) Validate() error

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

func (m *GetSecretResponse) ValidateAll() error

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

type GetSecretResponseMultiError

type GetSecretResponseMultiError []error

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

func (GetSecretResponseMultiError) AllErrors

func (m GetSecretResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetSecretResponseMultiError) Error

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

type GetSecretResponseValidationError

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

GetSecretResponseValidationError is the validation error returned by GetSecretResponse.Validate if the designated constraints aren't met.

func (GetSecretResponseValidationError) Cause

Cause function returns cause value.

func (GetSecretResponseValidationError) Error

Error satisfies the builtin error interface

func (GetSecretResponseValidationError) ErrorName

ErrorName returns error name.

func (GetSecretResponseValidationError) Field

Field function returns field value.

func (GetSecretResponseValidationError) Key

Key function returns key value.

func (GetSecretResponseValidationError) Reason

Reason function returns reason value.

type SetRequest

type SetRequest struct {
	Namespace string               `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Key       string               `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Value     *anypb.Any           `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	Expire    *durationpb.Duration `protobuf:"bytes,4,opt,name=expire,proto3,oneof" json:"expire,omitempty"`
	// contains filtered or unexported fields
}

func (*SetRequest) Descriptor deprecated

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

Deprecated: Use SetRequest.ProtoReflect.Descriptor instead.

func (*SetRequest) GetExpire

func (x *SetRequest) GetExpire() *durationpb.Duration

func (*SetRequest) GetKey

func (x *SetRequest) GetKey() string

func (*SetRequest) GetNamespace

func (x *SetRequest) GetNamespace() string

func (*SetRequest) GetValue

func (x *SetRequest) GetValue() *anypb.Any

func (*SetRequest) ProtoMessage

func (*SetRequest) ProtoMessage()

func (*SetRequest) ProtoReflect

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

func (*SetRequest) Reset

func (x *SetRequest) Reset()

func (*SetRequest) String

func (x *SetRequest) String() string

func (*SetRequest) Validate

func (m *SetRequest) Validate() error

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

func (m *SetRequest) ValidateAll() error

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

type SetRequestMultiError

type SetRequestMultiError []error

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

func (SetRequestMultiError) AllErrors

func (m SetRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SetRequestMultiError) Error

func (m SetRequestMultiError) Error() string

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

type SetRequestValidationError

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

SetRequestValidationError is the validation error returned by SetRequest.Validate if the designated constraints aren't met.

func (SetRequestValidationError) Cause

func (e SetRequestValidationError) Cause() error

Cause function returns cause value.

func (SetRequestValidationError) Error

Error satisfies the builtin error interface

func (SetRequestValidationError) ErrorName

func (e SetRequestValidationError) ErrorName() string

ErrorName returns error name.

func (SetRequestValidationError) Field

Field function returns field value.

func (SetRequestValidationError) Key

Key function returns key value.

func (SetRequestValidationError) Reason

func (e SetRequestValidationError) Reason() string

Reason function returns reason value.

type SetSecretRequest

type SetSecretRequest struct {
	Key         string               `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Name        string               `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Expire      *durationpb.Duration `protobuf:"bytes,3,opt,name=expire,proto3,oneof" json:"expire,omitempty"`
	Description string               `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*SetSecretRequest) Descriptor deprecated

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

Deprecated: Use SetSecretRequest.ProtoReflect.Descriptor instead.

func (*SetSecretRequest) GetDescription

func (x *SetSecretRequest) GetDescription() string

func (*SetSecretRequest) GetExpire

func (x *SetSecretRequest) GetExpire() *durationpb.Duration

func (*SetSecretRequest) GetKey

func (x *SetSecretRequest) GetKey() string

func (*SetSecretRequest) GetName

func (x *SetSecretRequest) GetName() string

func (*SetSecretRequest) ProtoMessage

func (*SetSecretRequest) ProtoMessage()

func (*SetSecretRequest) ProtoReflect

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

func (*SetSecretRequest) Reset

func (x *SetSecretRequest) Reset()

func (*SetSecretRequest) String

func (x *SetSecretRequest) String() string

func (*SetSecretRequest) Validate

func (m *SetSecretRequest) Validate() error

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

func (m *SetSecretRequest) ValidateAll() error

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

type SetSecretRequestMultiError

type SetSecretRequestMultiError []error

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

func (SetSecretRequestMultiError) AllErrors

func (m SetSecretRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SetSecretRequestMultiError) Error

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

type SetSecretRequestValidationError

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

SetSecretRequestValidationError is the validation error returned by SetSecretRequest.Validate if the designated constraints aren't met.

func (SetSecretRequestValidationError) Cause

Cause function returns cause value.

func (SetSecretRequestValidationError) Error

Error satisfies the builtin error interface

func (SetSecretRequestValidationError) ErrorName

ErrorName returns error name.

func (SetSecretRequestValidationError) Field

Field function returns field value.

func (SetSecretRequestValidationError) Key

Key function returns key value.

func (SetSecretRequestValidationError) Reason

Reason function returns reason value.

type UnimplementedCacheServerServer

type UnimplementedCacheServerServer struct{}

UnimplementedCacheServerServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedCacheServerServer) Del

func (UnimplementedCacheServerServer) DelSecret

func (UnimplementedCacheServerServer) Get

func (UnimplementedCacheServerServer) GetSecret

func (UnimplementedCacheServerServer) Set

func (UnimplementedCacheServerServer) SetSecret

type UnsafeCacheServerServer

type UnsafeCacheServerServer interface {
	// contains filtered or unexported methods
}

UnsafeCacheServerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CacheServerServer will result in compilation errors.

Jump to

Keyboard shortcuts

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