Documentation ¶
Overview ¶
Package projectv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- 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.ServiceRegistrar, srv ProjectAPIServer)
- type GetProjectsRequest
- func (*GetProjectsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetProjectsRequest) GetExcludeDependencies() bool
- func (x *GetProjectsRequest) GetProjects() []string
- func (x *GetProjectsRequest) GetUsers() []string
- func (*GetProjectsRequest) ProtoMessage()
- func (x *GetProjectsRequest) ProtoReflect() protoreflect.Message
- func (x *GetProjectsRequest) Reset()
- func (x *GetProjectsRequest) String() string
- func (m *GetProjectsRequest) Validate() error
- func (m *GetProjectsRequest) ValidateAll() error
- type GetProjectsRequestMultiError
- type GetProjectsRequestValidationError
- func (e GetProjectsRequestValidationError) Cause() error
- func (e GetProjectsRequestValidationError) Error() string
- func (e GetProjectsRequestValidationError) ErrorName() string
- func (e GetProjectsRequestValidationError) Field() string
- func (e GetProjectsRequestValidationError) Key() bool
- func (e GetProjectsRequestValidationError) Reason() string
- type GetProjectsResponse
- func (*GetProjectsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetProjectsResponse) GetPartialFailures() []*status.Status
- func (x *GetProjectsResponse) GetResults() map[string]*ProjectResult
- func (*GetProjectsResponse) ProtoMessage()
- func (x *GetProjectsResponse) ProtoReflect() protoreflect.Message
- func (x *GetProjectsResponse) Reset()
- func (x *GetProjectsResponse) String() string
- func (m *GetProjectsResponse) Validate() error
- func (m *GetProjectsResponse) ValidateAll() error
- type GetProjectsResponseMultiError
- type GetProjectsResponseValidationError
- func (e GetProjectsResponseValidationError) Cause() error
- func (e GetProjectsResponseValidationError) Error() string
- func (e GetProjectsResponseValidationError) ErrorName() string
- func (e GetProjectsResponseValidationError) Field() string
- func (e GetProjectsResponseValidationError) Key() bool
- func (e GetProjectsResponseValidationError) Reason() string
- type ProjectAPIClient
- type ProjectAPIServer
- type ProjectResult
- func (*ProjectResult) Descriptor() ([]byte, []int)deprecated
- func (x *ProjectResult) GetFrom() *ProjectResult_From
- func (x *ProjectResult) GetProject() *v1.Project
- func (*ProjectResult) ProtoMessage()
- func (x *ProjectResult) ProtoReflect() protoreflect.Message
- func (x *ProjectResult) Reset()
- func (x *ProjectResult) String() string
- func (m *ProjectResult) Validate() error
- func (m *ProjectResult) ValidateAll() error
- type ProjectResultMultiError
- type ProjectResultValidationError
- func (e ProjectResultValidationError) Cause() error
- func (e ProjectResultValidationError) Error() string
- func (e ProjectResultValidationError) ErrorName() string
- func (e ProjectResultValidationError) Field() string
- func (e ProjectResultValidationError) Key() bool
- func (e ProjectResultValidationError) Reason() string
- type ProjectResult_From
- func (*ProjectResult_From) Descriptor() ([]byte, []int)deprecated
- func (x *ProjectResult_From) GetSelected() bool
- func (x *ProjectResult_From) GetUsers() []string
- func (*ProjectResult_From) ProtoMessage()
- func (x *ProjectResult_From) ProtoReflect() protoreflect.Message
- func (x *ProjectResult_From) Reset()
- func (x *ProjectResult_From) String() string
- func (m *ProjectResult_From) Validate() error
- func (m *ProjectResult_From) ValidateAll() error
- type ProjectResult_FromMultiError
- type ProjectResult_FromValidationError
- func (e ProjectResult_FromValidationError) Cause() error
- func (e ProjectResult_FromValidationError) Error() string
- func (e ProjectResult_FromValidationError) ErrorName() string
- func (e ProjectResult_FromValidationError) Field() string
- func (e ProjectResult_FromValidationError) Key() bool
- func (e ProjectResult_FromValidationError) Reason() string
- type UnimplementedProjectAPIServer
- type UnsafeProjectAPIServer
Constants ¶
const (
ProjectAPI_GetProjects_FullMethodName = "/clutch.project.v1.ProjectAPI/GetProjects"
)
Variables ¶
var File_project_v1_project_proto protoreflect.FileDescriptor
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 ¶
func (m GetProjectsRequestMultiError) Error() string
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 ¶
func (e GetProjectsRequestValidationError) Cause() error
Cause function returns cause value.
func (GetProjectsRequestValidationError) Error ¶
func (e GetProjectsRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetProjectsRequestValidationError) ErrorName ¶
func (e GetProjectsRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetProjectsRequestValidationError) Field ¶
func (e GetProjectsRequestValidationError) Field() string
Field function returns field value.
func (GetProjectsRequestValidationError) Key ¶
func (e GetProjectsRequestValidationError) Key() bool
Key function returns key value.
func (GetProjectsRequestValidationError) Reason ¶
func (e GetProjectsRequestValidationError) Reason() string
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 ¶
func (m GetProjectsResponseMultiError) Error() string
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 ¶
func (e GetProjectsResponseValidationError) Cause() error
Cause function returns cause value.
func (GetProjectsResponseValidationError) Error ¶
func (e GetProjectsResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetProjectsResponseValidationError) ErrorName ¶
func (e GetProjectsResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetProjectsResponseValidationError) Field ¶
func (e GetProjectsResponseValidationError) Field() string
Field function returns field value.
func (GetProjectsResponseValidationError) Key ¶
func (e GetProjectsResponseValidationError) Key() bool
Key function returns key value.
func (GetProjectsResponseValidationError) Reason ¶
func (e GetProjectsResponseValidationError) Reason() string
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 ¶
func (e ProjectResultValidationError) Cause() error
Cause function returns cause value.
func (ProjectResultValidationError) Error ¶
func (e ProjectResultValidationError) Error() string
Error satisfies the builtin error interface
func (ProjectResultValidationError) ErrorName ¶
func (e ProjectResultValidationError) ErrorName() string
ErrorName returns error name.
func (ProjectResultValidationError) Field ¶
func (e ProjectResultValidationError) Field() string
Field function returns field value.
func (ProjectResultValidationError) Key ¶
func (e ProjectResultValidationError) Key() bool
Key function returns key value.
func (ProjectResultValidationError) Reason ¶
func (e ProjectResultValidationError) Reason() string
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 ¶
func (m ProjectResult_FromMultiError) Error() string
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 ¶
func (e ProjectResult_FromValidationError) Cause() error
Cause function returns cause value.
func (ProjectResult_FromValidationError) Error ¶
func (e ProjectResult_FromValidationError) Error() string
Error satisfies the builtin error interface
func (ProjectResult_FromValidationError) ErrorName ¶
func (e ProjectResult_FromValidationError) ErrorName() string
ErrorName returns error name.
func (ProjectResult_FromValidationError) Field ¶
func (e ProjectResult_FromValidationError) Field() string
Field function returns field value.
func (ProjectResult_FromValidationError) Key ¶
func (e ProjectResult_FromValidationError) Key() bool
Key function returns key value.
func (ProjectResult_FromValidationError) Reason ¶
func (e ProjectResult_FromValidationError) Reason() string
Reason function returns reason value.
type UnimplementedProjectAPIServer ¶
type UnimplementedProjectAPIServer struct { }
UnimplementedProjectAPIServer should be embedded to have forward compatible implementations.
func (UnimplementedProjectAPIServer) GetProjects ¶
func (UnimplementedProjectAPIServer) GetProjects(context.Context, *GetProjectsRequest) (*GetProjectsResponse, error)
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.