crud

package
v0.0.0-...-19835a7 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CRUD_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "smc.proto.CRUD",
	HandlerType: (*CRUDServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetService",
			Handler:    _CRUD_GetService_Handler,
		},
		{
			MethodName: "PutService",
			Handler:    _CRUD_PutService_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/crud.proto",
}

CRUD_ServiceDesc is the grpc.ServiceDesc for CRUD 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_proto_crud_proto protoreflect.FileDescriptor

Functions

func RegisterCRUDServer

func RegisterCRUDServer(s grpc.ServiceRegistrar, srv CRUDServer)

Types

type CRUDClient

type CRUDClient interface {
	GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*GetServiceResponse, error)
	PutService(ctx context.Context, in *PutServiceRequest, opts ...grpc.CallOption) (*PutServiceResponse, error)
}

CRUDClient is the client API for CRUD 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 NewCRUDClient

func NewCRUDClient(cc grpc.ClientConnInterface) CRUDClient

type CRUDServer

type CRUDServer interface {
	GetService(context.Context, *GetServiceRequest) (*GetServiceResponse, error)
	PutService(context.Context, *PutServiceRequest) (*PutServiceResponse, error)
	// contains filtered or unexported methods
}

CRUDServer is the server API for CRUD service. All implementations must embed UnimplementedCRUDServer for forward compatibility

type Endpoint

type Endpoint struct {
	Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
	Port     int32  `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	// contains filtered or unexported fields
}

func (*Endpoint) Descriptor deprecated

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

Deprecated: Use Endpoint.ProtoReflect.Descriptor instead.

func (*Endpoint) GetHostname

func (x *Endpoint) GetHostname() string

func (*Endpoint) GetPort

func (x *Endpoint) GetPort() int32

func (*Endpoint) ProtoMessage

func (*Endpoint) ProtoMessage()

func (*Endpoint) ProtoReflect

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

func (*Endpoint) Reset

func (x *Endpoint) Reset()

func (*Endpoint) String

func (x *Endpoint) String() string

type GetServiceRequest

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

func (*GetServiceRequest) Descriptor deprecated

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

Deprecated: Use GetServiceRequest.ProtoReflect.Descriptor instead.

func (*GetServiceRequest) GetId

func (x *GetServiceRequest) GetId() string

func (*GetServiceRequest) ProtoMessage

func (*GetServiceRequest) ProtoMessage()

func (*GetServiceRequest) ProtoReflect

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

func (*GetServiceRequest) Reset

func (x *GetServiceRequest) Reset()

func (*GetServiceRequest) String

func (x *GetServiceRequest) String() string

type GetServiceResponse

type GetServiceResponse struct {
	Name      string      `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Endpoints []*Endpoint `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
	// contains filtered or unexported fields
}

func (*GetServiceResponse) Descriptor deprecated

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

Deprecated: Use GetServiceResponse.ProtoReflect.Descriptor instead.

func (*GetServiceResponse) GetEndpoints

func (x *GetServiceResponse) GetEndpoints() []*Endpoint

func (*GetServiceResponse) GetName

func (x *GetServiceResponse) GetName() string

func (*GetServiceResponse) ProtoMessage

func (*GetServiceResponse) ProtoMessage()

func (*GetServiceResponse) ProtoReflect

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

func (*GetServiceResponse) Reset

func (x *GetServiceResponse) Reset()

func (*GetServiceResponse) String

func (x *GetServiceResponse) String() string

type PutServiceRequest

type PutServiceRequest struct {
	Name      string      `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Endpoints []*Endpoint `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
	// contains filtered or unexported fields
}

func (*PutServiceRequest) Descriptor deprecated

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

Deprecated: Use PutServiceRequest.ProtoReflect.Descriptor instead.

func (*PutServiceRequest) GetEndpoints

func (x *PutServiceRequest) GetEndpoints() []*Endpoint

func (*PutServiceRequest) GetName

func (x *PutServiceRequest) GetName() string

func (*PutServiceRequest) ProtoMessage

func (*PutServiceRequest) ProtoMessage()

func (*PutServiceRequest) ProtoReflect

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

func (*PutServiceRequest) Reset

func (x *PutServiceRequest) Reset()

func (*PutServiceRequest) String

func (x *PutServiceRequest) String() string

type PutServiceResponse

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

func (*PutServiceResponse) Descriptor deprecated

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

Deprecated: Use PutServiceResponse.ProtoReflect.Descriptor instead.

func (*PutServiceResponse) GetId

func (x *PutServiceResponse) GetId() string

func (*PutServiceResponse) ProtoMessage

func (*PutServiceResponse) ProtoMessage()

func (*PutServiceResponse) ProtoReflect

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

func (*PutServiceResponse) Reset

func (x *PutServiceResponse) Reset()

func (*PutServiceResponse) String

func (x *PutServiceResponse) String() string

type UnimplementedCRUDServer

type UnimplementedCRUDServer struct {
}

UnimplementedCRUDServer must be embedded to have forward compatible implementations.

func (UnimplementedCRUDServer) GetService

func (UnimplementedCRUDServer) PutService

type UnsafeCRUDServer

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

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

Jump to

Keyboard shortcuts

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