Documentation ¶
Overview ¶
Package applications is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterApplicationsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterApplicationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ApplicationsClient) error
- func RegisterApplicationsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterApplicationsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ApplicationsServer) error
- func RegisterApplicationsServer(s grpc.ServiceRegistrar, srv ApplicationsServer)
- type Application
- func (*Application) Descriptor() ([]byte, []int)deprecated
- func (x *Application) GetName() string
- func (x *Application) GetPath() string
- func (x *Application) GetUrl() string
- func (*Application) ProtoMessage()
- func (x *Application) ProtoReflect() protoreflect.Message
- func (x *Application) Reset()
- func (x *Application) String() string
- type ApplicationsClient
- type ApplicationsServer
- type GetApplicationRequest
- func (*GetApplicationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetApplicationRequest) GetApplicationName() string
- func (*GetApplicationRequest) ProtoMessage()
- func (x *GetApplicationRequest) ProtoReflect() protoreflect.Message
- func (x *GetApplicationRequest) Reset()
- func (x *GetApplicationRequest) String() string
- type GetApplicationResponse
- func (*GetApplicationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetApplicationResponse) GetApplication() *Application
- func (*GetApplicationResponse) ProtoMessage()
- func (x *GetApplicationResponse) ProtoReflect() protoreflect.Message
- func (x *GetApplicationResponse) Reset()
- func (x *GetApplicationResponse) String() string
- type ListApplicationsRequest
- type ListApplicationsResponse
- func (*ListApplicationsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListApplicationsResponse) GetApplications() []*Application
- func (*ListApplicationsResponse) ProtoMessage()
- func (x *ListApplicationsResponse) ProtoReflect() protoreflect.Message
- func (x *ListApplicationsResponse) Reset()
- func (x *ListApplicationsResponse) String() string
- type UnimplementedApplicationsServer
- type UnsafeApplicationsServer
Constants ¶
This section is empty.
Variables ¶
var Applications_ServiceDesc = grpc.ServiceDesc{ ServiceName: "wego_server.v1.Applications", HandlerType: (*ApplicationsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListApplications", Handler: _Applications_ListApplications_Handler, }, { MethodName: "GetApplication", Handler: _Applications_GetApplication_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/applications/applications.proto", }
Applications_ServiceDesc is the grpc.ServiceDesc for Applications service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_applications_applications_proto protoreflect.FileDescriptor
Functions ¶
func RegisterApplicationsHandler ¶
func RegisterApplicationsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterApplicationsHandler registers the http handlers for service Applications to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterApplicationsHandlerClient ¶
func RegisterApplicationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ApplicationsClient) error
RegisterApplicationsHandlerClient registers the http handlers for service Applications to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ApplicationsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ApplicationsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ApplicationsClient" to call the correct interceptors.
func RegisterApplicationsHandlerFromEndpoint ¶
func RegisterApplicationsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterApplicationsHandlerFromEndpoint is same as RegisterApplicationsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterApplicationsHandlerServer ¶
func RegisterApplicationsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ApplicationsServer) error
RegisterApplicationsHandlerServer registers the http handlers for service Applications to "mux". UnaryRPC :call ApplicationsServer 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 RegisterApplicationsHandlerFromEndpoint instead.
func RegisterApplicationsServer ¶
func RegisterApplicationsServer(s grpc.ServiceRegistrar, srv ApplicationsServer)
Types ¶
type Application ¶
type Application struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The name of the application Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` // The file path where the k8s yaml files for this application are stored. Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` // The git repository URL for this application // contains filtered or unexported fields }
func (*Application) Descriptor
deprecated
func (*Application) Descriptor() ([]byte, []int)
Deprecated: Use Application.ProtoReflect.Descriptor instead.
func (*Application) GetName ¶
func (x *Application) GetName() string
func (*Application) GetPath ¶
func (x *Application) GetPath() string
func (*Application) GetUrl ¶
func (x *Application) GetUrl() string
func (*Application) ProtoMessage ¶
func (*Application) ProtoMessage()
func (*Application) ProtoReflect ¶
func (x *Application) ProtoReflect() protoreflect.Message
func (*Application) Reset ¶
func (x *Application) Reset()
func (*Application) String ¶
func (x *Application) String() string
type ApplicationsClient ¶
type ApplicationsClient interface { // // ListApplications returns the list of WeGo applications that the authenticated user has access to. ListApplications(ctx context.Context, in *ListApplicationsRequest, opts ...grpc.CallOption) (*ListApplicationsResponse, error) // // GetApplication returns a given application GetApplication(ctx context.Context, in *GetApplicationRequest, opts ...grpc.CallOption) (*GetApplicationResponse, error) }
ApplicationsClient is the client API for Applications 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 NewApplicationsClient ¶
func NewApplicationsClient(cc grpc.ClientConnInterface) ApplicationsClient
type ApplicationsServer ¶
type ApplicationsServer interface { // // ListApplications returns the list of WeGo applications that the authenticated user has access to. ListApplications(context.Context, *ListApplicationsRequest) (*ListApplicationsResponse, error) // // GetApplication returns a given application GetApplication(context.Context, *GetApplicationRequest) (*GetApplicationResponse, error) // contains filtered or unexported methods }
ApplicationsServer is the server API for Applications service. All implementations must embed UnimplementedApplicationsServer for forward compatibility
type GetApplicationRequest ¶
type GetApplicationRequest struct { ApplicationName string `protobuf:"bytes,1,opt,name=application_name,json=applicationName,proto3" json:"application_name,omitempty"` // The name of an application // contains filtered or unexported fields }
func (*GetApplicationRequest) Descriptor
deprecated
func (*GetApplicationRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetApplicationRequest.ProtoReflect.Descriptor instead.
func (*GetApplicationRequest) GetApplicationName ¶
func (x *GetApplicationRequest) GetApplicationName() string
func (*GetApplicationRequest) ProtoMessage ¶
func (*GetApplicationRequest) ProtoMessage()
func (*GetApplicationRequest) ProtoReflect ¶
func (x *GetApplicationRequest) ProtoReflect() protoreflect.Message
func (*GetApplicationRequest) Reset ¶
func (x *GetApplicationRequest) Reset()
func (*GetApplicationRequest) String ¶
func (x *GetApplicationRequest) String() string
type GetApplicationResponse ¶
type GetApplicationResponse struct { Application *Application `protobuf:"bytes,1,opt,name=application,proto3" json:"application,omitempty"` // contains filtered or unexported fields }
func (*GetApplicationResponse) Descriptor
deprecated
func (*GetApplicationResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetApplicationResponse.ProtoReflect.Descriptor instead.
func (*GetApplicationResponse) GetApplication ¶
func (x *GetApplicationResponse) GetApplication() *Application
func (*GetApplicationResponse) ProtoMessage ¶
func (*GetApplicationResponse) ProtoMessage()
func (*GetApplicationResponse) ProtoReflect ¶
func (x *GetApplicationResponse) ProtoReflect() protoreflect.Message
func (*GetApplicationResponse) Reset ¶
func (x *GetApplicationResponse) Reset()
func (*GetApplicationResponse) String ¶
func (x *GetApplicationResponse) String() string
type ListApplicationsRequest ¶
type ListApplicationsRequest struct {
// contains filtered or unexported fields
}
func (*ListApplicationsRequest) Descriptor
deprecated
func (*ListApplicationsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListApplicationsRequest.ProtoReflect.Descriptor instead.
func (*ListApplicationsRequest) ProtoMessage ¶
func (*ListApplicationsRequest) ProtoMessage()
func (*ListApplicationsRequest) ProtoReflect ¶
func (x *ListApplicationsRequest) ProtoReflect() protoreflect.Message
func (*ListApplicationsRequest) Reset ¶
func (x *ListApplicationsRequest) Reset()
func (*ListApplicationsRequest) String ¶
func (x *ListApplicationsRequest) String() string
type ListApplicationsResponse ¶
type ListApplicationsResponse struct { Applications []*Application `protobuf:"bytes,1,rep,name=applications,proto3" json:"applications,omitempty"` // A list of applications // contains filtered or unexported fields }
func (*ListApplicationsResponse) Descriptor
deprecated
func (*ListApplicationsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListApplicationsResponse.ProtoReflect.Descriptor instead.
func (*ListApplicationsResponse) GetApplications ¶
func (x *ListApplicationsResponse) GetApplications() []*Application
func (*ListApplicationsResponse) ProtoMessage ¶
func (*ListApplicationsResponse) ProtoMessage()
func (*ListApplicationsResponse) ProtoReflect ¶
func (x *ListApplicationsResponse) ProtoReflect() protoreflect.Message
func (*ListApplicationsResponse) Reset ¶
func (x *ListApplicationsResponse) Reset()
func (*ListApplicationsResponse) String ¶
func (x *ListApplicationsResponse) String() string
type UnimplementedApplicationsServer ¶
type UnimplementedApplicationsServer struct { }
UnimplementedApplicationsServer must be embedded to have forward compatible implementations.
func (UnimplementedApplicationsServer) GetApplication ¶
func (UnimplementedApplicationsServer) GetApplication(context.Context, *GetApplicationRequest) (*GetApplicationResponse, error)
func (UnimplementedApplicationsServer) ListApplications ¶
func (UnimplementedApplicationsServer) ListApplications(context.Context, *ListApplicationsRequest) (*ListApplicationsResponse, error)
type UnsafeApplicationsServer ¶
type UnsafeApplicationsServer interface {
// contains filtered or unexported methods
}
UnsafeApplicationsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ApplicationsServer will result in compilation errors.