Documentation

Overview

Package repository is a generated protocol buffer package.

It is generated from these files:

reposerver/repository/repository.proto

It has these top-level messages:

ManifestRequest
ManifestResponse
ListDirRequest
FileList
GetFileRequest
GetFileResponse

Index

Constants

View Source
const (
	// DefaultRepoCacheExpiration is the duration for items to live in the repo cache
	DefaultRepoCacheExpiration = 24 * time.Hour
)

Variables

View Source
var (
	ErrInvalidLengthRepository = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRepository   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterRepositoryServiceServer

func RegisterRepositoryServiceServer(s *grpc.Server, srv RepositoryServiceServer)

Types

type FileList

type FileList struct {
	Items []string `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"`
}

FileList returns the contents of the repo of a ListDir request

func (*FileList) Descriptor

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

func (*FileList) GetItems

func (m *FileList) GetItems() []string

func (*FileList) Marshal

func (m *FileList) Marshal() (dAtA []byte, err error)

func (*FileList) MarshalTo

func (m *FileList) MarshalTo(dAtA []byte) (int, error)

func (*FileList) ProtoMessage

func (*FileList) ProtoMessage()

func (*FileList) Reset

func (m *FileList) Reset()

func (*FileList) Size

func (m *FileList) Size() (n int)

func (*FileList) String

func (m *FileList) String() string

func (*FileList) Unmarshal

func (m *FileList) Unmarshal(dAtA []byte) error

type GetFileRequest

type GetFileRequest struct {
	Repo     *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository `protobuf:"bytes,1,opt,name=repo" json:"repo,omitempty"`
	Revision string                                                                `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
	Path     string                                                                `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
}

GetFileRequest return

func (*GetFileRequest) Descriptor

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

func (*GetFileRequest) GetPath

func (m *GetFileRequest) GetPath() string

func (*GetFileRequest) GetRevision

func (m *GetFileRequest) GetRevision() string

func (*GetFileRequest) Marshal

func (m *GetFileRequest) Marshal() (dAtA []byte, err error)

func (*GetFileRequest) MarshalTo

func (m *GetFileRequest) MarshalTo(dAtA []byte) (int, error)

func (*GetFileRequest) ProtoMessage

func (*GetFileRequest) ProtoMessage()

func (*GetFileRequest) Reset

func (m *GetFileRequest) Reset()

func (*GetFileRequest) Size

func (m *GetFileRequest) Size() (n int)

func (*GetFileRequest) String

func (m *GetFileRequest) String() string

func (*GetFileRequest) Unmarshal

func (m *GetFileRequest) Unmarshal(dAtA []byte) error

type GetFileResponse

type GetFileResponse struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}

GetFileResponse returns the contents of the file of a GetFile request

func (*GetFileResponse) Descriptor

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

func (*GetFileResponse) GetData

func (m *GetFileResponse) GetData() []byte

func (*GetFileResponse) Marshal

func (m *GetFileResponse) Marshal() (dAtA []byte, err error)

func (*GetFileResponse) MarshalTo

func (m *GetFileResponse) MarshalTo(dAtA []byte) (int, error)

func (*GetFileResponse) ProtoMessage

func (*GetFileResponse) ProtoMessage()

func (*GetFileResponse) Reset

func (m *GetFileResponse) Reset()

func (*GetFileResponse) Size

func (m *GetFileResponse) Size() (n int)

func (*GetFileResponse) String

func (m *GetFileResponse) String() string

func (*GetFileResponse) Unmarshal

func (m *GetFileResponse) Unmarshal(dAtA []byte) error

type ListDirRequest

type ListDirRequest struct {
	Repo     *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository `protobuf:"bytes,1,opt,name=repo" json:"repo,omitempty"`
	Revision string                                                                `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
	Path     string                                                                `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
}

ListDirRequest requests a repository directory structure

func (*ListDirRequest) Descriptor

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

func (*ListDirRequest) GetPath

func (m *ListDirRequest) GetPath() string

func (*ListDirRequest) GetRevision

func (m *ListDirRequest) GetRevision() string

func (*ListDirRequest) Marshal

func (m *ListDirRequest) Marshal() (dAtA []byte, err error)

func (*ListDirRequest) MarshalTo

func (m *ListDirRequest) MarshalTo(dAtA []byte) (int, error)

func (*ListDirRequest) ProtoMessage

func (*ListDirRequest) ProtoMessage()

func (*ListDirRequest) Reset

func (m *ListDirRequest) Reset()

func (*ListDirRequest) Size

func (m *ListDirRequest) Size() (n int)

func (*ListDirRequest) String

func (m *ListDirRequest) String() string

func (*ListDirRequest) Unmarshal

func (m *ListDirRequest) Unmarshal(dAtA []byte) error

type ManifestRequest

type ManifestRequest struct {
	Repo                        *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository           `protobuf:"bytes,1,opt,name=repo" json:"repo,omitempty"`
	Revision                    string                                                                          `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
	Path                        string                                                                          `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	Environment                 string                                                                          `protobuf:"bytes,4,opt,name=environment,proto3" json:"environment,omitempty"`
	AppLabel                    string                                                                          `protobuf:"bytes,5,opt,name=appLabel,proto3" json:"appLabel,omitempty"`
	ComponentParameterOverrides []*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.ComponentParameter `protobuf:"bytes,6,rep,name=componentParameterOverrides" json:"componentParameterOverrides,omitempty"`
}

ManifestRequest is a query for manifest generation.

func (*ManifestRequest) Descriptor

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

func (*ManifestRequest) GetAppLabel

func (m *ManifestRequest) GetAppLabel() string

func (*ManifestRequest) GetEnvironment

func (m *ManifestRequest) GetEnvironment() string

func (*ManifestRequest) GetPath

func (m *ManifestRequest) GetPath() string

func (*ManifestRequest) GetRevision

func (m *ManifestRequest) GetRevision() string

func (*ManifestRequest) Marshal

func (m *ManifestRequest) Marshal() (dAtA []byte, err error)

func (*ManifestRequest) MarshalTo

func (m *ManifestRequest) MarshalTo(dAtA []byte) (int, error)

func (*ManifestRequest) ProtoMessage

func (*ManifestRequest) ProtoMessage()

func (*ManifestRequest) Reset

func (m *ManifestRequest) Reset()

func (*ManifestRequest) Size

func (m *ManifestRequest) Size() (n int)

func (*ManifestRequest) String

func (m *ManifestRequest) String() string

func (*ManifestRequest) Unmarshal

func (m *ManifestRequest) Unmarshal(dAtA []byte) error

type ManifestResponse

type ManifestResponse struct {
	Manifests []string                                                                        `protobuf:"bytes,1,rep,name=manifests" json:"manifests,omitempty"`
	Namespace string                                                                          `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Server    string                                                                          `protobuf:"bytes,3,opt,name=server,proto3" json:"server,omitempty"`
	Revision  string                                                                          `protobuf:"bytes,4,opt,name=revision,proto3" json:"revision,omitempty"`
	Params    []*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.ComponentParameter `protobuf:"bytes,5,rep,name=params" json:"params,omitempty"`
}

func (*ManifestResponse) Descriptor

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

func (*ManifestResponse) GetManifests

func (m *ManifestResponse) GetManifests() []string

func (*ManifestResponse) GetNamespace

func (m *ManifestResponse) GetNamespace() string

func (*ManifestResponse) GetRevision

func (m *ManifestResponse) GetRevision() string

func (*ManifestResponse) GetServer

func (m *ManifestResponse) GetServer() string

func (*ManifestResponse) Marshal

func (m *ManifestResponse) Marshal() (dAtA []byte, err error)

func (*ManifestResponse) MarshalTo

func (m *ManifestResponse) MarshalTo(dAtA []byte) (int, error)

func (*ManifestResponse) ProtoMessage

func (*ManifestResponse) ProtoMessage()

func (*ManifestResponse) Reset

func (m *ManifestResponse) Reset()

func (*ManifestResponse) Size

func (m *ManifestResponse) Size() (n int)

func (*ManifestResponse) String

func (m *ManifestResponse) String() string

func (*ManifestResponse) Unmarshal

func (m *ManifestResponse) Unmarshal(dAtA []byte) error

type RepositoryServiceClient

type RepositoryServiceClient interface {
	// Generate manifest for application in specified repo name and revision
	GenerateManifest(ctx context.Context, in *ManifestRequest, opts ...grpc.CallOption) (*ManifestResponse, error)
	// ListDir returns the file contents at the specified repo and path
	ListDir(ctx context.Context, in *ListDirRequest, opts ...grpc.CallOption) (*FileList, error)
	// GetFile returns the file contents at the specified repo and path
	GetFile(ctx context.Context, in *GetFileRequest, opts ...grpc.CallOption) (*GetFileResponse, error)
}

func NewRepositoryServiceClient

func NewRepositoryServiceClient(cc *grpc.ClientConn) RepositoryServiceClient

type RepositoryServiceServer

type RepositoryServiceServer interface {
	// Generate manifest for application in specified repo name and revision
	GenerateManifest(context.Context, *ManifestRequest) (*ManifestResponse, error)
	// ListDir returns the file contents at the specified repo and path
	ListDir(context.Context, *ListDirRequest) (*FileList, error)
	// GetFile returns the file contents at the specified repo and path
	GetFile(context.Context, *GetFileRequest) (*GetFileResponse, error)
}

type Service

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

Service implements ManifestService interface

func NewService

func NewService(gitFactory git.ClientFactory, cache cache.Cache) *Service

NewService returns a new instance of the Manifest service

func (*Service) GenerateManifest

func (s *Service) GenerateManifest(c context.Context, q *ManifestRequest) (*ManifestResponse, error)

func (*Service) GetFile

func (s *Service) GetFile(ctx context.Context, q *GetFileRequest) (*GetFileResponse, error)

func (*Service) ListDir

func (s *Service) ListDir(ctx context.Context, q *ListDirRequest) (*FileList, error)

ListDir lists the contents of a GitHub repo