v1

package
v0.0.0-...-021c090 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "NOT_FOUND",
		1: "BAD_REQUEST",
	}
	ErrorReason_value = map[string]int32{
		"NOT_FOUND":   0,
		"BAD_REQUEST": 1,
	}
)

Enum value maps for ErrorReason.

View Source
var File_api_manage_v1_error_reason_proto protoreflect.FileDescriptor
View Source
var File_api_manage_v1_manage_proto protoreflect.FileDescriptor
View Source
var Manage_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "manage.v1.Manage",
	HandlerType: (*ManageServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _Manage_Ping_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/manage/v1/manage.proto",
}

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

Functions

func ErrorBadRequest

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

func ErrorNotFound

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

func IsBadRequest

func IsBadRequest(err error) bool

func IsNotFound

func IsNotFound(err error) bool

func RegisterManageHTTPServer

func RegisterManageHTTPServer(s *http.Server, srv ManageHTTPServer)

func RegisterManageServer

func RegisterManageServer(s grpc.ServiceRegistrar, srv ManageServer)

Types

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_NOT_FOUND   ErrorReason = 0
	ErrorReason_BAD_REQUEST ErrorReason = 1
)

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 ManageClient

type ManageClient interface {
	Ping(ctx context.Context, in *PingReq, opts ...grpc.CallOption) (*PingResp, error)
}

ManageClient is the client API for Manage 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 NewManageClient

func NewManageClient(cc grpc.ClientConnInterface) ManageClient

type ManageHTTPClient

type ManageHTTPClient interface {
	Ping(ctx context.Context, req *PingReq, opts ...http.CallOption) (rsp *PingResp, err error)
}

func NewManageHTTPClient

func NewManageHTTPClient(client *http.Client) ManageHTTPClient

type ManageHTTPClientImpl

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

func (*ManageHTTPClientImpl) Ping

func (c *ManageHTTPClientImpl) Ping(ctx context.Context, in *PingReq, opts ...http.CallOption) (*PingResp, error)

type ManageHTTPServer

type ManageHTTPServer interface {
	Ping(context.Context, *PingReq) (*PingResp, error)
}

type ManageServer

type ManageServer interface {
	Ping(context.Context, *PingReq) (*PingResp, error)
	// contains filtered or unexported methods
}

ManageServer is the server API for Manage service. All implementations must embed UnimplementedManageServer for forward compatibility

type PingReq

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

func (*PingReq) Descriptor deprecated

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

Deprecated: Use PingReq.ProtoReflect.Descriptor instead.

func (*PingReq) GetMsg

func (x *PingReq) GetMsg() string

func (*PingReq) ProtoMessage

func (*PingReq) ProtoMessage()

func (*PingReq) ProtoReflect

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

func (*PingReq) Reset

func (x *PingReq) Reset()

func (*PingReq) String

func (x *PingReq) String() string

type PingResp

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

func (*PingResp) Descriptor deprecated

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

Deprecated: Use PingResp.ProtoReflect.Descriptor instead.

func (*PingResp) GetRes

func (x *PingResp) GetRes() string

func (*PingResp) ProtoMessage

func (*PingResp) ProtoMessage()

func (*PingResp) ProtoReflect

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

func (*PingResp) Reset

func (x *PingResp) Reset()

func (*PingResp) String

func (x *PingResp) String() string

type UnimplementedManageServer

type UnimplementedManageServer struct {
}

UnimplementedManageServer must be embedded to have forward compatible implementations.

func (UnimplementedManageServer) Ping

type UnsafeManageServer

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

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

Jump to

Keyboard shortcuts

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