application

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package application is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Application_Create_FullMethodName = "/service.collector.application.Application/Create"
	Application_Get_FullMethodName    = "/service.collector.application.Application/Get"
	Application_Delete_FullMethodName = "/service.collector.application.Application/Delete"
	Application_Update_FullMethodName = "/service.collector.application.Application/Update"
)

Variables

View Source
var Application_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "service.collector.application.Application",
	HandlerType: (*ApplicationServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _Application_Create_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Application_Get_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Application_Delete_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _Application_Update_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "application/application.proto",
}

Application_ServiceDesc is the grpc.ServiceDesc for Application 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_application_application_proto protoreflect.FileDescriptor

Functions

func RegisterApplicationHandler

func RegisterApplicationHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterApplicationHandler registers the http handlers for service Application to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterApplicationHandlerClient

func RegisterApplicationHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ApplicationClient) error

RegisterApplicationHandlerClient registers the http handlers for service Application to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ApplicationClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ApplicationClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ApplicationClient" to call the correct interceptors.

func RegisterApplicationHandlerFromEndpoint

func RegisterApplicationHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterApplicationHandlerFromEndpoint is same as RegisterApplicationHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterApplicationHandlerServer

func RegisterApplicationHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ApplicationServer) error

RegisterApplicationHandlerServer registers the http handlers for service Application to "mux". UnaryRPC :call ApplicationServer 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 RegisterApplicationHandlerFromEndpoint instead.

func RegisterApplicationServer

func RegisterApplicationServer(s grpc.ServiceRegistrar, srv ApplicationServer)

Types

type ApplicationClient

type ApplicationClient 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)
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateReply, error)
}

ApplicationClient is the client API for Application 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.

type ApplicationMete

type ApplicationMete struct {
	Uuid       int32                  `protobuf:"varint,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Name       string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Describe   string                 `protobuf:"bytes,3,opt,name=describe,proto3" json:"describe,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"`
	TenantId   int32                  `protobuf:"varint,6,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ApplicationMete) Descriptor deprecated

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

Deprecated: Use ApplicationMete.ProtoReflect.Descriptor instead.

func (*ApplicationMete) GetCreateTime

func (x *ApplicationMete) GetCreateTime() *timestamppb.Timestamp

func (*ApplicationMete) GetDescribe

func (x *ApplicationMete) GetDescribe() string

func (*ApplicationMete) GetName

func (x *ApplicationMete) GetName() string

func (*ApplicationMete) GetTenantId

func (x *ApplicationMete) GetTenantId() int32

func (*ApplicationMete) GetUpdateTime

func (x *ApplicationMete) GetUpdateTime() *timestamppb.Timestamp

func (*ApplicationMete) GetUuid

func (x *ApplicationMete) GetUuid() int32

func (*ApplicationMete) ProtoMessage

func (*ApplicationMete) ProtoMessage()

func (*ApplicationMete) ProtoReflect

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

func (*ApplicationMete) Reset

func (x *ApplicationMete) Reset()

func (*ApplicationMete) String

func (x *ApplicationMete) String() string

type ApplicationServer

type ApplicationServer interface {
	Create(context.Context, *CreateRequest) (*CreateReply, error)
	Get(context.Context, *GetRequest) (*GetReply, error)
	Delete(context.Context, *DeleteRequest) (*DeleteReply, error)
	Update(context.Context, *UpdateRequest) (*UpdateReply, error)
	// contains filtered or unexported methods
}

ApplicationServer is the server API for Application service. All implementations must embed UnimplementedApplicationServer 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"`
	Application *ApplicationMete `protobuf:"bytes,3,opt,name=application,proto3" json:"application,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateReply) Descriptor deprecated

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

Deprecated: Use CreateReply.ProtoReflect.Descriptor instead.

func (*CreateReply) GetApplication

func (x *CreateReply) GetApplication() *ApplicationMete

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 {
	Name     string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Describe string `protobuf:"bytes,2,opt,name=describe,proto3" json:"describe,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetDescribe

func (x *CreateRequest) GetDescribe() string

func (*CreateRequest) GetName

func (x *CreateRequest) GetName() string

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 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 {
	Uuid int32 `protobuf:"varint,1,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) 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"`
	Applications []*ApplicationMete `protobuf:"bytes,3,rep,name=applications,proto3" json:"applications,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) Descriptor() ([]byte, []int)

Deprecated: Use GetReply.ProtoReflect.Descriptor instead.

func (*GetReply) GetApplications

func (x *GetReply) GetApplications() []*ApplicationMete

func (*GetReply) GetCode

func (x *GetReply) GetCode() int32

func (*GetReply) GetCount

func (x *GetReply) GetCount() int32

func (*GetReply) GetLimit

func (x *GetReply) GetLimit() int32

func (*GetReply) GetMessage

func (x *GetReply) GetMessage() string

func (*GetReply) GetPage

func (x *GetReply) GetPage() int32

func (*GetReply) GetTotal

func (x *GetReply) GetTotal() int32

func (*GetReply) ProtoMessage

func (*GetReply) ProtoMessage()

func (*GetReply) ProtoReflect

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

func (*GetReply) Reset

func (x *GetReply) Reset()

func (*GetReply) String

func (x *GetReply) String() string

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"`
	Uuid  int32  `protobuf:"varint,3,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Name  string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetLimit

func (x *GetRequest) GetLimit() int32

func (*GetRequest) GetName

func (x *GetRequest) GetName() string

func (*GetRequest) GetPage

func (x *GetRequest) GetPage() int32

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 UnimplementedApplicationServer

type UnimplementedApplicationServer struct {
}

UnimplementedApplicationServer must be embedded to have forward compatible implementations.

func (UnimplementedApplicationServer) Create

func (UnimplementedApplicationServer) Delete

func (UnimplementedApplicationServer) Get

func (UnimplementedApplicationServer) Update

type UnsafeApplicationServer

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

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

type UpdateReply

type UpdateReply 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"`
	Application *ApplicationMete `protobuf:"bytes,3,opt,name=application,proto3" json:"application,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateReply) Descriptor deprecated

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

Deprecated: Use UpdateReply.ProtoReflect.Descriptor instead.

func (*UpdateReply) GetApplication

func (x *UpdateReply) GetApplication() *ApplicationMete

func (*UpdateReply) GetCode

func (x *UpdateReply) GetCode() int32

func (*UpdateReply) GetMessage

func (x *UpdateReply) GetMessage() string

func (*UpdateReply) ProtoMessage

func (*UpdateReply) ProtoMessage()

func (*UpdateReply) ProtoReflect

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

func (*UpdateReply) Reset

func (x *UpdateReply) Reset()

func (*UpdateReply) String

func (x *UpdateReply) String() string

type UpdateRequest

type UpdateRequest struct {
	Uuid     int32  `protobuf:"varint,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Name     string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Describe string `protobuf:"bytes,3,opt,name=describe,proto3" json:"describe,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRequest) Descriptor deprecated

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

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetDescribe

func (x *UpdateRequest) GetDescribe() string

func (*UpdateRequest) GetName

func (x *UpdateRequest) GetName() string

func (*UpdateRequest) GetUuid

func (x *UpdateRequest) GetUuid() int32

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) ProtoReflect

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

func (*UpdateRequest) Reset

func (x *UpdateRequest) Reset()

func (*UpdateRequest) String

func (x *UpdateRequest) String() string

Jump to

Keyboard shortcuts

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