state_v1beta

package
v0.0.0-...-783094c Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 28 Imported by: 1

Documentation

Overview

Package state_v1beta is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	StateStoreService_GetState_FullMethodName = "/gommerce.state.v1beta.StateStoreService/GetState"
	StateStoreService_SetState_FullMethodName = "/gommerce.state.v1beta.StateStoreService/SetState"
	StateStoreService_DelState_FullMethodName = "/gommerce.state.v1beta.StateStoreService/DelState"
)

Variables

View Source
var File_gommerce_state_v1beta_state_proto protoreflect.FileDescriptor
View Source
var File_gommerce_state_v1beta_store_proto protoreflect.FileDescriptor
View Source
var StateStoreService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gommerce.state.v1beta.StateStoreService",
	HandlerType: (*StateStoreServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetState",
			Handler:    _StateStoreService_GetState_Handler,
		},
		{
			MethodName: "SetState",
			Handler:    _StateStoreService_SetState_Handler,
		},
		{
			MethodName: "DelState",
			Handler:    _StateStoreService_DelState_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gommerce/state/v1beta/store.proto",
}

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

Functions

func RegisterStateStoreServiceHandler

func RegisterStateStoreServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterStateStoreServiceHandler registers the http handlers for service StateStoreService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterStateStoreServiceHandlerClient

func RegisterStateStoreServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client StateStoreServiceClient) error

RegisterStateStoreServiceHandlerClient registers the http handlers for service StateStoreService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "StateStoreServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "StateStoreServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "StateStoreServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.

func RegisterStateStoreServiceHandlerFromEndpoint

func RegisterStateStoreServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterStateStoreServiceHandlerFromEndpoint is same as RegisterStateStoreServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterStateStoreServiceHandlerServer

func RegisterStateStoreServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server StateStoreServiceServer) error

RegisterStateStoreServiceHandlerServer registers the http handlers for service StateStoreService to "mux". UnaryRPC :call StateStoreServiceServer 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 RegisterStateStoreServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.

func RegisterStateStoreServiceServer

func RegisterStateStoreServiceServer(s grpc.ServiceRegistrar, srv StateStoreServiceServer)

Types

type DelStateRequest

type DelStateRequest struct {
	Key      string            `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*DelStateRequest) Descriptor deprecated

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

Deprecated: Use DelStateRequest.ProtoReflect.Descriptor instead.

func (*DelStateRequest) GetKey

func (x *DelStateRequest) GetKey() string

func (*DelStateRequest) GetMetadata

func (x *DelStateRequest) GetMetadata() map[string]string

func (*DelStateRequest) ProtoMessage

func (*DelStateRequest) ProtoMessage()

func (*DelStateRequest) ProtoReflect

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

func (*DelStateRequest) Reset

func (x *DelStateRequest) Reset()

func (*DelStateRequest) String

func (x *DelStateRequest) String() string

func (*DelStateRequest) Validate

func (m *DelStateRequest) Validate() error

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

func (m *DelStateRequest) ValidateAll() error

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

type DelStateRequestMultiError

type DelStateRequestMultiError []error

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

func (DelStateRequestMultiError) AllErrors

func (m DelStateRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DelStateRequestMultiError) Error

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

type DelStateRequestValidationError

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

DelStateRequestValidationError is the validation error returned by DelStateRequest.Validate if the designated constraints aren't met.

func (DelStateRequestValidationError) Cause

Cause function returns cause value.

func (DelStateRequestValidationError) Error

Error satisfies the builtin error interface

func (DelStateRequestValidationError) ErrorName

func (e DelStateRequestValidationError) ErrorName() string

ErrorName returns error name.

func (DelStateRequestValidationError) Field

Field function returns field value.

func (DelStateRequestValidationError) Key

Key function returns key value.

func (DelStateRequestValidationError) Reason

Reason function returns reason value.

type DelStateResponse

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

func (*DelStateResponse) Descriptor deprecated

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

Deprecated: Use DelStateResponse.ProtoReflect.Descriptor instead.

func (*DelStateResponse) ProtoMessage

func (*DelStateResponse) ProtoMessage()

func (*DelStateResponse) ProtoReflect

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

func (*DelStateResponse) Reset

func (x *DelStateResponse) Reset()

func (*DelStateResponse) String

func (x *DelStateResponse) String() string

func (*DelStateResponse) Validate

func (m *DelStateResponse) Validate() error

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

func (m *DelStateResponse) ValidateAll() error

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

type DelStateResponseMultiError

type DelStateResponseMultiError []error

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

func (DelStateResponseMultiError) AllErrors

func (m DelStateResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DelStateResponseMultiError) Error

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

type DelStateResponseValidationError

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

DelStateResponseValidationError is the validation error returned by DelStateResponse.Validate if the designated constraints aren't met.

func (DelStateResponseValidationError) Cause

Cause function returns cause value.

func (DelStateResponseValidationError) Error

Error satisfies the builtin error interface

func (DelStateResponseValidationError) ErrorName

ErrorName returns error name.

func (DelStateResponseValidationError) Field

Field function returns field value.

func (DelStateResponseValidationError) Key

Key function returns key value.

func (DelStateResponseValidationError) Reason

Reason function returns reason value.

type GetStateRequest

type GetStateRequest struct {
	Key      string            `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetStateRequest) Descriptor deprecated

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

Deprecated: Use GetStateRequest.ProtoReflect.Descriptor instead.

func (*GetStateRequest) GetKey

func (x *GetStateRequest) GetKey() string

func (*GetStateRequest) GetMetadata

func (x *GetStateRequest) GetMetadata() map[string]string

func (*GetStateRequest) ProtoMessage

func (*GetStateRequest) ProtoMessage()

func (*GetStateRequest) ProtoReflect

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

func (*GetStateRequest) Reset

func (x *GetStateRequest) Reset()

func (*GetStateRequest) String

func (x *GetStateRequest) String() string

func (*GetStateRequest) Validate

func (m *GetStateRequest) Validate() error

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

func (m *GetStateRequest) ValidateAll() error

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

type GetStateRequestMultiError

type GetStateRequestMultiError []error

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

func (GetStateRequestMultiError) AllErrors

func (m GetStateRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetStateRequestMultiError) Error

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

type GetStateRequestValidationError

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

GetStateRequestValidationError is the validation error returned by GetStateRequest.Validate if the designated constraints aren't met.

func (GetStateRequestValidationError) Cause

Cause function returns cause value.

func (GetStateRequestValidationError) Error

Error satisfies the builtin error interface

func (GetStateRequestValidationError) ErrorName

func (e GetStateRequestValidationError) ErrorName() string

ErrorName returns error name.

func (GetStateRequestValidationError) Field

Field function returns field value.

func (GetStateRequestValidationError) Key

Key function returns key value.

func (GetStateRequestValidationError) Reason

Reason function returns reason value.

type GetStateResponse

type GetStateResponse struct {
	Data        []byte            `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Metadata    map[string]string `` /* 157-byte string literal not displayed */
	ContentType string            `protobuf:"bytes,4,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	// contains filtered or unexported fields
}

func (*GetStateResponse) Descriptor deprecated

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

Deprecated: Use GetStateResponse.ProtoReflect.Descriptor instead.

func (*GetStateResponse) GetContentType

func (x *GetStateResponse) GetContentType() string

func (*GetStateResponse) GetData

func (x *GetStateResponse) GetData() []byte

func (*GetStateResponse) GetMetadata

func (x *GetStateResponse) GetMetadata() map[string]string

func (*GetStateResponse) ProtoMessage

func (*GetStateResponse) ProtoMessage()

func (*GetStateResponse) ProtoReflect

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

func (*GetStateResponse) Reset

func (x *GetStateResponse) Reset()

func (*GetStateResponse) String

func (x *GetStateResponse) String() string

func (*GetStateResponse) Validate

func (m *GetStateResponse) Validate() error

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

func (m *GetStateResponse) ValidateAll() error

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

type GetStateResponseMultiError

type GetStateResponseMultiError []error

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

func (GetStateResponseMultiError) AllErrors

func (m GetStateResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetStateResponseMultiError) Error

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

type GetStateResponseValidationError

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

GetStateResponseValidationError is the validation error returned by GetStateResponse.Validate if the designated constraints aren't met.

func (GetStateResponseValidationError) Cause

Cause function returns cause value.

func (GetStateResponseValidationError) Error

Error satisfies the builtin error interface

func (GetStateResponseValidationError) ErrorName

ErrorName returns error name.

func (GetStateResponseValidationError) Field

Field function returns field value.

func (GetStateResponseValidationError) Key

Key function returns key value.

func (GetStateResponseValidationError) Reason

Reason function returns reason value.

type SetStateRequest

type SetStateRequest struct {
	Key         string            `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Data        []byte            `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Metadata    map[string]string `` /* 157-byte string literal not displayed */
	ContentType string            `protobuf:"bytes,6,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	// contains filtered or unexported fields
}

func (*SetStateRequest) Descriptor deprecated

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

Deprecated: Use SetStateRequest.ProtoReflect.Descriptor instead.

func (*SetStateRequest) GetContentType

func (x *SetStateRequest) GetContentType() string

func (*SetStateRequest) GetData

func (x *SetStateRequest) GetData() []byte

func (*SetStateRequest) GetKey

func (x *SetStateRequest) GetKey() string

func (*SetStateRequest) GetMetadata

func (x *SetStateRequest) GetMetadata() map[string]string

func (*SetStateRequest) ProtoMessage

func (*SetStateRequest) ProtoMessage()

func (*SetStateRequest) ProtoReflect

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

func (*SetStateRequest) Reset

func (x *SetStateRequest) Reset()

func (*SetStateRequest) String

func (x *SetStateRequest) String() string

func (*SetStateRequest) Validate

func (m *SetStateRequest) Validate() error

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

func (m *SetStateRequest) ValidateAll() error

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

type SetStateRequestMultiError

type SetStateRequestMultiError []error

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

func (SetStateRequestMultiError) AllErrors

func (m SetStateRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SetStateRequestMultiError) Error

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

type SetStateRequestValidationError

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

SetStateRequestValidationError is the validation error returned by SetStateRequest.Validate if the designated constraints aren't met.

func (SetStateRequestValidationError) Cause

Cause function returns cause value.

func (SetStateRequestValidationError) Error

Error satisfies the builtin error interface

func (SetStateRequestValidationError) ErrorName

func (e SetStateRequestValidationError) ErrorName() string

ErrorName returns error name.

func (SetStateRequestValidationError) Field

Field function returns field value.

func (SetStateRequestValidationError) Key

Key function returns key value.

func (SetStateRequestValidationError) Reason

Reason function returns reason value.

type SetStateResponse

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

func (*SetStateResponse) Descriptor deprecated

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

Deprecated: Use SetStateResponse.ProtoReflect.Descriptor instead.

func (*SetStateResponse) ProtoMessage

func (*SetStateResponse) ProtoMessage()

func (*SetStateResponse) ProtoReflect

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

func (*SetStateResponse) Reset

func (x *SetStateResponse) Reset()

func (*SetStateResponse) String

func (x *SetStateResponse) String() string

func (*SetStateResponse) Validate

func (m *SetStateResponse) Validate() error

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

func (m *SetStateResponse) ValidateAll() error

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

type SetStateResponseMultiError

type SetStateResponseMultiError []error

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

func (SetStateResponseMultiError) AllErrors

func (m SetStateResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SetStateResponseMultiError) Error

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

type SetStateResponseValidationError

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

SetStateResponseValidationError is the validation error returned by SetStateResponse.Validate if the designated constraints aren't met.

func (SetStateResponseValidationError) Cause

Cause function returns cause value.

func (SetStateResponseValidationError) Error

Error satisfies the builtin error interface

func (SetStateResponseValidationError) ErrorName

ErrorName returns error name.

func (SetStateResponseValidationError) Field

Field function returns field value.

func (SetStateResponseValidationError) Key

Key function returns key value.

func (SetStateResponseValidationError) Reason

Reason function returns reason value.

type StateStoreServiceClient

type StateStoreServiceClient interface {
	GetState(ctx context.Context, in *GetStateRequest, opts ...grpc.CallOption) (*GetStateResponse, error)
	SetState(ctx context.Context, in *SetStateRequest, opts ...grpc.CallOption) (*SetStateResponse, error)
	DelState(ctx context.Context, in *DelStateRequest, opts ...grpc.CallOption) (*DelStateResponse, error)
}

StateStoreServiceClient is the client API for StateStoreService 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 StateStoreServiceServer

type StateStoreServiceServer interface {
	GetState(context.Context, *GetStateRequest) (*GetStateResponse, error)
	SetState(context.Context, *SetStateRequest) (*SetStateResponse, error)
	DelState(context.Context, *DelStateRequest) (*DelStateResponse, error)
	// contains filtered or unexported methods
}

StateStoreServiceServer is the server API for StateStoreService service. All implementations must embed UnimplementedStateStoreServiceServer for forward compatibility.

type UnimplementedStateStoreServiceServer

type UnimplementedStateStoreServiceServer struct{}

UnimplementedStateStoreServiceServer 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 (UnimplementedStateStoreServiceServer) DelState

func (UnimplementedStateStoreServiceServer) GetState

func (UnimplementedStateStoreServiceServer) SetState

type UnsafeStateStoreServiceServer

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

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

Jump to

Keyboard shortcuts

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