project

package
v0.0.0-...-3439342 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
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{"*"}},
}
View Source
var File_project_proto protoreflect.FileDescriptor
View Source
var FullMethods = fullMethods{
	ProjectApi_GetAll: "/project.ProjectApi/GetAll",
	ProjectApi_Create: "/project.ProjectApi/Create",
	ProjectApi_Delete: "/project.ProjectApi/Delete",
}
View Source
var NeedApiKeyFullMethods = []string{}
View Source
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 AuthConfig struct {
	NeedAuth bool
	Roles    []string
}

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) Descriptor() ([]byte, []int)

Deprecated: Use CreateReq.ProtoReflect.Descriptor instead.

func (*CreateReq) GetDescription

func (x *CreateReq) GetDescription() string

func (*CreateReq) GetName

func (x *CreateReq) GetName() string

func (*CreateReq) ProtoMessage

func (*CreateReq) ProtoMessage()

func (*CreateReq) ProtoReflect

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

func (*CreateReq) Reset

func (x *CreateReq) Reset()

func (*CreateReq) String

func (x *CreateReq) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use DeleteReq.ProtoReflect.Descriptor instead.

func (*DeleteReq) GetName

func (x *DeleteReq) GetName() string

func (*DeleteReq) ProtoMessage

func (*DeleteReq) ProtoMessage()

func (*DeleteReq) ProtoReflect

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

func (*DeleteReq) Reset

func (x *DeleteReq) Reset()

func (*DeleteReq) String

func (x *DeleteReq) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Project.ProtoReflect.Descriptor instead.

func (*Project) GetDescription

func (x *Project) GetDescription() string

func (*Project) GetId

func (x *Project) GetId() int32

func (*Project) GetName

func (x *Project) GetName() string

func (*Project) ProtoMessage

func (*Project) ProtoMessage()

func (*Project) ProtoReflect

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

func (*Project) Reset

func (x *Project) Reset()

func (*Project) String

func (x *Project) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Projects.ProtoReflect.Descriptor instead.

func (*Projects) GetProjects

func (x *Projects) GetProjects() []*Project

func (*Projects) ProtoMessage

func (*Projects) ProtoMessage()

func (*Projects) ProtoReflect

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

func (*Projects) Reset

func (x *Projects) Reset()

func (*Projects) String

func (x *Projects) String() string

type UnimplementedProjectApiServer

type UnimplementedProjectApiServer struct {
}

UnimplementedProjectApiServer must be embedded to have forward compatible implementations.

func (UnimplementedProjectApiServer) Create

func (UnimplementedProjectApiServer) Delete

func (UnimplementedProjectApiServer) GetAll

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.

Jump to

Keyboard shortcuts

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