repository

package
v0.11.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2019 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

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 FindManifests added in v0.11.0

func FindManifests(appPath string) ([]*unstructured.Unstructured, error)

FindManifests looks at all yaml files in a directory and unmarshals them into a list of unstructured objects

func IdentifyAppSourceTypeByAppDir added in v0.7.1

func IdentifyAppSourceTypeByAppDir(appDirPath string) v1alpha1.ApplicationSourceType

IdentifyAppSourceTypeByAppDir examines a directory and determines its application source type

func RegisterRepositoryServiceServer

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

Types

type FileList added in v0.4.4

type FileList struct {
	Items                []string `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

FileList returns the contents of the repo of a ListDir request

func (*FileList) Descriptor added in v0.4.4

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

func (*FileList) GetItems added in v0.4.4

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

func (*FileList) Marshal added in v0.4.4

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

func (*FileList) MarshalTo added in v0.4.4

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

func (*FileList) ProtoMessage added in v0.4.4

func (*FileList) ProtoMessage()

func (*FileList) Reset added in v0.4.4

func (m *FileList) Reset()

func (*FileList) Size added in v0.4.4

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

func (*FileList) String added in v0.4.4

func (m *FileList) String() string

func (*FileList) Unmarshal added in v0.4.4

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

func (*FileList) XXX_DiscardUnknown added in v0.9.0

func (m *FileList) XXX_DiscardUnknown()

func (*FileList) XXX_Marshal added in v0.9.0

func (m *FileList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FileList) XXX_Merge added in v0.9.0

func (dst *FileList) XXX_Merge(src proto.Message)

func (*FileList) XXX_Size added in v0.9.0

func (m *FileList) XXX_Size() int

func (*FileList) XXX_Unmarshal added in v0.9.0

func (m *FileList) XXX_Unmarshal(b []byte) error

type GetFileRequest added in v0.4.0

type GetFileRequest struct {
	Repo                 *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"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

GetFileRequest return

func (*GetFileRequest) Descriptor added in v0.4.0

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

func (*GetFileRequest) GetPath added in v0.4.0

func (m *GetFileRequest) GetPath() string

func (*GetFileRequest) GetRepo added in v0.4.0

func (m *GetFileRequest) GetRepo() *v1alpha1.Repository

func (*GetFileRequest) GetRevision added in v0.4.0

func (m *GetFileRequest) GetRevision() string

func (*GetFileRequest) Marshal added in v0.4.0

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

func (*GetFileRequest) MarshalTo added in v0.4.0

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

func (*GetFileRequest) ProtoMessage added in v0.4.0

func (*GetFileRequest) ProtoMessage()

func (*GetFileRequest) Reset added in v0.4.0

func (m *GetFileRequest) Reset()

func (*GetFileRequest) Size added in v0.4.0

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

func (*GetFileRequest) String added in v0.4.0

func (m *GetFileRequest) String() string

func (*GetFileRequest) Unmarshal added in v0.4.0

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

func (*GetFileRequest) XXX_DiscardUnknown added in v0.9.0

func (m *GetFileRequest) XXX_DiscardUnknown()

func (*GetFileRequest) XXX_Marshal added in v0.9.0

func (m *GetFileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetFileRequest) XXX_Merge added in v0.9.0

func (dst *GetFileRequest) XXX_Merge(src proto.Message)

func (*GetFileRequest) XXX_Size added in v0.9.0

func (m *GetFileRequest) XXX_Size() int

func (*GetFileRequest) XXX_Unmarshal added in v0.9.0

func (m *GetFileRequest) XXX_Unmarshal(b []byte) error

type GetFileResponse added in v0.4.0

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

GetFileResponse returns the contents of the file of a GetFile request

func (*GetFileResponse) Descriptor added in v0.4.0

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

func (*GetFileResponse) GetData added in v0.4.0

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

func (*GetFileResponse) Marshal added in v0.4.0

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

func (*GetFileResponse) MarshalTo added in v0.4.0

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

func (*GetFileResponse) ProtoMessage added in v0.4.0

func (*GetFileResponse) ProtoMessage()

func (*GetFileResponse) Reset added in v0.4.0

func (m *GetFileResponse) Reset()

func (*GetFileResponse) Size added in v0.4.0

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

func (*GetFileResponse) String added in v0.4.0

func (m *GetFileResponse) String() string

func (*GetFileResponse) Unmarshal added in v0.4.0

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

func (*GetFileResponse) XXX_DiscardUnknown added in v0.9.0

func (m *GetFileResponse) XXX_DiscardUnknown()

func (*GetFileResponse) XXX_Marshal added in v0.9.0

func (m *GetFileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetFileResponse) XXX_Merge added in v0.9.0

func (dst *GetFileResponse) XXX_Merge(src proto.Message)

func (*GetFileResponse) XXX_Size added in v0.9.0

func (m *GetFileResponse) XXX_Size() int

func (*GetFileResponse) XXX_Unmarshal added in v0.9.0

func (m *GetFileResponse) XXX_Unmarshal(b []byte) error

type ListDirRequest added in v0.4.4

type ListDirRequest struct {
	Repo                 *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"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

ListDirRequest requests a repository directory structure

func (*ListDirRequest) Descriptor added in v0.4.4

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

func (*ListDirRequest) GetPath added in v0.4.4

func (m *ListDirRequest) GetPath() string

func (*ListDirRequest) GetRepo added in v0.4.4

func (m *ListDirRequest) GetRepo() *v1alpha1.Repository

func (*ListDirRequest) GetRevision added in v0.4.4

func (m *ListDirRequest) GetRevision() string

func (*ListDirRequest) Marshal added in v0.4.4

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

func (*ListDirRequest) MarshalTo added in v0.4.4

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

func (*ListDirRequest) ProtoMessage added in v0.4.4

func (*ListDirRequest) ProtoMessage()

func (*ListDirRequest) Reset added in v0.4.4

func (m *ListDirRequest) Reset()

func (*ListDirRequest) Size added in v0.4.4

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

func (*ListDirRequest) String added in v0.4.4

func (m *ListDirRequest) String() string

func (*ListDirRequest) Unmarshal added in v0.4.4

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

func (*ListDirRequest) XXX_DiscardUnknown added in v0.9.0

func (m *ListDirRequest) XXX_DiscardUnknown()

func (*ListDirRequest) XXX_Marshal added in v0.9.0

func (m *ListDirRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListDirRequest) XXX_Merge added in v0.9.0

func (dst *ListDirRequest) XXX_Merge(src proto.Message)

func (*ListDirRequest) XXX_Size added in v0.9.0

func (m *ListDirRequest) XXX_Size() int

func (*ListDirRequest) XXX_Unmarshal added in v0.9.0

func (m *ListDirRequest) XXX_Unmarshal(b []byte) error

type ManifestRequest

type ManifestRequest struct {
	Repo                        *v1alpha1.Repository           `protobuf:"bytes,1,opt,name=repo" json:"repo,omitempty"`
	Revision                    string                         `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
	NoCache                     bool                           `protobuf:"varint,3,opt,name=noCache,proto3" json:"noCache,omitempty"`
	AppLabelKey                 string                         `protobuf:"bytes,4,opt,name=appLabelKey,proto3" json:"appLabelKey,omitempty"`
	AppLabelValue               string                         `protobuf:"bytes,5,opt,name=appLabelValue,proto3" json:"appLabelValue,omitempty"`
	ComponentParameterOverrides []*v1alpha1.ComponentParameter `protobuf:"bytes,6,rep,name=componentParameterOverrides" json:"componentParameterOverrides,omitempty"`
	Namespace                   string                         `protobuf:"bytes,8,opt,name=namespace,proto3" json:"namespace,omitempty"`
	ApplicationSource           *v1alpha1.ApplicationSource    `protobuf:"bytes,10,opt,name=applicationSource" json:"applicationSource,omitempty"`
	HelmRepos                   []*v1alpha1.HelmRepository     `protobuf:"bytes,11,rep,name=helmRepos" json:"helmRepos,omitempty"`
	XXX_NoUnkeyedLiteral        struct{}                       `json:"-"`
	XXX_unrecognized            []byte                         `json:"-"`
	XXX_sizecache               int32                          `json:"-"`
}

ManifestRequest is a query for manifest generation.

func (*ManifestRequest) Descriptor

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

func (*ManifestRequest) GetAppLabelKey added in v0.11.0

func (m *ManifestRequest) GetAppLabelKey() string

func (*ManifestRequest) GetAppLabelValue added in v0.11.0

func (m *ManifestRequest) GetAppLabelValue() string

func (*ManifestRequest) GetApplicationSource added in v0.11.0

func (m *ManifestRequest) GetApplicationSource() *v1alpha1.ApplicationSource

func (*ManifestRequest) GetComponentParameterOverrides

func (m *ManifestRequest) GetComponentParameterOverrides() []*v1alpha1.ComponentParameter

func (*ManifestRequest) GetHelmRepos added in v0.11.0

func (m *ManifestRequest) GetHelmRepos() []*v1alpha1.HelmRepository

func (*ManifestRequest) GetNamespace added in v0.9.0

func (m *ManifestRequest) GetNamespace() string

func (*ManifestRequest) GetNoCache added in v0.11.0

func (m *ManifestRequest) GetNoCache() bool

func (*ManifestRequest) GetRepo

func (m *ManifestRequest) GetRepo() *v1alpha1.Repository

func (*ManifestRequest) GetRevision

func (m *ManifestRequest) GetRevision() string

func (*ManifestRequest) Marshal added in v0.3.1

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

func (*ManifestRequest) MarshalTo added in v0.3.1

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

func (*ManifestRequest) ProtoMessage

func (*ManifestRequest) ProtoMessage()

func (*ManifestRequest) Reset

func (m *ManifestRequest) Reset()

func (*ManifestRequest) Size added in v0.3.1

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

func (*ManifestRequest) String

func (m *ManifestRequest) String() string

func (*ManifestRequest) Unmarshal added in v0.3.1

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

func (*ManifestRequest) XXX_DiscardUnknown added in v0.9.0

func (m *ManifestRequest) XXX_DiscardUnknown()

func (*ManifestRequest) XXX_Marshal added in v0.9.0

func (m *ManifestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ManifestRequest) XXX_Merge added in v0.9.0

func (dst *ManifestRequest) XXX_Merge(src proto.Message)

func (*ManifestRequest) XXX_Size added in v0.9.0

func (m *ManifestRequest) XXX_Size() int

func (*ManifestRequest) XXX_Unmarshal added in v0.9.0

func (m *ManifestRequest) XXX_Unmarshal(b []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               []*v1alpha1.ComponentParameter `protobuf:"bytes,5,rep,name=params" json:"params,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                       `json:"-"`
	XXX_unrecognized     []byte                         `json:"-"`
	XXX_sizecache        int32                          `json:"-"`
}

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) GetParams added in v0.4.0

func (m *ManifestResponse) GetParams() []*v1alpha1.ComponentParameter

func (*ManifestResponse) GetRevision

func (m *ManifestResponse) GetRevision() string

func (*ManifestResponse) GetServer

func (m *ManifestResponse) GetServer() string

func (*ManifestResponse) Marshal added in v0.3.1

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

func (*ManifestResponse) MarshalTo added in v0.3.1

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

func (*ManifestResponse) ProtoMessage

func (*ManifestResponse) ProtoMessage()

func (*ManifestResponse) Reset

func (m *ManifestResponse) Reset()

func (*ManifestResponse) Size added in v0.3.1

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

func (*ManifestResponse) String

func (m *ManifestResponse) String() string

func (*ManifestResponse) Unmarshal added in v0.3.1

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

func (*ManifestResponse) XXX_DiscardUnknown added in v0.9.0

func (m *ManifestResponse) XXX_DiscardUnknown()

func (*ManifestResponse) XXX_Marshal added in v0.9.0

func (m *ManifestResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ManifestResponse) XXX_Merge added in v0.9.0

func (dst *ManifestResponse) XXX_Merge(src proto.Message)

func (*ManifestResponse) XXX_Size added in v0.9.0

func (m *ManifestResponse) XXX_Size() int

func (*ManifestResponse) XXX_Unmarshal added in v0.9.0

func (m *ManifestResponse) XXX_Unmarshal(b []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 added in v0.4.0

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

func (*Service) ListDir added in v0.4.4

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

ListDir lists the contents of a GitHub repo

Directories

Path Synopsis
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0

Jump to

Keyboard shortcuts

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