Documentation ¶
Overview ¶
Package appsvc is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterAppsvcHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAppsvcHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AppsvcClient) error
- func RegisterAppsvcHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAppsvcHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AppsvcServer) error
- func RegisterAppsvcServer(s grpc.ServiceRegistrar, srv AppsvcServer)
- type AppsvcClient
- type AppsvcMeta
- func (*AppsvcMeta) Descriptor() ([]byte, []int)deprecated
- func (x *AppsvcMeta) GetAppid() int32
- func (x *AppsvcMeta) GetCreateTime() *timestamppb.Timestamp
- func (x *AppsvcMeta) GetService() *service.ServiceMeta
- func (x *AppsvcMeta) GetSvcid() int32
- func (x *AppsvcMeta) GetUpdateTime() *timestamppb.Timestamp
- func (x *AppsvcMeta) GetUuid() int32
- func (*AppsvcMeta) ProtoMessage()
- func (x *AppsvcMeta) ProtoReflect() protoreflect.Message
- func (x *AppsvcMeta) Reset()
- func (x *AppsvcMeta) String() string
- type AppsvcServer
- type CreateReply
- func (*CreateReply) Descriptor() ([]byte, []int)deprecated
- func (x *CreateReply) GetAppsvc() *AppsvcMeta
- func (x *CreateReply) GetCode() int32
- func (x *CreateReply) GetMessage() string
- func (*CreateReply) ProtoMessage()
- func (x *CreateReply) ProtoReflect() protoreflect.Message
- func (x *CreateReply) Reset()
- func (x *CreateReply) String() string
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetAppid() int32
- func (x *CreateRequest) GetBody() *CreateRequest_Body
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type CreateRequest_Body
- func (*CreateRequest_Body) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest_Body) GetServiceId() int32
- func (*CreateRequest_Body) ProtoMessage()
- func (x *CreateRequest_Body) ProtoReflect() protoreflect.Message
- func (x *CreateRequest_Body) Reset()
- func (x *CreateRequest_Body) String() string
- type DeleteReply
- type DeleteRequest
- func (*DeleteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteRequest) GetAppid() int32
- func (x *DeleteRequest) GetUuid() int32
- func (*DeleteRequest) ProtoMessage()
- func (x *DeleteRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteRequest) Reset()
- func (x *DeleteRequest) String() string
- type GetReply
- func (*GetReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetReply) GetAppsvcs() []*AppsvcMeta
- func (x *GetReply) GetCode() int32
- func (x *GetReply) GetCount() int32
- func (x *GetReply) GetLimit() int32
- func (x *GetReply) GetMessage() string
- func (x *GetReply) GetPage() int32
- func (x *GetReply) GetTotal() int32
- func (*GetReply) ProtoMessage()
- func (x *GetReply) ProtoReflect() protoreflect.Message
- func (x *GetReply) Reset()
- func (x *GetReply) String() string
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetRequest) GetAppid() int32
- func (x *GetRequest) GetLimit() int32
- func (x *GetRequest) GetPage() int32
- func (x *GetRequest) GetSvcid() int32
- func (x *GetRequest) GetSvcname() string
- func (x *GetRequest) GetUuid() int32
- func (*GetRequest) ProtoMessage()
- func (x *GetRequest) ProtoReflect() protoreflect.Message
- func (x *GetRequest) Reset()
- func (x *GetRequest) String() string
- type Timestamp
- type UnimplementedAppsvcServer
- type UnsafeAppsvcServer
Constants ¶
const ( Appsvc_Create_FullMethodName = "/service.collector.appsvc.Appsvc/Create" Appsvc_Get_FullMethodName = "/service.collector.appsvc.Appsvc/Get" Appsvc_Delete_FullMethodName = "/service.collector.appsvc.Appsvc/Delete" )
Variables ¶
var Appsvc_ServiceDesc = grpc.ServiceDesc{ ServiceName: "service.collector.appsvc.Appsvc", HandlerType: (*AppsvcServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Appsvc_Create_Handler, }, { MethodName: "Get", Handler: _Appsvc_Get_Handler, }, { MethodName: "Delete", Handler: _Appsvc_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "appsvc/appsvc.proto", }
Appsvc_ServiceDesc is the grpc.ServiceDesc for Appsvc service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var E_Http = annotations.E_Http
var File_appsvc_appsvc_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAppsvcHandler ¶
RegisterAppsvcHandler registers the http handlers for service Appsvc to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAppsvcHandlerClient ¶
func RegisterAppsvcHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AppsvcClient) error
RegisterAppsvcHandlerClient registers the http handlers for service Appsvc to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AppsvcClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AppsvcClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AppsvcClient" to call the correct interceptors.
func RegisterAppsvcHandlerFromEndpoint ¶
func RegisterAppsvcHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAppsvcHandlerFromEndpoint is same as RegisterAppsvcHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAppsvcHandlerServer ¶
func RegisterAppsvcHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AppsvcServer) error
RegisterAppsvcHandlerServer registers the http handlers for service Appsvc to "mux". UnaryRPC :call AppsvcServer 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 RegisterAppsvcHandlerFromEndpoint instead.
func RegisterAppsvcServer ¶
func RegisterAppsvcServer(s grpc.ServiceRegistrar, srv AppsvcServer)
Types ¶
type AppsvcClient ¶
type AppsvcClient interface { Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateReply, error) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReply, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteReply, error) }
AppsvcClient is the client API for Appsvc 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 NewAppsvcClient ¶
func NewAppsvcClient(cc grpc.ClientConnInterface) AppsvcClient
type AppsvcMeta ¶
type AppsvcMeta struct { Uuid int32 `protobuf:"varint,1,opt,name=uuid,proto3" json:"uuid,omitempty"` Appid int32 `protobuf:"varint,2,opt,name=appid,proto3" json:"appid,omitempty"` Svcid int32 `protobuf:"varint,3,opt,name=svcid,proto3" json:"svcid,omitempty"` CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` UpdateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` Service *service.ServiceMeta `protobuf:"bytes,6,opt,name=service,proto3" json:"service,omitempty"` // contains filtered or unexported fields }
func (*AppsvcMeta) Descriptor
deprecated
func (*AppsvcMeta) Descriptor() ([]byte, []int)
Deprecated: Use AppsvcMeta.ProtoReflect.Descriptor instead.
func (*AppsvcMeta) GetAppid ¶
func (x *AppsvcMeta) GetAppid() int32
func (*AppsvcMeta) GetCreateTime ¶
func (x *AppsvcMeta) GetCreateTime() *timestamppb.Timestamp
func (*AppsvcMeta) GetService ¶
func (x *AppsvcMeta) GetService() *service.ServiceMeta
func (*AppsvcMeta) GetSvcid ¶
func (x *AppsvcMeta) GetSvcid() int32
func (*AppsvcMeta) GetUpdateTime ¶
func (x *AppsvcMeta) GetUpdateTime() *timestamppb.Timestamp
func (*AppsvcMeta) GetUuid ¶
func (x *AppsvcMeta) GetUuid() int32
func (*AppsvcMeta) ProtoMessage ¶
func (*AppsvcMeta) ProtoMessage()
func (*AppsvcMeta) ProtoReflect ¶
func (x *AppsvcMeta) ProtoReflect() protoreflect.Message
func (*AppsvcMeta) Reset ¶
func (x *AppsvcMeta) Reset()
func (*AppsvcMeta) String ¶
func (x *AppsvcMeta) String() string
type AppsvcServer ¶
type AppsvcServer interface { Create(context.Context, *CreateRequest) (*CreateReply, error) Get(context.Context, *GetRequest) (*GetReply, error) Delete(context.Context, *DeleteRequest) (*DeleteReply, error) // contains filtered or unexported methods }
AppsvcServer is the server API for Appsvc service. All implementations must embed UnimplementedAppsvcServer for forward compatibility
type CreateReply ¶
type CreateReply struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Appsvc *AppsvcMeta `protobuf:"bytes,3,opt,name=appsvc,proto3" json:"appsvc,omitempty"` // contains filtered or unexported fields }
func (*CreateReply) Descriptor
deprecated
func (*CreateReply) Descriptor() ([]byte, []int)
Deprecated: Use CreateReply.ProtoReflect.Descriptor instead.
func (*CreateReply) GetAppsvc ¶
func (x *CreateReply) GetAppsvc() *AppsvcMeta
func (*CreateReply) GetCode ¶
func (x *CreateReply) GetCode() int32
func (*CreateReply) GetMessage ¶
func (x *CreateReply) GetMessage() string
func (*CreateReply) ProtoMessage ¶
func (*CreateReply) ProtoMessage()
func (*CreateReply) ProtoReflect ¶
func (x *CreateReply) ProtoReflect() protoreflect.Message
func (*CreateReply) Reset ¶
func (x *CreateReply) Reset()
func (*CreateReply) String ¶
func (x *CreateReply) String() string
type CreateRequest ¶
type CreateRequest struct { Appid int32 `protobuf:"varint,1,opt,name=appid,proto3" json:"appid,omitempty"` Body *CreateRequest_Body `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetAppid ¶
func (x *CreateRequest) GetAppid() int32
func (*CreateRequest) GetBody ¶
func (x *CreateRequest) GetBody() *CreateRequest_Body
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type CreateRequest_Body ¶
type CreateRequest_Body struct { ServiceId int32 `protobuf:"varint,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest_Body) Descriptor
deprecated
func (*CreateRequest_Body) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest_Body.ProtoReflect.Descriptor instead.
func (*CreateRequest_Body) GetServiceId ¶
func (x *CreateRequest_Body) GetServiceId() int32
func (*CreateRequest_Body) ProtoMessage ¶
func (*CreateRequest_Body) ProtoMessage()
func (*CreateRequest_Body) ProtoReflect ¶
func (x *CreateRequest_Body) ProtoReflect() protoreflect.Message
func (*CreateRequest_Body) Reset ¶
func (x *CreateRequest_Body) Reset()
func (*CreateRequest_Body) String ¶
func (x *CreateRequest_Body) String() string
type DeleteReply ¶
type DeleteReply struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*DeleteReply) Descriptor
deprecated
func (*DeleteReply) Descriptor() ([]byte, []int)
Deprecated: Use DeleteReply.ProtoReflect.Descriptor instead.
func (*DeleteReply) GetCode ¶
func (x *DeleteReply) GetCode() int32
func (*DeleteReply) GetMessage ¶
func (x *DeleteReply) GetMessage() string
func (*DeleteReply) ProtoMessage ¶
func (*DeleteReply) ProtoMessage()
func (*DeleteReply) ProtoReflect ¶
func (x *DeleteReply) ProtoReflect() protoreflect.Message
func (*DeleteReply) Reset ¶
func (x *DeleteReply) Reset()
func (*DeleteReply) String ¶
func (x *DeleteReply) String() string
type DeleteRequest ¶
type DeleteRequest struct { Appid int32 `protobuf:"varint,1,opt,name=appid,proto3" json:"appid,omitempty"` Uuid int32 `protobuf:"varint,2,opt,name=uuid,proto3" json:"uuid,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetAppid ¶
func (x *DeleteRequest) GetAppid() int32
func (*DeleteRequest) GetUuid ¶
func (x *DeleteRequest) GetUuid() int32
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type GetReply ¶
type GetReply struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Appsvcs []*AppsvcMeta `protobuf:"bytes,3,rep,name=appsvcs,proto3" json:"appsvcs,omitempty"` Count int32 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` Total int32 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"` Page int32 `protobuf:"varint,6,opt,name=page,proto3" json:"page,omitempty"` Limit int32 `protobuf:"varint,7,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*GetReply) Descriptor
deprecated
func (*GetReply) GetAppsvcs ¶
func (x *GetReply) GetAppsvcs() []*AppsvcMeta
func (*GetReply) GetMessage ¶
func (*GetReply) ProtoMessage ¶
func (*GetReply) ProtoMessage()
func (*GetReply) ProtoReflect ¶
func (x *GetReply) ProtoReflect() protoreflect.Message
type GetRequest ¶
type GetRequest struct { Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` Appid int32 `protobuf:"varint,3,opt,name=appid,proto3" json:"appid,omitempty"` Uuid int32 `protobuf:"varint,4,opt,name=uuid,proto3" json:"uuid,omitempty"` Svcid int32 `protobuf:"varint,5,opt,name=svcid,proto3" json:"svcid,omitempty"` Svcname string `protobuf:"bytes,6,opt,name=svcname,proto3" json:"svcname,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetAppid ¶
func (x *GetRequest) GetAppid() int32
func (*GetRequest) GetLimit ¶
func (x *GetRequest) GetLimit() int32
func (*GetRequest) GetPage ¶
func (x *GetRequest) GetPage() int32
func (*GetRequest) GetSvcid ¶
func (x *GetRequest) GetSvcid() int32
func (*GetRequest) GetSvcname ¶
func (x *GetRequest) GetSvcname() string
func (*GetRequest) GetUuid ¶
func (x *GetRequest) GetUuid() int32
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type Timestamp ¶
type Timestamp = timestamppb.Timestamp
type UnimplementedAppsvcServer ¶
type UnimplementedAppsvcServer struct { }
UnimplementedAppsvcServer must be embedded to have forward compatible implementations.
func (UnimplementedAppsvcServer) Create ¶
func (UnimplementedAppsvcServer) Create(context.Context, *CreateRequest) (*CreateReply, error)
func (UnimplementedAppsvcServer) Delete ¶
func (UnimplementedAppsvcServer) Delete(context.Context, *DeleteRequest) (*DeleteReply, error)
func (UnimplementedAppsvcServer) Get ¶
func (UnimplementedAppsvcServer) Get(context.Context, *GetRequest) (*GetReply, error)
type UnsafeAppsvcServer ¶
type UnsafeAppsvcServer interface {
// contains filtered or unexported methods
}
UnsafeAppsvcServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AppsvcServer will result in compilation errors.