Documentation ¶
Overview ¶
Code generated by protoc-gen-cdd. DO NOT EDIT. source: project.proto
Package project is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterProjectApiGrstServer(grpcRestServer *grst.Server, hndl ProjectApiServer)
- func RegisterProjectApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterProjectApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProjectApiClient) error
- func RegisterProjectApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterProjectApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProjectApiServer) error
- func RegisterProjectApiServer(s *grpc.Server, srv ProjectApiServer)
- func ValidateRequest(req interface{}) error
- type AuthConfig
- type CreateReq
- type DeleteReq
- type Project
- func (*Project) Descriptor() ([]byte, []int)deprecated
- func (x *Project) GetDescription() string
- func (x *Project) GetId() int32
- func (x *Project) GetName() string
- func (*Project) ProtoMessage()
- func (x *Project) ProtoReflect() protoreflect.Message
- func (x *Project) Reset()
- func (x *Project) String() string
- type ProjectApiClient
- type ProjectApiServer
- type Projects
- type UnimplementedProjectApiServer
- type UnsafeProjectApiServer
Constants ¶
This section is empty.
Variables ¶
var AuthConfigFullMethods = map[string]AuthConfig{ "/project.ProjectApi/GetAll": AuthConfig{NeedAuth: false, Roles: []string{"*"}}, "/project.ProjectApi/Create": AuthConfig{NeedAuth: false, Roles: []string{"*"}}, "/project.ProjectApi/Delete": AuthConfig{NeedAuth: false, Roles: []string{"*"}}, }
var File_project_proto protoreflect.FileDescriptor
var FullMethods = fullMethods{
ProjectApi_GetAll: "/project.ProjectApi/GetAll",
ProjectApi_Create: "/project.ProjectApi/Create",
ProjectApi_Delete: "/project.ProjectApi/Delete",
}
var NeedApiKeyFullMethods = []string{}
var NeedAuthFullMethods = []string{}
Functions ¶
func RegisterProjectApiGrstServer ¶
func RegisterProjectApiGrstServer(grpcRestServer *grst.Server, hndl ProjectApiServer)
func RegisterProjectApiHandler ¶
func RegisterProjectApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterProjectApiHandler registers the http handlers for service ProjectApi to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterProjectApiHandlerClient ¶
func RegisterProjectApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProjectApiClient) error
RegisterProjectApiHandlerClient registers the http handlers for service ProjectApi to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ProjectApiClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ProjectApiClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ProjectApiClient" to call the correct interceptors.
func RegisterProjectApiHandlerFromEndpoint ¶
func RegisterProjectApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterProjectApiHandlerFromEndpoint is same as RegisterProjectApiHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterProjectApiHandlerServer ¶
func RegisterProjectApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProjectApiServer) error
RegisterProjectApiHandlerServer registers the http handlers for service ProjectApi to "mux". UnaryRPC :call ProjectApiServer 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 RegisterProjectApiHandlerFromEndpoint instead.
func RegisterProjectApiServer ¶
func RegisterProjectApiServer(s *grpc.Server, srv ProjectApiServer)
func ValidateRequest ¶
func ValidateRequest(req interface{}) error
Types ¶
type AuthConfig ¶
type CreateReq ¶
type CreateReq struct { Name string `protobuf:"bytes,1,opt,name=Name,json=name,proto3" json:"name,omitempty" validate:"required"` Description string `protobuf:"bytes,2,opt,name=Description,json=description,proto3" json:"description,omitempty"` // contains filtered or unexported fields }
func (*CreateReq) Descriptor
deprecated
func (*CreateReq) GetDescription ¶
func (*CreateReq) ProtoMessage ¶
func (*CreateReq) ProtoMessage()
func (*CreateReq) ProtoReflect ¶
func (x *CreateReq) ProtoReflect() protoreflect.Message
type DeleteReq ¶
type DeleteReq struct { Name string `protobuf:"bytes,1,opt,name=Name,json=name,proto3" json:"name,omitempty" validate:"required"` // contains filtered or unexported fields }
func (*DeleteReq) Descriptor
deprecated
func (*DeleteReq) ProtoMessage ¶
func (*DeleteReq) ProtoMessage()
func (*DeleteReq) ProtoReflect ¶
func (x *DeleteReq) ProtoReflect() protoreflect.Message
type Project ¶
type Project struct { Id int32 `protobuf:"varint,1,opt,name=Id,json=project,proto3" json:"project,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,json=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,3,opt,name=Description,json=description,proto3" json:"description,omitempty"` // contains filtered or unexported fields }
func (*Project) Descriptor
deprecated
func (*Project) GetDescription ¶
func (*Project) ProtoMessage ¶
func (*Project) ProtoMessage()
func (*Project) ProtoReflect ¶
func (x *Project) ProtoReflect() protoreflect.Message
type ProjectApiClient ¶
type ProjectApiClient interface { GetAll(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Projects, error) Create(ctx context.Context, in *CreateReq, opts ...grpc.CallOption) (*empty.Empty, error) Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*empty.Empty, error) }
ProjectApiClient is the client API for ProjectApi 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 NewProjectApiClient ¶
func NewProjectApiClient(cc grpc.ClientConnInterface) ProjectApiClient
func NewProjectApiGrstClient ¶
func NewProjectApiGrstClient(serverHost string, creds *credentials.TransportCredentials, dialOpts ...grpc.DialOption) (ProjectApiClient, error)
type ProjectApiServer ¶
type ProjectApiServer interface { GetAll(context.Context, *empty.Empty) (*Projects, error) Create(context.Context, *CreateReq) (*empty.Empty, error) Delete(context.Context, *DeleteReq) (*empty.Empty, error) // contains filtered or unexported methods }
ProjectApiServer is the server API for ProjectApi service. All implementations must embed UnimplementedProjectApiServer for forward compatibility
type Projects ¶
type Projects struct { Projects []*Project `protobuf:"bytes,1,rep,name=Projects,json=projects,proto3" json:"projects,omitempty"` // contains filtered or unexported fields }
func (*Projects) Descriptor
deprecated
func (*Projects) GetProjects ¶
func (*Projects) ProtoMessage ¶
func (*Projects) ProtoMessage()
func (*Projects) ProtoReflect ¶
func (x *Projects) ProtoReflect() protoreflect.Message
type UnimplementedProjectApiServer ¶
type UnimplementedProjectApiServer struct { }
UnimplementedProjectApiServer must be embedded to have forward compatible implementations.
type UnsafeProjectApiServer ¶
type UnsafeProjectApiServer interface {
// contains filtered or unexported methods
}
UnsafeProjectApiServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProjectApiServer will result in compilation errors.