Documentation ¶
Overview ¶
Package middleware is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterMiddlewareServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMiddlewareServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MiddlewareServiceClient) error
- func RegisterMiddlewareServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMiddlewareServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MiddlewareServiceServer) error
- func RegisterMiddlewareServiceServer(s grpc.ServiceRegistrar, srv MiddlewareServiceServer)
- type Claim
- func (*Claim) Descriptor() ([]byte, []int)deprecated
- func (x *Claim) GetAppid() string
- func (x *Claim) GetCreatedAt() *timestamppb.Timestamp
- func (x *Claim) GetId() string
- func (x *Claim) GetInstance() string
- func (x *Claim) GetName() string
- func (x *Claim) GetPolicy() Claim_Policy
- func (x *Claim) GetStatus() Claim_Status
- func (x *Claim) GetType() string
- func (x *Claim) GetUpdatedAt() *timestamppb.Timestamp
- func (*Claim) ProtoMessage()
- func (x *Claim) ProtoReflect() protoreflect.Message
- func (x *Claim) Reset()
- func (x *Claim) String() string
- func (m *Claim) Validate() error
- func (m *Claim) ValidateAll() error
- type ClaimMultiError
- type ClaimValidationError
- type Claim_Policy
- func (Claim_Policy) Descriptor() protoreflect.EnumDescriptor
- func (x Claim_Policy) Enum() *Claim_Policy
- func (Claim_Policy) EnumDescriptor() ([]byte, []int)deprecated
- func (x Claim_Policy) Number() protoreflect.EnumNumber
- func (x Claim_Policy) String() string
- func (Claim_Policy) Type() protoreflect.EnumType
- type Claim_Status
- func (Claim_Status) Descriptor() protoreflect.EnumDescriptor
- func (x Claim_Status) Enum() *Claim_Status
- func (Claim_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x Claim_Status) Number() protoreflect.EnumNumber
- func (x Claim_Status) String() string
- func (Claim_Status) Type() protoreflect.EnumType
- type ClaimsRequest
- func (*ClaimsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ClaimsRequest) GetType() string
- func (*ClaimsRequest) ProtoMessage()
- func (x *ClaimsRequest) ProtoReflect() protoreflect.Message
- func (x *ClaimsRequest) Reset()
- func (x *ClaimsRequest) String() string
- func (m *ClaimsRequest) Validate() error
- func (m *ClaimsRequest) ValidateAll() error
- type ClaimsRequestMultiError
- type ClaimsRequestValidationError
- func (e ClaimsRequestValidationError) Cause() error
- func (e ClaimsRequestValidationError) Error() string
- func (e ClaimsRequestValidationError) ErrorName() string
- func (e ClaimsRequestValidationError) Field() string
- func (e ClaimsRequestValidationError) Key() bool
- func (e ClaimsRequestValidationError) Reason() string
- type ClaimsResponse
- func (*ClaimsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ClaimsResponse) GetItems() []*Claim
- func (x *ClaimsResponse) GetTotal() int64
- func (*ClaimsResponse) ProtoMessage()
- func (x *ClaimsResponse) ProtoReflect() protoreflect.Message
- func (x *ClaimsResponse) Reset()
- func (x *ClaimsResponse) String() string
- func (m *ClaimsResponse) Validate() error
- func (m *ClaimsResponse) ValidateAll() error
- type ClaimsResponseMultiError
- type ClaimsResponseValidationError
- func (e ClaimsResponseValidationError) Cause() error
- func (e ClaimsResponseValidationError) Error() string
- func (e ClaimsResponseValidationError) ErrorName() string
- func (e ClaimsResponseValidationError) Field() string
- func (e ClaimsResponseValidationError) Key() bool
- func (e ClaimsResponseValidationError) Reason() string
- type Instance
- func (*Instance) Descriptor() ([]byte, []int)deprecated
- func (x *Instance) GetCreatedAt() *timestamppb.Timestamp
- func (x *Instance) GetEnv() string
- func (x *Instance) GetId() string
- func (x *Instance) GetName() string
- func (x *Instance) GetProperties() map[string]string
- func (x *Instance) GetStatus() kiae.OpStatus
- func (x *Instance) GetType() string
- func (x *Instance) GetUpdatedAt() *timestamppb.Timestamp
- func (*Instance) ProtoMessage()
- func (x *Instance) ProtoReflect() protoreflect.Message
- func (x *Instance) Reset()
- func (x *Instance) String() string
- func (m *Instance) Validate() error
- func (m *Instance) ValidateAll() error
- type InstanceMultiError
- type InstanceValidationError
- type ListRequest
- func (*ListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRequest) GetType() string
- func (*ListRequest) ProtoMessage()
- func (x *ListRequest) ProtoReflect() protoreflect.Message
- func (x *ListRequest) Reset()
- func (x *ListRequest) String() string
- func (m *ListRequest) Validate() error
- func (m *ListRequest) ValidateAll() error
- type ListRequestMultiError
- type ListRequestValidationError
- func (e ListRequestValidationError) Cause() error
- func (e ListRequestValidationError) Error() string
- func (e ListRequestValidationError) ErrorName() string
- func (e ListRequestValidationError) Field() string
- func (e ListRequestValidationError) Key() bool
- func (e ListRequestValidationError) Reason() string
- type ListResponse
- func (*ListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListResponse) GetItems() []*Instance
- func (x *ListResponse) GetTotal() int64
- func (*ListResponse) ProtoMessage()
- func (x *ListResponse) ProtoReflect() protoreflect.Message
- func (x *ListResponse) Reset()
- func (x *ListResponse) String() string
- func (m *ListResponse) Validate() error
- func (m *ListResponse) ValidateAll() error
- type ListResponseMultiError
- type ListResponseValidationError
- func (e ListResponseValidationError) Cause() error
- func (e ListResponseValidationError) Error() string
- func (e ListResponseValidationError) ErrorName() string
- func (e ListResponseValidationError) Field() string
- func (e ListResponseValidationError) Key() bool
- func (e ListResponseValidationError) Reason() string
- type MiddlewareServiceClient
- type MiddlewareServiceServer
- type UnimplementedMiddlewareServiceServer
- func (UnimplementedMiddlewareServiceServer) ClaimCreate(context.Context, *Claim) (*Claim, error)
- func (UnimplementedMiddlewareServiceServer) ClaimDelete(context.Context, *kiae.IdRequest) (*emptypb.Empty, error)
- func (UnimplementedMiddlewareServiceServer) ClaimUpdate(context.Context, *Claim) (*Claim, error)
- func (UnimplementedMiddlewareServiceServer) Claims(context.Context, *ClaimsRequest) (*ClaimsResponse, error)
- func (UnimplementedMiddlewareServiceServer) Create(context.Context, *Instance) (*Instance, error)
- func (UnimplementedMiddlewareServiceServer) Delete(context.Context, *kiae.IdRequest) (*emptypb.Empty, error)
- func (UnimplementedMiddlewareServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
- func (UnimplementedMiddlewareServiceServer) Update(context.Context, *Instance) (*Instance, error)
- type UnsafeMiddlewareServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( Claim_Policy_name = map[int32]string{ 0: "REUSE", 1: "CREATE", } Claim_Policy_value = map[string]int32{ "REUSE": 0, "CREATE": 1, } )
Enum value maps for Claim_Policy.
var ( Claim_Status_name = map[int32]string{ 0: "UNBOUND", 1: "BOUND", } Claim_Status_value = map[string]int32{ "UNBOUND": 0, "BOUND": 1, } )
Enum value maps for Claim_Status.
var File_middleware_middleware_proto protoreflect.FileDescriptor
var MiddlewareService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "middleware.MiddlewareService", HandlerType: (*MiddlewareServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "List", Handler: _MiddlewareService_List_Handler, }, { MethodName: "Create", Handler: _MiddlewareService_Create_Handler, }, { MethodName: "Update", Handler: _MiddlewareService_Update_Handler, }, { MethodName: "Delete", Handler: _MiddlewareService_Delete_Handler, }, { MethodName: "Claims", Handler: _MiddlewareService_Claims_Handler, }, { MethodName: "ClaimCreate", Handler: _MiddlewareService_ClaimCreate_Handler, }, { MethodName: "ClaimUpdate", Handler: _MiddlewareService_ClaimUpdate_Handler, }, { MethodName: "ClaimDelete", Handler: _MiddlewareService_ClaimDelete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "middleware/middleware.proto", }
MiddlewareService_ServiceDesc is the grpc.ServiceDesc for MiddlewareService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMiddlewareServiceHandler ¶
func RegisterMiddlewareServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMiddlewareServiceHandler registers the http handlers for service MiddlewareService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMiddlewareServiceHandlerClient ¶
func RegisterMiddlewareServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MiddlewareServiceClient) error
RegisterMiddlewareServiceHandlerClient registers the http handlers for service MiddlewareService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MiddlewareServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MiddlewareServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MiddlewareServiceClient" to call the correct interceptors.
func RegisterMiddlewareServiceHandlerFromEndpoint ¶
func RegisterMiddlewareServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMiddlewareServiceHandlerFromEndpoint is same as RegisterMiddlewareServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMiddlewareServiceHandlerServer ¶
func RegisterMiddlewareServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MiddlewareServiceServer) error
RegisterMiddlewareServiceHandlerServer registers the http handlers for service MiddlewareService to "mux". UnaryRPC :call MiddlewareServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMiddlewareServiceHandlerFromEndpoint instead.
func RegisterMiddlewareServiceServer ¶
func RegisterMiddlewareServiceServer(s grpc.ServiceRegistrar, srv MiddlewareServiceServer)
Types ¶
type Claim ¶
type Claim struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" bson:"_id,omitempty"` // @gotags: bson:"_id,omitempty" Appid string `protobuf:"bytes,2,opt,name=appid,proto3" json:"appid,omitempty"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` Policy Claim_Policy `protobuf:"varint,5,opt,name=policy,proto3,enum=middleware.Claim_Policy" json:"policy,omitempty"` Instance string `protobuf:"bytes,6,opt,name=instance,proto3" json:"instance,omitempty"` Status Claim_Status `protobuf:"varint,7,opt,name=status,proto3,enum=middleware.Claim_Status" json:"status,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,101,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,103,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*Claim) Descriptor
deprecated
func (*Claim) GetCreatedAt ¶
func (x *Claim) GetCreatedAt() *timestamppb.Timestamp
func (*Claim) GetInstance ¶
func (*Claim) GetPolicy ¶
func (x *Claim) GetPolicy() Claim_Policy
func (*Claim) GetStatus ¶
func (x *Claim) GetStatus() Claim_Status
func (*Claim) GetUpdatedAt ¶
func (x *Claim) GetUpdatedAt() *timestamppb.Timestamp
func (*Claim) ProtoMessage ¶
func (*Claim) ProtoMessage()
func (*Claim) ProtoReflect ¶
func (x *Claim) ProtoReflect() protoreflect.Message
func (*Claim) Validate ¶
Validate checks the field values on Claim 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 (*Claim) ValidateAll ¶
ValidateAll checks the field values on Claim 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 ClaimMultiError, or nil if none found.
type ClaimMultiError ¶
type ClaimMultiError []error
ClaimMultiError is an error wrapping multiple validation errors returned by Claim.ValidateAll() if the designated constraints aren't met.
func (ClaimMultiError) AllErrors ¶
func (m ClaimMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ClaimMultiError) Error ¶
func (m ClaimMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ClaimValidationError ¶
type ClaimValidationError struct {
// contains filtered or unexported fields
}
ClaimValidationError is the validation error returned by Claim.Validate if the designated constraints aren't met.
func (ClaimValidationError) Cause ¶
func (e ClaimValidationError) Cause() error
Cause function returns cause value.
func (ClaimValidationError) Error ¶
func (e ClaimValidationError) Error() string
Error satisfies the builtin error interface
func (ClaimValidationError) ErrorName ¶
func (e ClaimValidationError) ErrorName() string
ErrorName returns error name.
func (ClaimValidationError) Field ¶
func (e ClaimValidationError) Field() string
Field function returns field value.
func (ClaimValidationError) Key ¶
func (e ClaimValidationError) Key() bool
Key function returns key value.
func (ClaimValidationError) Reason ¶
func (e ClaimValidationError) Reason() string
Reason function returns reason value.
type Claim_Policy ¶
type Claim_Policy int32
const ( Claim_REUSE Claim_Policy = 0 Claim_CREATE Claim_Policy = 1 )
func (Claim_Policy) Descriptor ¶
func (Claim_Policy) Descriptor() protoreflect.EnumDescriptor
func (Claim_Policy) Enum ¶
func (x Claim_Policy) Enum() *Claim_Policy
func (Claim_Policy) EnumDescriptor
deprecated
func (Claim_Policy) EnumDescriptor() ([]byte, []int)
Deprecated: Use Claim_Policy.Descriptor instead.
func (Claim_Policy) Number ¶
func (x Claim_Policy) Number() protoreflect.EnumNumber
func (Claim_Policy) String ¶
func (x Claim_Policy) String() string
func (Claim_Policy) Type ¶
func (Claim_Policy) Type() protoreflect.EnumType
type Claim_Status ¶
type Claim_Status int32
const ( Claim_UNBOUND Claim_Status = 0 Claim_BOUND Claim_Status = 1 )
func (Claim_Status) Descriptor ¶
func (Claim_Status) Descriptor() protoreflect.EnumDescriptor
func (Claim_Status) Enum ¶
func (x Claim_Status) Enum() *Claim_Status
func (Claim_Status) EnumDescriptor
deprecated
func (Claim_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use Claim_Status.Descriptor instead.
func (Claim_Status) Number ¶
func (x Claim_Status) Number() protoreflect.EnumNumber
func (Claim_Status) String ¶
func (x Claim_Status) String() string
func (Claim_Status) Type ¶
func (Claim_Status) Type() protoreflect.EnumType
type ClaimsRequest ¶
type ClaimsRequest struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
func (*ClaimsRequest) Descriptor
deprecated
func (*ClaimsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ClaimsRequest.ProtoReflect.Descriptor instead.
func (*ClaimsRequest) GetType ¶
func (x *ClaimsRequest) GetType() string
func (*ClaimsRequest) ProtoMessage ¶
func (*ClaimsRequest) ProtoMessage()
func (*ClaimsRequest) ProtoReflect ¶
func (x *ClaimsRequest) ProtoReflect() protoreflect.Message
func (*ClaimsRequest) Reset ¶
func (x *ClaimsRequest) Reset()
func (*ClaimsRequest) String ¶
func (x *ClaimsRequest) String() string
func (*ClaimsRequest) Validate ¶
func (m *ClaimsRequest) Validate() error
Validate checks the field values on ClaimsRequest 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 (*ClaimsRequest) ValidateAll ¶
func (m *ClaimsRequest) ValidateAll() error
ValidateAll checks the field values on ClaimsRequest 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 ClaimsRequestMultiError, or nil if none found.
type ClaimsRequestMultiError ¶
type ClaimsRequestMultiError []error
ClaimsRequestMultiError is an error wrapping multiple validation errors returned by ClaimsRequest.ValidateAll() if the designated constraints aren't met.
func (ClaimsRequestMultiError) AllErrors ¶
func (m ClaimsRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ClaimsRequestMultiError) Error ¶
func (m ClaimsRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ClaimsRequestValidationError ¶
type ClaimsRequestValidationError struct {
// contains filtered or unexported fields
}
ClaimsRequestValidationError is the validation error returned by ClaimsRequest.Validate if the designated constraints aren't met.
func (ClaimsRequestValidationError) Cause ¶
func (e ClaimsRequestValidationError) Cause() error
Cause function returns cause value.
func (ClaimsRequestValidationError) Error ¶
func (e ClaimsRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ClaimsRequestValidationError) ErrorName ¶
func (e ClaimsRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ClaimsRequestValidationError) Field ¶
func (e ClaimsRequestValidationError) Field() string
Field function returns field value.
func (ClaimsRequestValidationError) Key ¶
func (e ClaimsRequestValidationError) Key() bool
Key function returns key value.
func (ClaimsRequestValidationError) Reason ¶
func (e ClaimsRequestValidationError) Reason() string
Reason function returns reason value.
type ClaimsResponse ¶
type ClaimsResponse struct { Items []*Claim `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*ClaimsResponse) Descriptor
deprecated
func (*ClaimsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ClaimsResponse.ProtoReflect.Descriptor instead.
func (*ClaimsResponse) GetItems ¶
func (x *ClaimsResponse) GetItems() []*Claim
func (*ClaimsResponse) GetTotal ¶
func (x *ClaimsResponse) GetTotal() int64
func (*ClaimsResponse) ProtoMessage ¶
func (*ClaimsResponse) ProtoMessage()
func (*ClaimsResponse) ProtoReflect ¶
func (x *ClaimsResponse) ProtoReflect() protoreflect.Message
func (*ClaimsResponse) Reset ¶
func (x *ClaimsResponse) Reset()
func (*ClaimsResponse) String ¶
func (x *ClaimsResponse) String() string
func (*ClaimsResponse) Validate ¶
func (m *ClaimsResponse) Validate() error
Validate checks the field values on ClaimsResponse 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 (*ClaimsResponse) ValidateAll ¶
func (m *ClaimsResponse) ValidateAll() error
ValidateAll checks the field values on ClaimsResponse 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 ClaimsResponseMultiError, or nil if none found.
type ClaimsResponseMultiError ¶
type ClaimsResponseMultiError []error
ClaimsResponseMultiError is an error wrapping multiple validation errors returned by ClaimsResponse.ValidateAll() if the designated constraints aren't met.
func (ClaimsResponseMultiError) AllErrors ¶
func (m ClaimsResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ClaimsResponseMultiError) Error ¶
func (m ClaimsResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ClaimsResponseValidationError ¶
type ClaimsResponseValidationError struct {
// contains filtered or unexported fields
}
ClaimsResponseValidationError is the validation error returned by ClaimsResponse.Validate if the designated constraints aren't met.
func (ClaimsResponseValidationError) Cause ¶
func (e ClaimsResponseValidationError) Cause() error
Cause function returns cause value.
func (ClaimsResponseValidationError) Error ¶
func (e ClaimsResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ClaimsResponseValidationError) ErrorName ¶
func (e ClaimsResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ClaimsResponseValidationError) Field ¶
func (e ClaimsResponseValidationError) Field() string
Field function returns field value.
func (ClaimsResponseValidationError) Key ¶
func (e ClaimsResponseValidationError) Key() bool
Key function returns key value.
func (ClaimsResponseValidationError) Reason ¶
func (e ClaimsResponseValidationError) Reason() string
Reason function returns reason value.
type Instance ¶
type Instance struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" bson:"_id,omitempty"` // @gotags: bson:"_id,omitempty" Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Env string `protobuf:"bytes,3,opt,name=env,proto3" json:"env,omitempty"` Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` Properties map[string]string `` /* 161-byte string literal not displayed */ Status kiae.OpStatus `protobuf:"varint,7,opt,name=status,proto3,enum=kiae.OpStatus" json:"status,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,101,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,103,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*Instance) Descriptor
deprecated
func (*Instance) GetCreatedAt ¶
func (x *Instance) GetCreatedAt() *timestamppb.Timestamp
func (*Instance) GetProperties ¶
func (*Instance) GetUpdatedAt ¶
func (x *Instance) GetUpdatedAt() *timestamppb.Timestamp
func (*Instance) ProtoMessage ¶
func (*Instance) ProtoMessage()
func (*Instance) ProtoReflect ¶
func (x *Instance) ProtoReflect() protoreflect.Message
func (*Instance) Validate ¶
Validate checks the field values on Instance 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 (*Instance) ValidateAll ¶
ValidateAll checks the field values on Instance 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 InstanceMultiError, or nil if none found.
type InstanceMultiError ¶
type InstanceMultiError []error
InstanceMultiError is an error wrapping multiple validation errors returned by Instance.ValidateAll() if the designated constraints aren't met.
func (InstanceMultiError) AllErrors ¶
func (m InstanceMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (InstanceMultiError) Error ¶
func (m InstanceMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type InstanceValidationError ¶
type InstanceValidationError struct {
// contains filtered or unexported fields
}
InstanceValidationError is the validation error returned by Instance.Validate if the designated constraints aren't met.
func (InstanceValidationError) Cause ¶
func (e InstanceValidationError) Cause() error
Cause function returns cause value.
func (InstanceValidationError) Error ¶
func (e InstanceValidationError) Error() string
Error satisfies the builtin error interface
func (InstanceValidationError) ErrorName ¶
func (e InstanceValidationError) ErrorName() string
ErrorName returns error name.
func (InstanceValidationError) Field ¶
func (e InstanceValidationError) Field() string
Field function returns field value.
func (InstanceValidationError) Key ¶
func (e InstanceValidationError) Key() bool
Key function returns key value.
func (InstanceValidationError) Reason ¶
func (e InstanceValidationError) Reason() string
Reason function returns reason value.
type ListRequest ¶
type ListRequest struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetType ¶
func (x *ListRequest) GetType() string
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
func (*ListRequest) Validate ¶
func (m *ListRequest) Validate() error
Validate checks the field values on ListRequest 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 (*ListRequest) ValidateAll ¶
func (m *ListRequest) ValidateAll() error
ValidateAll checks the field values on ListRequest 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 ListRequestMultiError, or nil if none found.
type ListRequestMultiError ¶
type ListRequestMultiError []error
ListRequestMultiError is an error wrapping multiple validation errors returned by ListRequest.ValidateAll() if the designated constraints aren't met.
func (ListRequestMultiError) AllErrors ¶
func (m ListRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListRequestMultiError) Error ¶
func (m ListRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListRequestValidationError ¶
type ListRequestValidationError struct {
// contains filtered or unexported fields
}
ListRequestValidationError is the validation error returned by ListRequest.Validate if the designated constraints aren't met.
func (ListRequestValidationError) Cause ¶
func (e ListRequestValidationError) Cause() error
Cause function returns cause value.
func (ListRequestValidationError) Error ¶
func (e ListRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ListRequestValidationError) ErrorName ¶
func (e ListRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ListRequestValidationError) Field ¶
func (e ListRequestValidationError) Field() string
Field function returns field value.
func (ListRequestValidationError) Key ¶
func (e ListRequestValidationError) Key() bool
Key function returns key value.
func (ListRequestValidationError) Reason ¶
func (e ListRequestValidationError) Reason() string
Reason function returns reason value.
type ListResponse ¶
type ListResponse struct { Items []*Instance `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetItems ¶
func (x *ListResponse) GetItems() []*Instance
func (*ListResponse) GetTotal ¶
func (x *ListResponse) GetTotal() int64
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
func (*ListResponse) Validate ¶
func (m *ListResponse) Validate() error
Validate checks the field values on ListResponse 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 (*ListResponse) ValidateAll ¶
func (m *ListResponse) ValidateAll() error
ValidateAll checks the field values on ListResponse 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 ListResponseMultiError, or nil if none found.
type ListResponseMultiError ¶
type ListResponseMultiError []error
ListResponseMultiError is an error wrapping multiple validation errors returned by ListResponse.ValidateAll() if the designated constraints aren't met.
func (ListResponseMultiError) AllErrors ¶
func (m ListResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListResponseMultiError) Error ¶
func (m ListResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListResponseValidationError ¶
type ListResponseValidationError struct {
// contains filtered or unexported fields
}
ListResponseValidationError is the validation error returned by ListResponse.Validate if the designated constraints aren't met.
func (ListResponseValidationError) Cause ¶
func (e ListResponseValidationError) Cause() error
Cause function returns cause value.
func (ListResponseValidationError) Error ¶
func (e ListResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ListResponseValidationError) ErrorName ¶
func (e ListResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ListResponseValidationError) Field ¶
func (e ListResponseValidationError) Field() string
Field function returns field value.
func (ListResponseValidationError) Key ¶
func (e ListResponseValidationError) Key() bool
Key function returns key value.
func (ListResponseValidationError) Reason ¶
func (e ListResponseValidationError) Reason() string
Reason function returns reason value.
type MiddlewareServiceClient ¶
type MiddlewareServiceClient interface { List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) Create(ctx context.Context, in *Instance, opts ...grpc.CallOption) (*Instance, error) Update(ctx context.Context, in *Instance, opts ...grpc.CallOption) (*Instance, error) Delete(ctx context.Context, in *kiae.IdRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) Claims(ctx context.Context, in *ClaimsRequest, opts ...grpc.CallOption) (*ClaimsResponse, error) ClaimCreate(ctx context.Context, in *Claim, opts ...grpc.CallOption) (*Claim, error) ClaimUpdate(ctx context.Context, in *Claim, opts ...grpc.CallOption) (*Claim, error) ClaimDelete(ctx context.Context, in *kiae.IdRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
MiddlewareServiceClient is the client API for MiddlewareService 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.
func NewMiddlewareServiceClient ¶
func NewMiddlewareServiceClient(cc grpc.ClientConnInterface) MiddlewareServiceClient
type MiddlewareServiceServer ¶
type MiddlewareServiceServer interface { List(context.Context, *ListRequest) (*ListResponse, error) Create(context.Context, *Instance) (*Instance, error) Update(context.Context, *Instance) (*Instance, error) Delete(context.Context, *kiae.IdRequest) (*emptypb.Empty, error) Claims(context.Context, *ClaimsRequest) (*ClaimsResponse, error) ClaimCreate(context.Context, *Claim) (*Claim, error) ClaimUpdate(context.Context, *Claim) (*Claim, error) ClaimDelete(context.Context, *kiae.IdRequest) (*emptypb.Empty, error) }
MiddlewareServiceServer is the server API for MiddlewareService service. All implementations should embed UnimplementedMiddlewareServiceServer for forward compatibility
type UnimplementedMiddlewareServiceServer ¶
type UnimplementedMiddlewareServiceServer struct { }
UnimplementedMiddlewareServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedMiddlewareServiceServer) ClaimCreate ¶
func (UnimplementedMiddlewareServiceServer) ClaimDelete ¶
func (UnimplementedMiddlewareServiceServer) ClaimUpdate ¶
func (UnimplementedMiddlewareServiceServer) Claims ¶
func (UnimplementedMiddlewareServiceServer) Claims(context.Context, *ClaimsRequest) (*ClaimsResponse, error)
func (UnimplementedMiddlewareServiceServer) List ¶
func (UnimplementedMiddlewareServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
type UnsafeMiddlewareServiceServer ¶
type UnsafeMiddlewareServiceServer interface {
// contains filtered or unexported methods
}
UnsafeMiddlewareServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MiddlewareServiceServer will result in compilation errors.