sourcecontrolv1

package
v0.0.0-...-89c8abe Latest Latest
Warning

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

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

Documentation

Overview

Package sourcecontrolv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	SourceControlAPI_GetRepositoryOptions_FullMethodName = "/clutch.sourcecontrol.v1.SourceControlAPI/GetRepositoryOptions"
	SourceControlAPI_CreateRepository_FullMethodName     = "/clutch.sourcecontrol.v1.SourceControlAPI/CreateRepository"
)

Variables

View Source
var (
	Visibility_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "PUBLIC",
		2: "PRIVATE",
	}
	Visibility_value = map[string]int32{
		"UNSPECIFIED": 0,
		"PUBLIC":      1,
		"PRIVATE":     2,
	}
)

Enum value maps for Visibility.

View Source
var File_sourcecontrol_v1_sourcecontrol_proto protoreflect.FileDescriptor
View Source
var SourceControlAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "clutch.sourcecontrol.v1.SourceControlAPI",
	HandlerType: (*SourceControlAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetRepositoryOptions",
			Handler:    _SourceControlAPI_GetRepositoryOptions_Handler,
		},
		{
			MethodName: "CreateRepository",
			Handler:    _SourceControlAPI_CreateRepository_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "sourcecontrol/v1/sourcecontrol.proto",
}

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

Functions

func RegisterSourceControlAPIHandler

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

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

func RegisterSourceControlAPIHandlerClient

func RegisterSourceControlAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SourceControlAPIClient) error

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

func RegisterSourceControlAPIHandlerFromEndpoint

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

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

func RegisterSourceControlAPIHandlerServer

func RegisterSourceControlAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SourceControlAPIServer) error

RegisterSourceControlAPIHandlerServer registers the http handlers for service SourceControlAPI to "mux". UnaryRPC :call SourceControlAPIServer 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 RegisterSourceControlAPIHandlerFromEndpoint instead.

func RegisterSourceControlAPIServer

func RegisterSourceControlAPIServer(s grpc.ServiceRegistrar, srv SourceControlAPIServer)

Types

type CreateRepositoryRequest

type CreateRepositoryRequest struct {
	Owner       string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	Name        string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// Types that are assignable to Options:
	//
	//	*CreateRepositoryRequest_CustomOptions
	//	*CreateRepositoryRequest_GithubOptions
	Options isCreateRepositoryRequest_Options `protobuf_oneof:"options"`
	// contains filtered or unexported fields
}

func (*CreateRepositoryRequest) Descriptor deprecated

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

Deprecated: Use CreateRepositoryRequest.ProtoReflect.Descriptor instead.

func (*CreateRepositoryRequest) GetCustomOptions

func (x *CreateRepositoryRequest) GetCustomOptions() *anypb.Any

func (*CreateRepositoryRequest) GetDescription

func (x *CreateRepositoryRequest) GetDescription() string

func (*CreateRepositoryRequest) GetGithubOptions

func (x *CreateRepositoryRequest) GetGithubOptions() *v1.CreateRepositoryOptions

func (*CreateRepositoryRequest) GetName

func (x *CreateRepositoryRequest) GetName() string

func (*CreateRepositoryRequest) GetOptions

func (m *CreateRepositoryRequest) GetOptions() isCreateRepositoryRequest_Options

func (*CreateRepositoryRequest) GetOwner

func (x *CreateRepositoryRequest) GetOwner() string

func (*CreateRepositoryRequest) ProtoMessage

func (*CreateRepositoryRequest) ProtoMessage()

func (*CreateRepositoryRequest) ProtoReflect

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

func (*CreateRepositoryRequest) Reset

func (x *CreateRepositoryRequest) Reset()

func (*CreateRepositoryRequest) String

func (x *CreateRepositoryRequest) String() string

func (*CreateRepositoryRequest) Validate

func (m *CreateRepositoryRequest) Validate() error

Validate checks the field values on CreateRepositoryRequest 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 (*CreateRepositoryRequest) ValidateAll

func (m *CreateRepositoryRequest) ValidateAll() error

ValidateAll checks the field values on CreateRepositoryRequest 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 CreateRepositoryRequestMultiError, or nil if none found.

type CreateRepositoryRequestMultiError

type CreateRepositoryRequestMultiError []error

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

func (CreateRepositoryRequestMultiError) AllErrors

func (m CreateRepositoryRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateRepositoryRequestMultiError) Error

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

type CreateRepositoryRequestValidationError

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

CreateRepositoryRequestValidationError is the validation error returned by CreateRepositoryRequest.Validate if the designated constraints aren't met.

func (CreateRepositoryRequestValidationError) Cause

Cause function returns cause value.

func (CreateRepositoryRequestValidationError) Error

Error satisfies the builtin error interface

func (CreateRepositoryRequestValidationError) ErrorName

ErrorName returns error name.

func (CreateRepositoryRequestValidationError) Field

Field function returns field value.

func (CreateRepositoryRequestValidationError) Key

Key function returns key value.

func (CreateRepositoryRequestValidationError) Reason

Reason function returns reason value.

type CreateRepositoryRequest_CustomOptions

type CreateRepositoryRequest_CustomOptions struct {
	CustomOptions *anypb.Any `protobuf:"bytes,4,opt,name=custom_options,json=customOptions,proto3,oneof"`
}

type CreateRepositoryRequest_GithubOptions

type CreateRepositoryRequest_GithubOptions struct {
	GithubOptions *v1.CreateRepositoryOptions `protobuf:"bytes,5,opt,name=github_options,json=githubOptions,proto3,oneof"`
}

type CreateRepositoryResponse

type CreateRepositoryResponse struct {
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRepositoryResponse) Descriptor deprecated

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

Deprecated: Use CreateRepositoryResponse.ProtoReflect.Descriptor instead.

func (*CreateRepositoryResponse) GetUrl

func (x *CreateRepositoryResponse) GetUrl() string

func (*CreateRepositoryResponse) ProtoMessage

func (*CreateRepositoryResponse) ProtoMessage()

func (*CreateRepositoryResponse) ProtoReflect

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

func (*CreateRepositoryResponse) Reset

func (x *CreateRepositoryResponse) Reset()

func (*CreateRepositoryResponse) String

func (x *CreateRepositoryResponse) String() string

func (*CreateRepositoryResponse) Validate

func (m *CreateRepositoryResponse) Validate() error

Validate checks the field values on CreateRepositoryResponse 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 (*CreateRepositoryResponse) ValidateAll

func (m *CreateRepositoryResponse) ValidateAll() error

ValidateAll checks the field values on CreateRepositoryResponse 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 CreateRepositoryResponseMultiError, or nil if none found.

type CreateRepositoryResponseMultiError

type CreateRepositoryResponseMultiError []error

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

func (CreateRepositoryResponseMultiError) AllErrors

func (m CreateRepositoryResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateRepositoryResponseMultiError) Error

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

type CreateRepositoryResponseValidationError

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

CreateRepositoryResponseValidationError is the validation error returned by CreateRepositoryResponse.Validate if the designated constraints aren't met.

func (CreateRepositoryResponseValidationError) Cause

Cause function returns cause value.

func (CreateRepositoryResponseValidationError) Error

Error satisfies the builtin error interface

func (CreateRepositoryResponseValidationError) ErrorName

ErrorName returns error name.

func (CreateRepositoryResponseValidationError) Field

Field function returns field value.

func (CreateRepositoryResponseValidationError) Key

Key function returns key value.

func (CreateRepositoryResponseValidationError) Reason

Reason function returns reason value.

type Entity

type Entity struct {
	Name     string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	PhotoUrl string `protobuf:"bytes,2,opt,name=photo_url,json=photoUrl,proto3" json:"photo_url,omitempty"`
	// contains filtered or unexported fields
}

An entity encompasses members and organizations who are both owners of or contributors to source code.

func (*Entity) Descriptor deprecated

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

Deprecated: Use Entity.ProtoReflect.Descriptor instead.

func (*Entity) GetName

func (x *Entity) GetName() string

func (*Entity) GetPhotoUrl

func (x *Entity) GetPhotoUrl() string

func (*Entity) ProtoMessage

func (*Entity) ProtoMessage()

func (*Entity) ProtoReflect

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

func (*Entity) Reset

func (x *Entity) Reset()

func (*Entity) String

func (x *Entity) String() string

func (*Entity) Validate

func (m *Entity) Validate() error

Validate checks the field values on Entity 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 (*Entity) ValidateAll

func (m *Entity) ValidateAll() error

ValidateAll checks the field values on Entity 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 EntityMultiError, or nil if none found.

type EntityMultiError

type EntityMultiError []error

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

func (EntityMultiError) AllErrors

func (m EntityMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (EntityMultiError) Error

func (m EntityMultiError) Error() string

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

type EntityValidationError

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

EntityValidationError is the validation error returned by Entity.Validate if the designated constraints aren't met.

func (EntityValidationError) Cause

func (e EntityValidationError) Cause() error

Cause function returns cause value.

func (EntityValidationError) Error

func (e EntityValidationError) Error() string

Error satisfies the builtin error interface

func (EntityValidationError) ErrorName

func (e EntityValidationError) ErrorName() string

ErrorName returns error name.

func (EntityValidationError) Field

func (e EntityValidationError) Field() string

Field function returns field value.

func (EntityValidationError) Key

func (e EntityValidationError) Key() bool

Key function returns key value.

func (EntityValidationError) Reason

func (e EntityValidationError) Reason() string

Reason function returns reason value.

type GetRepositoryOptionsRequest

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

func (*GetRepositoryOptionsRequest) Descriptor deprecated

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

Deprecated: Use GetRepositoryOptionsRequest.ProtoReflect.Descriptor instead.

func (*GetRepositoryOptionsRequest) ProtoMessage

func (*GetRepositoryOptionsRequest) ProtoMessage()

func (*GetRepositoryOptionsRequest) ProtoReflect

func (*GetRepositoryOptionsRequest) Reset

func (x *GetRepositoryOptionsRequest) Reset()

func (*GetRepositoryOptionsRequest) String

func (x *GetRepositoryOptionsRequest) String() string

func (*GetRepositoryOptionsRequest) Validate

func (m *GetRepositoryOptionsRequest) Validate() error

Validate checks the field values on GetRepositoryOptionsRequest 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 (*GetRepositoryOptionsRequest) ValidateAll

func (m *GetRepositoryOptionsRequest) ValidateAll() error

ValidateAll checks the field values on GetRepositoryOptionsRequest 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 GetRepositoryOptionsRequestMultiError, or nil if none found.

type GetRepositoryOptionsRequestMultiError

type GetRepositoryOptionsRequestMultiError []error

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

func (GetRepositoryOptionsRequestMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (GetRepositoryOptionsRequestMultiError) Error

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

type GetRepositoryOptionsRequestValidationError

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

GetRepositoryOptionsRequestValidationError is the validation error returned by GetRepositoryOptionsRequest.Validate if the designated constraints aren't met.

func (GetRepositoryOptionsRequestValidationError) Cause

Cause function returns cause value.

func (GetRepositoryOptionsRequestValidationError) Error

Error satisfies the builtin error interface

func (GetRepositoryOptionsRequestValidationError) ErrorName

ErrorName returns error name.

func (GetRepositoryOptionsRequestValidationError) Field

Field function returns field value.

func (GetRepositoryOptionsRequestValidationError) Key

Key function returns key value.

func (GetRepositoryOptionsRequestValidationError) Reason

Reason function returns reason value.

type GetRepositoryOptionsResponse

type GetRepositoryOptionsResponse struct {
	AvailableOwners   []*Entity    `protobuf:"bytes,1,rep,name=available_owners,json=availableOwners,proto3" json:"available_owners,omitempty"`
	VisibilityOptions []Visibility `` /* 160-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetRepositoryOptionsResponse) Descriptor deprecated

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

Deprecated: Use GetRepositoryOptionsResponse.ProtoReflect.Descriptor instead.

func (*GetRepositoryOptionsResponse) GetAvailableOwners

func (x *GetRepositoryOptionsResponse) GetAvailableOwners() []*Entity

func (*GetRepositoryOptionsResponse) GetVisibilityOptions

func (x *GetRepositoryOptionsResponse) GetVisibilityOptions() []Visibility

func (*GetRepositoryOptionsResponse) ProtoMessage

func (*GetRepositoryOptionsResponse) ProtoMessage()

func (*GetRepositoryOptionsResponse) ProtoReflect

func (*GetRepositoryOptionsResponse) Reset

func (x *GetRepositoryOptionsResponse) Reset()

func (*GetRepositoryOptionsResponse) String

func (*GetRepositoryOptionsResponse) Validate

func (m *GetRepositoryOptionsResponse) Validate() error

Validate checks the field values on GetRepositoryOptionsResponse 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 (*GetRepositoryOptionsResponse) ValidateAll

func (m *GetRepositoryOptionsResponse) ValidateAll() error

ValidateAll checks the field values on GetRepositoryOptionsResponse 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 GetRepositoryOptionsResponseMultiError, or nil if none found.

type GetRepositoryOptionsResponseMultiError

type GetRepositoryOptionsResponseMultiError []error

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

func (GetRepositoryOptionsResponseMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (GetRepositoryOptionsResponseMultiError) Error

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

type GetRepositoryOptionsResponseValidationError

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

GetRepositoryOptionsResponseValidationError is the validation error returned by GetRepositoryOptionsResponse.Validate if the designated constraints aren't met.

func (GetRepositoryOptionsResponseValidationError) Cause

Cause function returns cause value.

func (GetRepositoryOptionsResponseValidationError) Error

Error satisfies the builtin error interface

func (GetRepositoryOptionsResponseValidationError) ErrorName

ErrorName returns error name.

func (GetRepositoryOptionsResponseValidationError) Field

Field function returns field value.

func (GetRepositoryOptionsResponseValidationError) Key

Key function returns key value.

func (GetRepositoryOptionsResponseValidationError) Reason

Reason function returns reason value.

type SourceControlAPIClient

type SourceControlAPIClient interface {
	GetRepositoryOptions(ctx context.Context, in *GetRepositoryOptionsRequest, opts ...grpc.CallOption) (*GetRepositoryOptionsResponse, error)
	CreateRepository(ctx context.Context, in *CreateRepositoryRequest, opts ...grpc.CallOption) (*CreateRepositoryResponse, error)
}

SourceControlAPIClient is the client API for SourceControlAPI 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.

type SourceControlAPIServer

type SourceControlAPIServer interface {
	GetRepositoryOptions(context.Context, *GetRepositoryOptionsRequest) (*GetRepositoryOptionsResponse, error)
	CreateRepository(context.Context, *CreateRepositoryRequest) (*CreateRepositoryResponse, error)
}

SourceControlAPIServer is the server API for SourceControlAPI service. All implementations should embed UnimplementedSourceControlAPIServer for forward compatibility

type UnimplementedSourceControlAPIServer

type UnimplementedSourceControlAPIServer struct {
}

UnimplementedSourceControlAPIServer should be embedded to have forward compatible implementations.

func (UnimplementedSourceControlAPIServer) CreateRepository

type UnsafeSourceControlAPIServer

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

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

type Visibility

type Visibility int32
const (
	Visibility_UNSPECIFIED Visibility = 0
	Visibility_PUBLIC      Visibility = 1
	Visibility_PRIVATE     Visibility = 2
)

func (Visibility) Descriptor

func (Visibility) Descriptor() protoreflect.EnumDescriptor

func (Visibility) Enum

func (x Visibility) Enum() *Visibility

func (Visibility) EnumDescriptor deprecated

func (Visibility) EnumDescriptor() ([]byte, []int)

Deprecated: Use Visibility.Descriptor instead.

func (Visibility) Number

func (x Visibility) Number() protoreflect.EnumNumber

func (Visibility) String

func (x Visibility) String() string

func (Visibility) Type

Jump to

Keyboard shortcuts

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