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) GetDeploymentConditions() []*Condition
- func (x *Application) GetName() string
- func (x *Application) GetPath() string
- func (x *Application) GetSourceConditions() []*Condition
- 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 Condition
- func (*Condition) Descriptor() ([]byte, []int)deprecated
- func (x *Condition) GetMessage() string
- func (x *Condition) GetReason() string
- func (x *Condition) GetStatus() string
- func (x *Condition) GetTimestamp() int32
- func (x *Condition) GetType() string
- func (*Condition) ProtoMessage()
- func (x *Condition) ProtoReflect() protoreflect.Message
- func (x *Condition) Reset()
- func (x *Condition) String() string
- type GetApplicationRequest
- func (*GetApplicationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetApplicationRequest) GetName() string
- func (x *GetApplicationRequest) GetNamespace() 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
- func (*ListApplicationsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListApplicationsRequest) GetNamespace() string
- func (*ListApplicationsRequest) ProtoMessage()
- func (x *ListApplicationsRequest) ProtoReflect() protoreflect.Message
- func (x *ListApplicationsRequest) Reset()
- func (x *ListApplicationsRequest) String() string
- 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 SourceConditions []*Condition `protobuf:"bytes,4,rep,name=source_conditions,json=sourceConditions,proto3" json:"source_conditions,omitempty"` // A list of conditions for the Source related to this Application DeploymentConditions []*Condition `protobuf:"bytes,5,rep,name=deployment_conditions,json=deploymentConditions,proto3" json:"deployment_conditions,omitempty"` // A list of conditions for the Kustomization or HelmRelease 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) GetDeploymentConditions ¶ added in v0.2.2
func (x *Application) GetDeploymentConditions() []*Condition
func (*Application) GetName ¶
func (x *Application) GetName() string
func (*Application) GetPath ¶
func (x *Application) GetPath() string
func (*Application) GetSourceConditions ¶ added in v0.2.2
func (x *Application) GetSourceConditions() []*Condition
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 Condition ¶ added in v0.2.2
type Condition struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` Timestamp int32 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
This object represents a single condition for a Kubernetes object. It roughly matches the Kubernetes type defined here: https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Condition
func (*Condition) Descriptor
deprecated
added in
v0.2.2
func (*Condition) GetMessage ¶ added in v0.2.2
func (*Condition) GetTimestamp ¶ added in v0.2.2
func (*Condition) ProtoMessage ¶ added in v0.2.2
func (*Condition) ProtoMessage()
func (*Condition) ProtoReflect ¶ added in v0.2.2
func (x *Condition) ProtoReflect() protoreflect.Message
type GetApplicationRequest ¶
type GetApplicationRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The name of an application Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` // The kubernetes namespace of the application. Default is `wego-system` // contains filtered or unexported fields }
func (*GetApplicationRequest) Descriptor
deprecated
func (*GetApplicationRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetApplicationRequest.ProtoReflect.Descriptor instead.
func (*GetApplicationRequest) GetName ¶ added in v0.2.1
func (x *GetApplicationRequest) GetName() string
func (*GetApplicationRequest) GetNamespace ¶ added in v0.2.1
func (x *GetApplicationRequest) GetNamespace() 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 { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // The namespace to look for applications // contains filtered or unexported fields }
func (*ListApplicationsRequest) Descriptor
deprecated
func (*ListApplicationsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListApplicationsRequest.ProtoReflect.Descriptor instead.
func (*ListApplicationsRequest) GetNamespace ¶ added in v0.2.0
func (x *ListApplicationsRequest) GetNamespace() string
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.