common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthenticationPlugin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "authplugin.AuthenticationPlugin",
	HandlerType: (*AuthenticationPluginServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Authenticate",
			Handler:    _AuthenticationPlugin_Authenticate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "auth-plugin.proto",
}

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

View Source
var File_auth_plugin_proto protoreflect.FileDescriptor
View Source
var File_repo_plugin_proto protoreflect.FileDescriptor
View Source
var RepositoryPlugin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "repoplugin.RepositoryPlugin",
	HandlerType: (*RepositoryPluginServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RepoHost",
			Handler:    _RepositoryPlugin_RepoHost_Handler,
		},
		{
			MethodName: "Resolve",
			Handler:    _RepositoryPlugin_Resolve_Handler,
		},
		{
			MethodName: "ContentInitContainer",
			Handler:    _RepositoryPlugin_ContentInitContainer_Handler,
		},
		{
			MethodName: "Download",
			Handler:    _RepositoryPlugin_Download_Handler,
		},
		{
			MethodName: "ListFiles",
			Handler:    _RepositoryPlugin_ListFiles_Handler,
		},
		{
			MethodName: "GetRemoteAnnotations",
			Handler:    _RepositoryPlugin_GetRemoteAnnotations_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "repo-plugin.proto",
}

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

Functions

func RegisterAuthenticationPluginServer

func RegisterAuthenticationPluginServer(s grpc.ServiceRegistrar, srv AuthenticationPluginServer)

func RegisterRepositoryPluginServer

func RegisterRepositoryPluginServer(s grpc.ServiceRegistrar, srv RepositoryPluginServer)

Types

type AuthenticateRequest

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

func (*AuthenticateRequest) Descriptor deprecated

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

Deprecated: Use AuthenticateRequest.ProtoReflect.Descriptor instead.

func (*AuthenticateRequest) GetToken

func (x *AuthenticateRequest) GetToken() string

func (*AuthenticateRequest) ProtoMessage

func (*AuthenticateRequest) ProtoMessage()

func (*AuthenticateRequest) ProtoReflect

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

func (*AuthenticateRequest) Reset

func (x *AuthenticateRequest) Reset()

func (*AuthenticateRequest) String

func (x *AuthenticateRequest) String() string

type AuthenticateResponse

type AuthenticateResponse struct {
	Known    bool              `protobuf:"varint,1,opt,name=known,proto3" json:"known,omitempty"`
	Username string            `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	Emails   []string          `protobuf:"bytes,4,rep,name=emails,proto3" json:"emails,omitempty"`
	Teams    []string          `protobuf:"bytes,5,rep,name=teams,proto3" json:"teams,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthenticateResponse) Descriptor deprecated

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

Deprecated: Use AuthenticateResponse.ProtoReflect.Descriptor instead.

func (*AuthenticateResponse) GetEmails

func (x *AuthenticateResponse) GetEmails() []string

func (*AuthenticateResponse) GetKnown

func (x *AuthenticateResponse) GetKnown() bool

func (*AuthenticateResponse) GetMetadata

func (x *AuthenticateResponse) GetMetadata() map[string]string

func (*AuthenticateResponse) GetTeams

func (x *AuthenticateResponse) GetTeams() []string

func (*AuthenticateResponse) GetUsername

func (x *AuthenticateResponse) GetUsername() string

func (*AuthenticateResponse) ProtoMessage

func (*AuthenticateResponse) ProtoMessage()

func (*AuthenticateResponse) ProtoReflect

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

func (*AuthenticateResponse) Reset

func (x *AuthenticateResponse) Reset()

func (*AuthenticateResponse) String

func (x *AuthenticateResponse) String() string

type AuthenticationPluginClient

type AuthenticationPluginClient interface {
	Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error)
}

AuthenticationPluginClient is the client API for AuthenticationPlugin 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 AuthenticationPluginServer

type AuthenticationPluginServer interface {
	Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
	// contains filtered or unexported methods
}

AuthenticationPluginServer is the server API for AuthenticationPlugin service. All implementations must embed UnimplementedAuthenticationPluginServer for forward compatibility

type ContentInitContainerRequest

type ContentInitContainerRequest struct {
	Repository *v1.Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
	Paths      []string       `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"`
	// contains filtered or unexported fields
}

func (*ContentInitContainerRequest) Descriptor deprecated

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

Deprecated: Use ContentInitContainerRequest.ProtoReflect.Descriptor instead.

func (*ContentInitContainerRequest) GetPaths

func (x *ContentInitContainerRequest) GetPaths() []string

func (*ContentInitContainerRequest) GetRepository

func (x *ContentInitContainerRequest) GetRepository() *v1.Repository

func (*ContentInitContainerRequest) ProtoMessage

func (*ContentInitContainerRequest) ProtoMessage()

func (*ContentInitContainerRequest) ProtoReflect

func (*ContentInitContainerRequest) Reset

func (x *ContentInitContainerRequest) Reset()

func (*ContentInitContainerRequest) String

func (x *ContentInitContainerRequest) String() string

type ContentInitContainerResponse

type ContentInitContainerResponse struct {
	Container []byte `protobuf:"bytes,1,opt,name=container,proto3" json:"container,omitempty"`
	// contains filtered or unexported fields
}

func (*ContentInitContainerResponse) Descriptor deprecated

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

Deprecated: Use ContentInitContainerResponse.ProtoReflect.Descriptor instead.

func (*ContentInitContainerResponse) GetContainer

func (x *ContentInitContainerResponse) GetContainer() []byte

func (*ContentInitContainerResponse) ProtoMessage

func (*ContentInitContainerResponse) ProtoMessage()

func (*ContentInitContainerResponse) ProtoReflect

func (*ContentInitContainerResponse) Reset

func (x *ContentInitContainerResponse) Reset()

func (*ContentInitContainerResponse) String

type DownloadRequest

type DownloadRequest struct {
	Repository *v1.Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
	Path       string         `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*DownloadRequest) Descriptor deprecated

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

Deprecated: Use DownloadRequest.ProtoReflect.Descriptor instead.

func (*DownloadRequest) GetPath

func (x *DownloadRequest) GetPath() string

func (*DownloadRequest) GetRepository

func (x *DownloadRequest) GetRepository() *v1.Repository

func (*DownloadRequest) ProtoMessage

func (*DownloadRequest) ProtoMessage()

func (*DownloadRequest) ProtoReflect

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

func (*DownloadRequest) Reset

func (x *DownloadRequest) Reset()

func (*DownloadRequest) String

func (x *DownloadRequest) String() string

type DownloadResponse

type DownloadResponse struct {
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*DownloadResponse) Descriptor deprecated

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

Deprecated: Use DownloadResponse.ProtoReflect.Descriptor instead.

func (*DownloadResponse) GetContent

func (x *DownloadResponse) GetContent() []byte

func (*DownloadResponse) ProtoMessage

func (*DownloadResponse) ProtoMessage()

func (*DownloadResponse) ProtoReflect

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

func (*DownloadResponse) Reset

func (x *DownloadResponse) Reset()

func (*DownloadResponse) String

func (x *DownloadResponse) String() string

type GetRemoteAnnotationsRequest

type GetRemoteAnnotationsRequest struct {
	Repository *v1.Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRemoteAnnotationsRequest) Descriptor deprecated

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

Deprecated: Use GetRemoteAnnotationsRequest.ProtoReflect.Descriptor instead.

func (*GetRemoteAnnotationsRequest) GetRepository

func (x *GetRemoteAnnotationsRequest) GetRepository() *v1.Repository

func (*GetRemoteAnnotationsRequest) ProtoMessage

func (*GetRemoteAnnotationsRequest) ProtoMessage()

func (*GetRemoteAnnotationsRequest) ProtoReflect

func (*GetRemoteAnnotationsRequest) Reset

func (x *GetRemoteAnnotationsRequest) Reset()

func (*GetRemoteAnnotationsRequest) String

func (x *GetRemoteAnnotationsRequest) String() string

type GetRemoteAnnotationsResponse

type GetRemoteAnnotationsResponse struct {
	Annotations map[string]string `` /* 163-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetRemoteAnnotationsResponse) Descriptor deprecated

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

Deprecated: Use GetRemoteAnnotationsResponse.ProtoReflect.Descriptor instead.

func (*GetRemoteAnnotationsResponse) GetAnnotations

func (x *GetRemoteAnnotationsResponse) GetAnnotations() map[string]string

func (*GetRemoteAnnotationsResponse) ProtoMessage

func (*GetRemoteAnnotationsResponse) ProtoMessage()

func (*GetRemoteAnnotationsResponse) ProtoReflect

func (*GetRemoteAnnotationsResponse) Reset

func (x *GetRemoteAnnotationsResponse) Reset()

func (*GetRemoteAnnotationsResponse) String

type ListFilesReponse

type ListFilesReponse struct {
	Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"`
	// contains filtered or unexported fields
}

func (*ListFilesReponse) Descriptor deprecated

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

Deprecated: Use ListFilesReponse.ProtoReflect.Descriptor instead.

func (*ListFilesReponse) GetPaths

func (x *ListFilesReponse) GetPaths() []string

func (*ListFilesReponse) ProtoMessage

func (*ListFilesReponse) ProtoMessage()

func (*ListFilesReponse) ProtoReflect

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

func (*ListFilesReponse) Reset

func (x *ListFilesReponse) Reset()

func (*ListFilesReponse) String

func (x *ListFilesReponse) String() string

type ListFilesRequest

type ListFilesRequest struct {
	Repository *v1.Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
	Path       string         `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*ListFilesRequest) Descriptor deprecated

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

Deprecated: Use ListFilesRequest.ProtoReflect.Descriptor instead.

func (*ListFilesRequest) GetPath

func (x *ListFilesRequest) GetPath() string

func (*ListFilesRequest) GetRepository

func (x *ListFilesRequest) GetRepository() *v1.Repository

func (*ListFilesRequest) ProtoMessage

func (*ListFilesRequest) ProtoMessage()

func (*ListFilesRequest) ProtoReflect

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

func (*ListFilesRequest) Reset

func (x *ListFilesRequest) Reset()

func (*ListFilesRequest) String

func (x *ListFilesRequest) String() string

type RepoHostRequest

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

func (*RepoHostRequest) Descriptor deprecated

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

Deprecated: Use RepoHostRequest.ProtoReflect.Descriptor instead.

func (*RepoHostRequest) ProtoMessage

func (*RepoHostRequest) ProtoMessage()

func (*RepoHostRequest) ProtoReflect

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

func (*RepoHostRequest) Reset

func (x *RepoHostRequest) Reset()

func (*RepoHostRequest) String

func (x *RepoHostRequest) String() string

type RepoHostResponse

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

func (*RepoHostResponse) Descriptor deprecated

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

Deprecated: Use RepoHostResponse.ProtoReflect.Descriptor instead.

func (*RepoHostResponse) GetHost

func (x *RepoHostResponse) GetHost() string

func (*RepoHostResponse) ProtoMessage

func (*RepoHostResponse) ProtoMessage()

func (*RepoHostResponse) ProtoReflect

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

func (*RepoHostResponse) Reset

func (x *RepoHostResponse) Reset()

func (*RepoHostResponse) String

func (x *RepoHostResponse) String() string

type RepositoryPluginClient

type RepositoryPluginClient interface {
	// RepoHost returns the host which this plugins integrates with
	RepoHost(ctx context.Context, in *RepoHostRequest, opts ...grpc.CallOption) (*RepoHostResponse, error)
	// Resolve resolves the repo's revision based on its ref(erence)
	Resolve(ctx context.Context, in *ResolveRequest, opts ...grpc.CallOption) (*ResolveResponse, error)
	// ContentInitContainer produces the init container YAML required to initialize
	// the build context from this repository in /workspace.
	ContentInitContainer(ctx context.Context, in *ContentInitContainerRequest, opts ...grpc.CallOption) (*ContentInitContainerResponse, error)
	// Download downloads a file from the repository.
	Download(ctx context.Context, in *DownloadRequest, opts ...grpc.CallOption) (*DownloadResponse, error)
	// ListFiles lists all files in a directory.
	ListFiles(ctx context.Context, in *ListFilesRequest, opts ...grpc.CallOption) (*ListFilesReponse, error)
	// GetRemoteAnnotations extracts Bhojpur Piro annotations form information associated
	// with a particular commit, e.g. the commit message, PRs or merge requests.
	// Implementors can expect the revision of the repo object to be set.
	GetRemoteAnnotations(ctx context.Context, in *GetRemoteAnnotationsRequest, opts ...grpc.CallOption) (*GetRemoteAnnotationsResponse, error)
}

RepositoryPluginClient is the client API for RepositoryPlugin 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 RepositoryPluginServer

type RepositoryPluginServer interface {
	// RepoHost returns the host which this plugins integrates with
	RepoHost(context.Context, *RepoHostRequest) (*RepoHostResponse, error)
	// Resolve resolves the repo's revision based on its ref(erence)
	Resolve(context.Context, *ResolveRequest) (*ResolveResponse, error)
	// ContentInitContainer produces the init container YAML required to initialize
	// the build context from this repository in /workspace.
	ContentInitContainer(context.Context, *ContentInitContainerRequest) (*ContentInitContainerResponse, error)
	// Download downloads a file from the repository.
	Download(context.Context, *DownloadRequest) (*DownloadResponse, error)
	// ListFiles lists all files in a directory.
	ListFiles(context.Context, *ListFilesRequest) (*ListFilesReponse, error)
	// GetRemoteAnnotations extracts Bhojpur Piro annotations form information associated
	// with a particular commit, e.g. the commit message, PRs or merge requests.
	// Implementors can expect the revision of the repo object to be set.
	GetRemoteAnnotations(context.Context, *GetRemoteAnnotationsRequest) (*GetRemoteAnnotationsResponse, error)
	// contains filtered or unexported methods
}

RepositoryPluginServer is the server API for RepositoryPlugin service. All implementations must embed UnimplementedRepositoryPluginServer for forward compatibility

type ResolveRequest

type ResolveRequest struct {
	Repository *v1.Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
	// contains filtered or unexported fields
}

func (*ResolveRequest) Descriptor deprecated

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

Deprecated: Use ResolveRequest.ProtoReflect.Descriptor instead.

func (*ResolveRequest) GetRepository

func (x *ResolveRequest) GetRepository() *v1.Repository

func (*ResolveRequest) ProtoMessage

func (*ResolveRequest) ProtoMessage()

func (*ResolveRequest) ProtoReflect

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

func (*ResolveRequest) Reset

func (x *ResolveRequest) Reset()

func (*ResolveRequest) String

func (x *ResolveRequest) String() string

type ResolveResponse

type ResolveResponse struct {
	Repository *v1.Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
	// contains filtered or unexported fields
}

func (*ResolveResponse) Descriptor deprecated

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

Deprecated: Use ResolveResponse.ProtoReflect.Descriptor instead.

func (*ResolveResponse) GetRepository

func (x *ResolveResponse) GetRepository() *v1.Repository

func (*ResolveResponse) ProtoMessage

func (*ResolveResponse) ProtoMessage()

func (*ResolveResponse) ProtoReflect

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

func (*ResolveResponse) Reset

func (x *ResolveResponse) Reset()

func (*ResolveResponse) String

func (x *ResolveResponse) String() string

type Type

type Type string

Type denotes the plugin type

const (
	// TypeIntegration means the plugin can act as integration plugin
	TypeIntegration Type = "integration"

	// TypeRepository means the plugin can add support for remote repositories (e.g. GitHub)
	TypeRepository Type = "repository"

	// TypeAuthentication means the plugin can add support for authenticating requests (e.g. against GitHub)
	TypeAuthentication Type = "auth"
)

type UnimplementedAuthenticationPluginServer

type UnimplementedAuthenticationPluginServer struct {
}

UnimplementedAuthenticationPluginServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthenticationPluginServer) Authenticate

type UnimplementedRepositoryPluginServer

type UnimplementedRepositoryPluginServer struct {
}

UnimplementedRepositoryPluginServer must be embedded to have forward compatible implementations.

func (UnimplementedRepositoryPluginServer) Download

func (UnimplementedRepositoryPluginServer) ListFiles

func (UnimplementedRepositoryPluginServer) RepoHost

func (UnimplementedRepositoryPluginServer) Resolve

type UnsafeAuthenticationPluginServer

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

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

type UnsafeRepositoryPluginServer

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

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

Jump to

Keyboard shortcuts

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