project_go_proto

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 17 Imported by: 14

Documentation

Overview

Package project_go_proto is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_project_proto protoreflect.FileDescriptor

Functions

func RegisterProjectsHandler

func RegisterProjectsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterProjectsHandler registers the http handlers for service Projects to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterProjectsHandlerClient

func RegisterProjectsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProjectsClient) error

RegisterProjectsHandlerClient registers the http handlers for service Projects to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ProjectsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ProjectsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ProjectsClient" to call the correct interceptors.

func RegisterProjectsHandlerFromEndpoint

func RegisterProjectsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterProjectsHandlerFromEndpoint is same as RegisterProjectsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterProjectsHandlerServer added in v0.2.0

func RegisterProjectsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProjectsServer) error

RegisterProjectsHandlerServer registers the http handlers for service Projects to "mux". UnaryRPC :call ProjectsServer 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 RegisterProjectsHandlerFromEndpoint instead.

func RegisterProjectsServer

func RegisterProjectsServer(s grpc.ServiceRegistrar, srv ProjectsServer)

Types

type CreateProjectRequest

type CreateProjectRequest struct {

	// The project to create.
	Project *Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
	// contains filtered or unexported fields
}

Request to create a new project.

func (*CreateProjectRequest) Descriptor deprecated

func (*CreateProjectRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateProjectRequest.ProtoReflect.Descriptor instead.

func (*CreateProjectRequest) GetProject

func (x *CreateProjectRequest) GetProject() *Project

func (*CreateProjectRequest) ProtoMessage

func (*CreateProjectRequest) ProtoMessage()

func (*CreateProjectRequest) ProtoReflect added in v0.2.0

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

func (*CreateProjectRequest) Reset

func (x *CreateProjectRequest) Reset()

func (*CreateProjectRequest) String

func (x *CreateProjectRequest) String() string

type DeleteProjectRequest

type DeleteProjectRequest struct {

	// The name of the project in the form of `projects/{PROJECT_ID}`.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request to delete a project.

func (*DeleteProjectRequest) Descriptor deprecated

func (*DeleteProjectRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteProjectRequest.ProtoReflect.Descriptor instead.

func (*DeleteProjectRequest) GetName

func (x *DeleteProjectRequest) GetName() string

func (*DeleteProjectRequest) ProtoMessage

func (*DeleteProjectRequest) ProtoMessage()

func (*DeleteProjectRequest) ProtoReflect added in v0.2.0

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

func (*DeleteProjectRequest) Reset

func (x *DeleteProjectRequest) Reset()

func (*DeleteProjectRequest) String

func (x *DeleteProjectRequest) String() string

type GetProjectRequest

type GetProjectRequest struct {

	// The name of the project in the form of `projects/{PROJECT_ID}`.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request to get a project.

func (*GetProjectRequest) Descriptor deprecated

func (*GetProjectRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetProjectRequest.ProtoReflect.Descriptor instead.

func (*GetProjectRequest) GetName

func (x *GetProjectRequest) GetName() string

func (*GetProjectRequest) ProtoMessage

func (*GetProjectRequest) ProtoMessage()

func (*GetProjectRequest) ProtoReflect added in v0.2.0

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

func (*GetProjectRequest) Reset

func (x *GetProjectRequest) Reset()

func (*GetProjectRequest) String

func (x *GetProjectRequest) String() string

type ListProjectsRequest

type ListProjectsRequest struct {

	// The filter expression.
	Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
	// Number of projects to return in the list.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Token to provide to skip to a particular spot in the list.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

Request to list projects.

func (*ListProjectsRequest) Descriptor deprecated

func (*ListProjectsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListProjectsRequest.ProtoReflect.Descriptor instead.

func (*ListProjectsRequest) GetFilter

func (x *ListProjectsRequest) GetFilter() string

func (*ListProjectsRequest) GetPageSize

func (x *ListProjectsRequest) GetPageSize() int32

func (*ListProjectsRequest) GetPageToken

func (x *ListProjectsRequest) GetPageToken() string

func (*ListProjectsRequest) ProtoMessage

func (*ListProjectsRequest) ProtoMessage()

func (*ListProjectsRequest) ProtoReflect added in v0.2.0

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

func (*ListProjectsRequest) Reset

func (x *ListProjectsRequest) Reset()

func (*ListProjectsRequest) String

func (x *ListProjectsRequest) String() string

type ListProjectsResponse

type ListProjectsResponse struct {

	// The projects requested.
	Projects []*Project `protobuf:"bytes,1,rep,name=projects,proto3" json:"projects,omitempty"`
	// The next pagination token in the list response. It should be used as
	// `page_token` for the following request. An empty value means no more
	// results.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

Response for listing projects.

func (*ListProjectsResponse) Descriptor deprecated

func (*ListProjectsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListProjectsResponse.ProtoReflect.Descriptor instead.

func (*ListProjectsResponse) GetNextPageToken

func (x *ListProjectsResponse) GetNextPageToken() string

func (*ListProjectsResponse) GetProjects

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

func (*ListProjectsResponse) ProtoMessage

func (*ListProjectsResponse) ProtoMessage()

func (*ListProjectsResponse) ProtoReflect added in v0.2.0

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

func (*ListProjectsResponse) Reset

func (x *ListProjectsResponse) Reset()

func (*ListProjectsResponse) String

func (x *ListProjectsResponse) String() string

type Project

type Project struct {

	// The name of the project in the form of `projects/{PROJECT_ID}`.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Describes a Grafeas project.

func (*Project) Descriptor deprecated

func (*Project) Descriptor() ([]byte, []int)

Deprecated: Use Project.ProtoReflect.Descriptor instead.

func (*Project) GetName

func (x *Project) GetName() string

func (*Project) ProtoMessage

func (*Project) ProtoMessage()

func (*Project) ProtoReflect added in v0.2.0

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

func (*Project) Reset

func (x *Project) Reset()

func (*Project) String

func (x *Project) String() string

type ProjectsClient

type ProjectsClient interface {
	// Creates a new project.
	CreateProject(ctx context.Context, in *CreateProjectRequest, opts ...grpc.CallOption) (*Project, error)
	// Gets the specified project.
	GetProject(ctx context.Context, in *GetProjectRequest, opts ...grpc.CallOption) (*Project, error)
	// Lists projects.
	ListProjects(ctx context.Context, in *ListProjectsRequest, opts ...grpc.CallOption) (*ListProjectsResponse, error)
	// Deletes the specified project.
	DeleteProject(ctx context.Context, in *DeleteProjectRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}

ProjectsClient is the client API for Projects 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 NewProjectsClient

func NewProjectsClient(cc grpc.ClientConnInterface) ProjectsClient

type ProjectsServer

type ProjectsServer interface {
	// Creates a new project.
	CreateProject(context.Context, *CreateProjectRequest) (*Project, error)
	// Gets the specified project.
	GetProject(context.Context, *GetProjectRequest) (*Project, error)
	// Lists projects.
	ListProjects(context.Context, *ListProjectsRequest) (*ListProjectsResponse, error)
	// Deletes the specified project.
	DeleteProject(context.Context, *DeleteProjectRequest) (*empty.Empty, error)
}

ProjectsServer is the server API for Projects service. All implementations should embed UnimplementedProjectsServer for forward compatibility

type UnimplementedProjectsServer added in v0.2.0

type UnimplementedProjectsServer struct {
}

UnimplementedProjectsServer should be embedded to have forward compatible implementations.

func (UnimplementedProjectsServer) CreateProject added in v0.2.0

func (UnimplementedProjectsServer) DeleteProject added in v0.2.0

func (UnimplementedProjectsServer) GetProject added in v0.2.0

func (UnimplementedProjectsServer) ListProjects added in v0.2.0

type UnsafeProjectsServer added in v0.2.0

type UnsafeProjectsServer interface {
	// contains filtered or unexported methods
}

UnsafeProjectsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProjectsServer will result in compilation errors.

Jump to

Keyboard shortcuts

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