repository

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2018 License: Apache-2.0 Imports: 32 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 RegisterRepositoryServiceServer

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

Types

type AppSourceType added in v0.7.0

type AppSourceType string
const (
	AppSourceKsonnet   AppSourceType = "ksonnet"
	AppSourceHelm      AppSourceType = "helm"
	AppSourceKustomize AppSourceType = "kustomize"
	AppSourceDirectory AppSourceType = "directory"
)

func IdentifyAppSourceTypeByAppDir added in v0.7.1

func IdentifyAppSourceTypeByAppDir(appDirPath string) AppSourceType

IdentifyAppSourceTypeByAppDir examines a directory and determines its application source type

func IdentifyAppSourceTypeByAppPath added in v0.7.1

func IdentifyAppSourceTypeByAppPath(appFilePath string) AppSourceType

IdentifyAppSourceTypeByAppPath determines application source type by app file path

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"`
	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 []*v1alpha1.ComponentParameter `protobuf:"bytes,6,rep,name=componentParameterOverrides" json:"componentParameterOverrides,omitempty"`
	ValueFiles                  []string                       `protobuf:"bytes,7,rep,name=valueFiles" json:"valueFiles,omitempty"`
	Namespace                   string                         `protobuf:"bytes,8,opt,name=namespace,proto3" json:"namespace,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) GetAppLabel

func (m *ManifestRequest) GetAppLabel() string

func (*ManifestRequest) GetComponentParameterOverrides

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

func (*ManifestRequest) GetEnvironment

func (m *ManifestRequest) GetEnvironment() string

func (*ManifestRequest) GetNamespace added in v0.9.0

func (m *ManifestRequest) GetNamespace() string

func (*ManifestRequest) GetPath

func (m *ManifestRequest) GetPath() string

func (*ManifestRequest) GetRepo

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

func (*ManifestRequest) GetRevision

func (m *ManifestRequest) GetRevision() string

func (*ManifestRequest) GetValueFiles added in v0.7.0

func (m *ManifestRequest) GetValueFiles() []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