v1

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Demo_CreateDemo_FullMethodName = "/api.demo.v1.Demo/CreateDemo"
	Demo_UpdateDemo_FullMethodName = "/api.demo.v1.Demo/UpdateDemo"
	Demo_DeleteDemo_FullMethodName = "/api.demo.v1.Demo/DeleteDemo"
	Demo_GetDemo_FullMethodName    = "/api.demo.v1.Demo/GetDemo"
	Demo_ListDemo_FullMethodName   = "/api.demo.v1.Demo/ListDemo"
)
View Source
const OperationDemoCreateDemo = "/api.demo.v1.Demo/CreateDemo"

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "DEMO_UNSPECIFIED",
		1: "DEMO_NOT_FOUND",
		2: "DEMO_NOT_ALLOWED",
	}
	ErrorReason_value = map[string]int32{
		"DEMO_UNSPECIFIED": 0,
		"DEMO_NOT_FOUND":   1,
		"DEMO_NOT_ALLOWED": 2,
	}
)

Enum value maps for ErrorReason.

View Source
var Demo_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.demo.v1.Demo",
	HandlerType: (*DemoServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateDemo",
			Handler:    _Demo_CreateDemo_Handler,
		},
		{
			MethodName: "UpdateDemo",
			Handler:    _Demo_UpdateDemo_Handler,
		},
		{
			MethodName: "DeleteDemo",
			Handler:    _Demo_DeleteDemo_Handler,
		},
		{
			MethodName: "GetDemo",
			Handler:    _Demo_GetDemo_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ListDemo",
			Handler:       _Demo_ListDemo_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "demo/v1/demo.proto",
}

Demo_ServiceDesc is the grpc.ServiceDesc for Demo 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_api_demo_v1_demo_proto protoreflect.FileDescriptor

Functions

func ErrorDemoNotAllowed

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

func ErrorDemoNotFound

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

func ErrorDemoUnspecified

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

func IsDemoNotAllowed

func IsDemoNotAllowed(err error) bool

func IsDemoNotFound

func IsDemoNotFound(err error) bool

func IsDemoUnspecified

func IsDemoUnspecified(err error) bool

func RegisterDemoHTTPServer

func RegisterDemoHTTPServer(s *http.Server, srv DemoHTTPServer)

func RegisterDemoServer

func RegisterDemoServer(s grpc.ServiceRegistrar, srv DemoServer)

Types

type CreateDemoReply

type CreateDemoReply struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Msg  string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateDemoReply) Descriptor deprecated

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

Deprecated: Use CreateDemoReply.ProtoReflect.Descriptor instead.

func (*CreateDemoReply) GetMsg

func (x *CreateDemoReply) GetMsg() string

func (*CreateDemoReply) GetName

func (x *CreateDemoReply) GetName() string

func (*CreateDemoReply) ProtoMessage

func (*CreateDemoReply) ProtoMessage()

func (*CreateDemoReply) ProtoReflect

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

func (*CreateDemoReply) Reset

func (x *CreateDemoReply) Reset()

func (*CreateDemoReply) String

func (x *CreateDemoReply) String() string

type CreateDemoRequest

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

func (*CreateDemoRequest) Descriptor deprecated

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

Deprecated: Use CreateDemoRequest.ProtoReflect.Descriptor instead.

func (*CreateDemoRequest) GetName

func (x *CreateDemoRequest) GetName() string

func (*CreateDemoRequest) ProtoMessage

func (*CreateDemoRequest) ProtoMessage()

func (*CreateDemoRequest) ProtoReflect

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

func (*CreateDemoRequest) Reset

func (x *CreateDemoRequest) Reset()

func (*CreateDemoRequest) String

func (x *CreateDemoRequest) String() string

type DeleteDemoReply

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

func (*DeleteDemoReply) Descriptor deprecated

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

Deprecated: Use DeleteDemoReply.ProtoReflect.Descriptor instead.

func (*DeleteDemoReply) ProtoMessage

func (*DeleteDemoReply) ProtoMessage()

func (*DeleteDemoReply) ProtoReflect

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

func (*DeleteDemoReply) Reset

func (x *DeleteDemoReply) Reset()

func (*DeleteDemoReply) String

func (x *DeleteDemoReply) String() string

type DeleteDemoRequest

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

func (*DeleteDemoRequest) Descriptor deprecated

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

Deprecated: Use DeleteDemoRequest.ProtoReflect.Descriptor instead.

func (*DeleteDemoRequest) ProtoMessage

func (*DeleteDemoRequest) ProtoMessage()

func (*DeleteDemoRequest) ProtoReflect

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

func (*DeleteDemoRequest) Reset

func (x *DeleteDemoRequest) Reset()

func (*DeleteDemoRequest) String

func (x *DeleteDemoRequest) String() string

type DemoClient

type DemoClient interface {
	CreateDemo(ctx context.Context, in *CreateDemoRequest, opts ...grpc.CallOption) (*CreateDemoReply, error)
	UpdateDemo(ctx context.Context, in *UpdateDemoRequest, opts ...grpc.CallOption) (*UpdateDemoReply, error)
	DeleteDemo(ctx context.Context, in *DeleteDemoRequest, opts ...grpc.CallOption) (*DeleteDemoReply, error)
	GetDemo(ctx context.Context, in *GetDemoRequest, opts ...grpc.CallOption) (*GetDemoReply, error)
	ListDemo(ctx context.Context, in *ListDemoRequest, opts ...grpc.CallOption) (Demo_ListDemoClient, error)
}

DemoClient is the client API for Demo 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 NewDemoClient

func NewDemoClient(cc grpc.ClientConnInterface) DemoClient

type DemoHTTPClient

type DemoHTTPClient interface {
	CreateDemo(ctx context.Context, req *CreateDemoRequest, opts ...http.CallOption) (rsp *CreateDemoReply, err error)
}

func NewDemoHTTPClient

func NewDemoHTTPClient(client *http.Client) DemoHTTPClient

type DemoHTTPClientImpl

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

func (*DemoHTTPClientImpl) CreateDemo

type DemoHTTPServer

type DemoHTTPServer interface {
	CreateDemo(context.Context, *CreateDemoRequest) (*CreateDemoReply, error)
}

type DemoServer

type DemoServer interface {
	CreateDemo(context.Context, *CreateDemoRequest) (*CreateDemoReply, error)
	UpdateDemo(context.Context, *UpdateDemoRequest) (*UpdateDemoReply, error)
	DeleteDemo(context.Context, *DeleteDemoRequest) (*DeleteDemoReply, error)
	GetDemo(context.Context, *GetDemoRequest) (*GetDemoReply, error)
	ListDemo(*ListDemoRequest, Demo_ListDemoServer) error
	// contains filtered or unexported methods
}

DemoServer is the server API for Demo service. All implementations must embed UnimplementedDemoServer for forward compatibility

type Demo_ListDemoClient

type Demo_ListDemoClient interface {
	Recv() (*ListDemoReply, error)
	grpc.ClientStream
}

type Demo_ListDemoServer

type Demo_ListDemoServer interface {
	Send(*ListDemoReply) error
	grpc.ServerStream
}

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_DEMO_UNSPECIFIED ErrorReason = 0
	ErrorReason_DEMO_NOT_FOUND   ErrorReason = 1
	ErrorReason_DEMO_NOT_ALLOWED 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 GetDemoReply

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

func (*GetDemoReply) Descriptor deprecated

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

Deprecated: Use GetDemoReply.ProtoReflect.Descriptor instead.

func (*GetDemoReply) ProtoMessage

func (*GetDemoReply) ProtoMessage()

func (*GetDemoReply) ProtoReflect

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

func (*GetDemoReply) Reset

func (x *GetDemoReply) Reset()

func (*GetDemoReply) String

func (x *GetDemoReply) String() string

type GetDemoRequest

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

func (*GetDemoRequest) Descriptor deprecated

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

Deprecated: Use GetDemoRequest.ProtoReflect.Descriptor instead.

func (*GetDemoRequest) ProtoMessage

func (*GetDemoRequest) ProtoMessage()

func (*GetDemoRequest) ProtoReflect

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

func (*GetDemoRequest) Reset

func (x *GetDemoRequest) Reset()

func (*GetDemoRequest) String

func (x *GetDemoRequest) String() string

type ListDemoReply

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

func (*ListDemoReply) Descriptor deprecated

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

Deprecated: Use ListDemoReply.ProtoReflect.Descriptor instead.

func (*ListDemoReply) GetData

func (x *ListDemoReply) GetData() string

func (*ListDemoReply) ProtoMessage

func (*ListDemoReply) ProtoMessage()

func (*ListDemoReply) ProtoReflect

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

func (*ListDemoReply) Reset

func (x *ListDemoReply) Reset()

func (*ListDemoReply) String

func (x *ListDemoReply) String() string

type ListDemoRequest

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

func (*ListDemoRequest) Descriptor deprecated

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

Deprecated: Use ListDemoRequest.ProtoReflect.Descriptor instead.

func (*ListDemoRequest) GetData

func (x *ListDemoRequest) GetData() string

func (*ListDemoRequest) ProtoMessage

func (*ListDemoRequest) ProtoMessage()

func (*ListDemoRequest) ProtoReflect

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

func (*ListDemoRequest) Reset

func (x *ListDemoRequest) Reset()

func (*ListDemoRequest) String

func (x *ListDemoRequest) String() string

type UnimplementedDemoServer

type UnimplementedDemoServer struct {
}

UnimplementedDemoServer must be embedded to have forward compatible implementations.

func (UnimplementedDemoServer) CreateDemo

func (UnimplementedDemoServer) DeleteDemo

func (UnimplementedDemoServer) GetDemo

func (UnimplementedDemoServer) ListDemo

func (UnimplementedDemoServer) UpdateDemo

type UnsafeDemoServer

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

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

type UpdateDemoReply

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

func (*UpdateDemoReply) Descriptor deprecated

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

Deprecated: Use UpdateDemoReply.ProtoReflect.Descriptor instead.

func (*UpdateDemoReply) ProtoMessage

func (*UpdateDemoReply) ProtoMessage()

func (*UpdateDemoReply) ProtoReflect

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

func (*UpdateDemoReply) Reset

func (x *UpdateDemoReply) Reset()

func (*UpdateDemoReply) String

func (x *UpdateDemoReply) String() string

type UpdateDemoRequest

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

func (*UpdateDemoRequest) Descriptor deprecated

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

Deprecated: Use UpdateDemoRequest.ProtoReflect.Descriptor instead.

func (*UpdateDemoRequest) ProtoMessage

func (*UpdateDemoRequest) ProtoMessage()

func (*UpdateDemoRequest) ProtoReflect

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

func (*UpdateDemoRequest) Reset

func (x *UpdateDemoRequest) Reset()

func (*UpdateDemoRequest) String

func (x *UpdateDemoRequest) String() string

Jump to

Keyboard shortcuts

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