Documentation ¶
Overview ¶
Package api is a generated protocol buffer package.
It is generated from these files:
api/api.proto
It has these top-level messages:
Service Project Response
Package api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterProjectServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterProjectServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterProjectServiceServer(s *grpc.Server, srv ProjectServiceServer)
- type Project
- type ProjectServiceClient
- type ProjectServiceServer
- type Response
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterProjectServiceHandler ¶
func RegisterProjectServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterProjectServiceHandler registers the http handlers for service ProjectService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterProjectServiceHandlerFromEndpoint ¶
func RegisterProjectServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterProjectServiceHandlerFromEndpoint is same as RegisterProjectServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterProjectServiceServer ¶
func RegisterProjectServiceServer(s *grpc.Server, srv ProjectServiceServer)
Types ¶
type Project ¶
type Project struct { Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"` Version string `protobuf:"bytes,2,opt,name=Version" json:"Version,omitempty"` Services map[string]*Service `` /* 136-byte string literal not displayed */ }
func (*Project) Descriptor ¶
func (*Project) GetServices ¶
func (*Project) GetVersion ¶
func (*Project) ProtoMessage ¶
func (*Project) ProtoMessage()
type ProjectServiceClient ¶
type ProjectServiceClient interface { Start(ctx context.Context, in *Project, opts ...grpc.CallOption) (*Response, error) Status(ctx context.Context, in *Project, opts ...grpc.CallOption) (*Response, error) Stop(ctx context.Context, in *Project, opts ...grpc.CallOption) (*Response, error) }
func NewProjectServiceClient ¶
func NewProjectServiceClient(cc *grpc.ClientConn) ProjectServiceClient
type ProjectServiceServer ¶
type ProjectServiceServer interface { Start(context.Context, *Project) (*Response, error) Status(context.Context, *Project) (*Response, error) Stop(context.Context, *Project) (*Response, error) }
func NewProjectService ¶
func NewProjectService() ProjectServiceServer
NewProjectService create a new project handler server
type Response ¶
type Response struct { Code int32 `protobuf:"varint,1,opt,name=code" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` }
func (*Response) Descriptor ¶
func (*Response) GetMessage ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
type Service ¶
type Service struct { Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"` Tags map[string]string `` /* 128-byte string literal not displayed */ File []byte `protobuf:"bytes,3,opt,name=File,proto3" json:"File,omitempty"` Mode string `protobuf:"bytes,4,opt,name=Mode" json:"Mode,omitempty"` }
func (*Service) Descriptor ¶
func (*Service) ProtoMessage ¶
func (*Service) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.