Documentation ¶
Overview ¶
Package datapb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterDataStoreHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterDataStoreHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DataStoreClient) error
- func RegisterDataStoreHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterDataStoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DataStoreServer) error
- func RegisterDataStoreServer(s grpc.ServiceRegistrar, srv DataStoreServer)
- type Data
- type DataStoreClient
- type DataStoreServer
- type DeleteDataRequest
- func (*DeleteDataRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteDataRequest) GetContext() string
- func (x *DeleteDataRequest) GetName() string
- func (x *DeleteDataRequest) GetSubject() string
- func (*DeleteDataRequest) ProtoMessage()
- func (x *DeleteDataRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteDataRequest) Reset()
- func (x *DeleteDataRequest) String() string
- type DeleteDataResponse
- type GetDataRequest
- func (*GetDataRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetDataRequest) GetContext() string
- func (x *GetDataRequest) GetName() string
- func (*GetDataRequest) ProtoMessage()
- func (x *GetDataRequest) ProtoReflect() protoreflect.Message
- func (x *GetDataRequest) Reset()
- func (x *GetDataRequest) String() string
- type GetDataResponse
- type Scope
- type SetDataRequest
- func (*SetDataRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetDataRequest) GetData() *Data
- func (x *SetDataRequest) GetSubject() string
- func (*SetDataRequest) ProtoMessage()
- func (x *SetDataRequest) ProtoReflect() protoreflect.Message
- func (x *SetDataRequest) Reset()
- func (x *SetDataRequest) String() string
- type SetDataResponse
- type UnimplementedDataStoreServer
- func (UnimplementedDataStoreServer) DeleteData(context.Context, *DeleteDataRequest) (*DeleteDataResponse, error)
- func (UnimplementedDataStoreServer) GetData(context.Context, *GetDataRequest) (*GetDataResponse, error)
- func (UnimplementedDataStoreServer) SetData(context.Context, *SetDataRequest) (*SetDataResponse, error)
- type UnsafeDataStoreServer
Constants ¶
This section is empty.
Variables ¶
var ( Scope_name = map[int32]string{ 0: "Public", 1: "Personal", 2: "ContextRestricted", } Scope_value = map[string]int32{ "Public": 0, "Personal": 1, "ContextRestricted": 2, } )
Enum value maps for Scope.
var File_data_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDataStoreHandler ¶
func RegisterDataStoreHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterDataStoreHandler registers the http handlers for service DataStore to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterDataStoreHandlerClient ¶
func RegisterDataStoreHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DataStoreClient) error
RegisterDataStoreHandlerClient registers the http handlers for service DataStore to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DataStoreClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DataStoreClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "DataStoreClient" to call the correct interceptors.
func RegisterDataStoreHandlerFromEndpoint ¶
func RegisterDataStoreHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterDataStoreHandlerFromEndpoint is same as RegisterDataStoreHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterDataStoreHandlerServer ¶
func RegisterDataStoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DataStoreServer) error
RegisterDataStoreHandlerServer registers the http handlers for service DataStore to "mux". UnaryRPC :call DataStoreServer 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 RegisterDataStoreHandlerFromEndpoint instead.
func RegisterDataStoreServer ¶
func RegisterDataStoreServer(s grpc.ServiceRegistrar, srv DataStoreServer)
Types ¶
type Data ¶
type Data struct { Context string `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Uri string `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"` // contains filtered or unexported fields }
func (*Data) Descriptor
deprecated
func (*Data) GetContext ¶
func (*Data) ProtoMessage ¶
func (*Data) ProtoMessage()
func (*Data) ProtoReflect ¶
func (x *Data) ProtoReflect() protoreflect.Message
type DataStoreClient ¶
type DataStoreClient interface { SetData(ctx context.Context, in *SetDataRequest, opts ...grpc.CallOption) (*SetDataResponse, error) GetData(ctx context.Context, in *GetDataRequest, opts ...grpc.CallOption) (*GetDataResponse, error) DeleteData(ctx context.Context, in *DeleteDataRequest, opts ...grpc.CallOption) (*DeleteDataResponse, error) }
DataStoreClient is the client API for DataStore 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 NewDataStoreClient ¶
func NewDataStoreClient(cc grpc.ClientConnInterface) DataStoreClient
type DataStoreServer ¶
type DataStoreServer interface { SetData(context.Context, *SetDataRequest) (*SetDataResponse, error) GetData(context.Context, *GetDataRequest) (*GetDataResponse, error) DeleteData(context.Context, *DeleteDataRequest) (*DeleteDataResponse, error) // contains filtered or unexported methods }
DataStoreServer is the server API for DataStore service. All implementations must embed UnimplementedDataStoreServer for forward compatibility
type DeleteDataRequest ¶
type DeleteDataRequest struct { Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` Context string `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*DeleteDataRequest) Descriptor
deprecated
func (*DeleteDataRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteDataRequest.ProtoReflect.Descriptor instead.
func (*DeleteDataRequest) GetContext ¶
func (x *DeleteDataRequest) GetContext() string
func (*DeleteDataRequest) GetName ¶
func (x *DeleteDataRequest) GetName() string
func (*DeleteDataRequest) GetSubject ¶
func (x *DeleteDataRequest) GetSubject() string
func (*DeleteDataRequest) ProtoMessage ¶
func (*DeleteDataRequest) ProtoMessage()
func (*DeleteDataRequest) ProtoReflect ¶
func (x *DeleteDataRequest) ProtoReflect() protoreflect.Message
func (*DeleteDataRequest) Reset ¶
func (x *DeleteDataRequest) Reset()
func (*DeleteDataRequest) String ¶
func (x *DeleteDataRequest) String() string
type DeleteDataResponse ¶
type DeleteDataResponse struct {
// contains filtered or unexported fields
}
func (*DeleteDataResponse) Descriptor
deprecated
func (*DeleteDataResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteDataResponse.ProtoReflect.Descriptor instead.
func (*DeleteDataResponse) ProtoMessage ¶
func (*DeleteDataResponse) ProtoMessage()
func (*DeleteDataResponse) ProtoReflect ¶
func (x *DeleteDataResponse) ProtoReflect() protoreflect.Message
func (*DeleteDataResponse) Reset ¶
func (x *DeleteDataResponse) Reset()
func (*DeleteDataResponse) String ¶
func (x *DeleteDataResponse) String() string
type GetDataRequest ¶
type GetDataRequest struct { Context string `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*GetDataRequest) Descriptor
deprecated
func (*GetDataRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetDataRequest.ProtoReflect.Descriptor instead.
func (*GetDataRequest) GetContext ¶
func (x *GetDataRequest) GetContext() string
func (*GetDataRequest) GetName ¶
func (x *GetDataRequest) GetName() string
func (*GetDataRequest) ProtoMessage ¶
func (*GetDataRequest) ProtoMessage()
func (*GetDataRequest) ProtoReflect ¶
func (x *GetDataRequest) ProtoReflect() protoreflect.Message
func (*GetDataRequest) Reset ¶
func (x *GetDataRequest) Reset()
func (*GetDataRequest) String ¶
func (x *GetDataRequest) String() string
type GetDataResponse ¶
type GetDataResponse struct { Data *Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*GetDataResponse) Descriptor
deprecated
func (*GetDataResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetDataResponse.ProtoReflect.Descriptor instead.
func (*GetDataResponse) GetData ¶
func (x *GetDataResponse) GetData() *Data
func (*GetDataResponse) ProtoMessage ¶
func (*GetDataResponse) ProtoMessage()
func (*GetDataResponse) ProtoReflect ¶
func (x *GetDataResponse) ProtoReflect() protoreflect.Message
func (*GetDataResponse) Reset ¶
func (x *GetDataResponse) Reset()
func (*GetDataResponse) String ¶
func (x *GetDataResponse) String() string
type Scope ¶
type Scope int32
func (Scope) Descriptor ¶
func (Scope) Descriptor() protoreflect.EnumDescriptor
func (Scope) EnumDescriptor
deprecated
func (Scope) Number ¶
func (x Scope) Number() protoreflect.EnumNumber
func (Scope) Type ¶
func (Scope) Type() protoreflect.EnumType
type SetDataRequest ¶
type SetDataRequest struct { Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` Data *Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*SetDataRequest) Descriptor
deprecated
func (*SetDataRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetDataRequest.ProtoReflect.Descriptor instead.
func (*SetDataRequest) GetData ¶
func (x *SetDataRequest) GetData() *Data
func (*SetDataRequest) GetSubject ¶
func (x *SetDataRequest) GetSubject() string
func (*SetDataRequest) ProtoMessage ¶
func (*SetDataRequest) ProtoMessage()
func (*SetDataRequest) ProtoReflect ¶
func (x *SetDataRequest) ProtoReflect() protoreflect.Message
func (*SetDataRequest) Reset ¶
func (x *SetDataRequest) Reset()
func (*SetDataRequest) String ¶
func (x *SetDataRequest) String() string
type SetDataResponse ¶
type SetDataResponse struct {
// contains filtered or unexported fields
}
func (*SetDataResponse) Descriptor
deprecated
func (*SetDataResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetDataResponse.ProtoReflect.Descriptor instead.
func (*SetDataResponse) ProtoMessage ¶
func (*SetDataResponse) ProtoMessage()
func (*SetDataResponse) ProtoReflect ¶
func (x *SetDataResponse) ProtoReflect() protoreflect.Message
func (*SetDataResponse) Reset ¶
func (x *SetDataResponse) Reset()
func (*SetDataResponse) String ¶
func (x *SetDataResponse) String() string
type UnimplementedDataStoreServer ¶
type UnimplementedDataStoreServer struct { }
UnimplementedDataStoreServer must be embedded to have forward compatible implementations.
func (UnimplementedDataStoreServer) DeleteData ¶
func (UnimplementedDataStoreServer) DeleteData(context.Context, *DeleteDataRequest) (*DeleteDataResponse, error)
func (UnimplementedDataStoreServer) GetData ¶
func (UnimplementedDataStoreServer) GetData(context.Context, *GetDataRequest) (*GetDataResponse, error)
func (UnimplementedDataStoreServer) SetData ¶
func (UnimplementedDataStoreServer) SetData(context.Context, *SetDataRequest) (*SetDataResponse, error)
type UnsafeDataStoreServer ¶
type UnsafeDataStoreServer interface {
// contains filtered or unexported methods
}
UnsafeDataStoreServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DataStoreServer will result in compilation errors.