projectv1

package
v0.0.0-...-f507469 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package projectv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ProjectAPI_GetProjects_FullMethodName = "/clutch.project.v1.ProjectAPI/GetProjects"
)

Variables

View Source
var File_project_v1_project_proto protoreflect.FileDescriptor
View Source
var ProjectAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "clutch.project.v1.ProjectAPI",
	HandlerType: (*ProjectAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetProjects",
			Handler:    _ProjectAPI_GetProjects_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "project/v1/project.proto",
}

ProjectAPI_ServiceDesc is the grpc.ServiceDesc for ProjectAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

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.ServiceRegistrar, srv ProjectAPIServer)

Types

type GetProjectsRequest

type GetProjectsRequest struct {
	Projects []string `protobuf:"bytes,1,rep,name=projects,proto3" json:"projects,omitempty"`
	Users    []string `protobuf:"bytes,2,rep,name=users,proto3" json:"users,omitempty"`
	// If this is set to true, the api will exclude all project dependencies for the requested projects.
	// https://github.com/lyft/clutch/blob/2304adf0e0189734d8a36803964214ee3bc73fbc/api/core/project/v1/project.proto#L19
	ExcludeDependencies bool `protobuf:"varint,3,opt,name=exclude_dependencies,json=excludeDependencies,proto3" json:"exclude_dependencies,omitempty"`
	// contains filtered or unexported fields
}

func (*GetProjectsRequest) Descriptor deprecated

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

Deprecated: Use GetProjectsRequest.ProtoReflect.Descriptor instead.

func (*GetProjectsRequest) GetExcludeDependencies

func (x *GetProjectsRequest) GetExcludeDependencies() bool

func (*GetProjectsRequest) GetProjects

func (x *GetProjectsRequest) GetProjects() []string

func (*GetProjectsRequest) GetUsers

func (x *GetProjectsRequest) GetUsers() []string

func (*GetProjectsRequest) ProtoMessage

func (*GetProjectsRequest) ProtoMessage()

func (*GetProjectsRequest) ProtoReflect

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

func (*GetProjectsRequest) Reset

func (x *GetProjectsRequest) Reset()

func (*GetProjectsRequest) String

func (x *GetProjectsRequest) String() string

func (*GetProjectsRequest) Validate

func (m *GetProjectsRequest) Validate() error

Validate checks the field values on GetProjectsRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetProjectsRequest) ValidateAll

func (m *GetProjectsRequest) ValidateAll() error

ValidateAll checks the field values on GetProjectsRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetProjectsRequestMultiError, or nil if none found.

type GetProjectsRequestMultiError

type GetProjectsRequestMultiError []error

GetProjectsRequestMultiError is an error wrapping multiple validation errors returned by GetProjectsRequest.ValidateAll() if the designated constraints aren't met.

func (GetProjectsRequestMultiError) AllErrors

func (m GetProjectsRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetProjectsRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetProjectsRequestValidationError

type GetProjectsRequestValidationError struct {
	// contains filtered or unexported fields
}

GetProjectsRequestValidationError is the validation error returned by GetProjectsRequest.Validate if the designated constraints aren't met.

func (GetProjectsRequestValidationError) Cause

Cause function returns cause value.

func (GetProjectsRequestValidationError) Error

Error satisfies the builtin error interface

func (GetProjectsRequestValidationError) ErrorName

ErrorName returns error name.

func (GetProjectsRequestValidationError) Field

Field function returns field value.

func (GetProjectsRequestValidationError) Key

Key function returns key value.

func (GetProjectsRequestValidationError) Reason

Reason function returns reason value.

type GetProjectsResponse

type GetProjectsResponse struct {
	Results         map[string]*ProjectResult `` /* 155-byte string literal not displayed */
	PartialFailures []*status.Status          `protobuf:"bytes,2,rep,name=partial_failures,json=partialFailures,proto3" json:"partial_failures,omitempty"`
	// contains filtered or unexported fields
}

func (*GetProjectsResponse) Descriptor deprecated

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

Deprecated: Use GetProjectsResponse.ProtoReflect.Descriptor instead.

func (*GetProjectsResponse) GetPartialFailures

func (x *GetProjectsResponse) GetPartialFailures() []*status.Status

func (*GetProjectsResponse) GetResults

func (x *GetProjectsResponse) GetResults() map[string]*ProjectResult

func (*GetProjectsResponse) ProtoMessage

func (*GetProjectsResponse) ProtoMessage()

func (*GetProjectsResponse) ProtoReflect

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

func (*GetProjectsResponse) Reset

func (x *GetProjectsResponse) Reset()

func (*GetProjectsResponse) String

func (x *GetProjectsResponse) String() string

func (*GetProjectsResponse) Validate

func (m *GetProjectsResponse) Validate() error

Validate checks the field values on GetProjectsResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetProjectsResponse) ValidateAll

func (m *GetProjectsResponse) ValidateAll() error

ValidateAll checks the field values on GetProjectsResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetProjectsResponseMultiError, or nil if none found.

type GetProjectsResponseMultiError

type GetProjectsResponseMultiError []error

GetProjectsResponseMultiError is an error wrapping multiple validation errors returned by GetProjectsResponse.ValidateAll() if the designated constraints aren't met.

func (GetProjectsResponseMultiError) AllErrors

func (m GetProjectsResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetProjectsResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetProjectsResponseValidationError

type GetProjectsResponseValidationError struct {
	// contains filtered or unexported fields
}

GetProjectsResponseValidationError is the validation error returned by GetProjectsResponse.Validate if the designated constraints aren't met.

func (GetProjectsResponseValidationError) Cause

Cause function returns cause value.

func (GetProjectsResponseValidationError) Error

Error satisfies the builtin error interface

func (GetProjectsResponseValidationError) ErrorName

ErrorName returns error name.

func (GetProjectsResponseValidationError) Field

Field function returns field value.

func (GetProjectsResponseValidationError) Key

Key function returns key value.

func (GetProjectsResponseValidationError) Reason

Reason function returns reason value.

type ProjectAPIClient

type ProjectAPIClient interface {
	GetProjects(ctx context.Context, in *GetProjectsRequest, opts ...grpc.CallOption) (*GetProjectsResponse, 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

type ProjectAPIServer

type ProjectAPIServer interface {
	GetProjects(context.Context, *GetProjectsRequest) (*GetProjectsResponse, error)
}

ProjectAPIServer is the server API for ProjectAPI service. All implementations should embed UnimplementedProjectAPIServer for forward compatibility

type ProjectResult

type ProjectResult struct {
	From    *ProjectResult_From `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	Project *v1.Project         `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"`
	// contains filtered or unexported fields
}

func (*ProjectResult) Descriptor deprecated

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

Deprecated: Use ProjectResult.ProtoReflect.Descriptor instead.

func (*ProjectResult) GetFrom

func (x *ProjectResult) GetFrom() *ProjectResult_From

func (*ProjectResult) GetProject

func (x *ProjectResult) GetProject() *v1.Project

func (*ProjectResult) ProtoMessage

func (*ProjectResult) ProtoMessage()

func (*ProjectResult) ProtoReflect

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

func (*ProjectResult) Reset

func (x *ProjectResult) Reset()

func (*ProjectResult) String

func (x *ProjectResult) String() string

func (*ProjectResult) Validate

func (m *ProjectResult) Validate() error

Validate checks the field values on ProjectResult with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ProjectResult) ValidateAll

func (m *ProjectResult) ValidateAll() error

ValidateAll checks the field values on ProjectResult with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ProjectResultMultiError, or nil if none found.

type ProjectResultMultiError

type ProjectResultMultiError []error

ProjectResultMultiError is an error wrapping multiple validation errors returned by ProjectResult.ValidateAll() if the designated constraints aren't met.

func (ProjectResultMultiError) AllErrors

func (m ProjectResultMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ProjectResultMultiError) Error

func (m ProjectResultMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ProjectResultValidationError

type ProjectResultValidationError struct {
	// contains filtered or unexported fields
}

ProjectResultValidationError is the validation error returned by ProjectResult.Validate if the designated constraints aren't met.

func (ProjectResultValidationError) Cause

Cause function returns cause value.

func (ProjectResultValidationError) Error

Error satisfies the builtin error interface

func (ProjectResultValidationError) ErrorName

func (e ProjectResultValidationError) ErrorName() string

ErrorName returns error name.

func (ProjectResultValidationError) Field

Field function returns field value.

func (ProjectResultValidationError) Key

Key function returns key value.

func (ProjectResultValidationError) Reason

Reason function returns reason value.

type ProjectResult_From

type ProjectResult_From struct {
	Selected bool     `protobuf:"varint,1,opt,name=selected,proto3" json:"selected,omitempty"`
	Users    []string `protobuf:"bytes,2,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*ProjectResult_From) Descriptor deprecated

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

Deprecated: Use ProjectResult_From.ProtoReflect.Descriptor instead.

func (*ProjectResult_From) GetSelected

func (x *ProjectResult_From) GetSelected() bool

func (*ProjectResult_From) GetUsers

func (x *ProjectResult_From) GetUsers() []string

func (*ProjectResult_From) ProtoMessage

func (*ProjectResult_From) ProtoMessage()

func (*ProjectResult_From) ProtoReflect

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

func (*ProjectResult_From) Reset

func (x *ProjectResult_From) Reset()

func (*ProjectResult_From) String

func (x *ProjectResult_From) String() string

func (*ProjectResult_From) Validate

func (m *ProjectResult_From) Validate() error

Validate checks the field values on ProjectResult_From with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ProjectResult_From) ValidateAll

func (m *ProjectResult_From) ValidateAll() error

ValidateAll checks the field values on ProjectResult_From with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ProjectResult_FromMultiError, or nil if none found.

type ProjectResult_FromMultiError

type ProjectResult_FromMultiError []error

ProjectResult_FromMultiError is an error wrapping multiple validation errors returned by ProjectResult_From.ValidateAll() if the designated constraints aren't met.

func (ProjectResult_FromMultiError) AllErrors

func (m ProjectResult_FromMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ProjectResult_FromMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ProjectResult_FromValidationError

type ProjectResult_FromValidationError struct {
	// contains filtered or unexported fields
}

ProjectResult_FromValidationError is the validation error returned by ProjectResult_From.Validate if the designated constraints aren't met.

func (ProjectResult_FromValidationError) Cause

Cause function returns cause value.

func (ProjectResult_FromValidationError) Error

Error satisfies the builtin error interface

func (ProjectResult_FromValidationError) ErrorName

ErrorName returns error name.

func (ProjectResult_FromValidationError) Field

Field function returns field value.

func (ProjectResult_FromValidationError) Key

Key function returns key value.

func (ProjectResult_FromValidationError) Reason

Reason function returns reason value.

type UnimplementedProjectAPIServer

type UnimplementedProjectAPIServer struct {
}

UnimplementedProjectAPIServer should be embedded to have forward compatible implementations.

func (UnimplementedProjectAPIServer) GetProjects

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