Documentation

Overview

    Package repository is a generated protocol buffer package.
    
    Repository Service
    
    Repository Service API performs CRUD actions against repository resources
    
    It is generated from these files:
    	server/repository/repository.proto
    
    It has these top-level messages:
    	RepoKsonnetQuery
    	RepoKsonnetResponse
    	KsonnetAppSpec
    	KsonnetEnvironment
    	KsonnetEnvironmentDestination
    	RepoQuery
    	RepoResponse
    	RepoUpdateRequest
    

    Package repository is a reverse proxy.

    It translates gRPC into RESTful JSON APIs.

    Index

    Constants

    This section is empty.

    Variables

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

    Functions

    func RegisterRepositoryServiceHandler

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

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

      func RegisterRepositoryServiceHandlerClient

      func RegisterRepositoryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RepositoryServiceClient) error

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

        func RegisterRepositoryServiceHandlerFromEndpoint

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

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

          func RegisterRepositoryServiceServer

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

          Types

          type KsonnetAppSpec

          type KsonnetAppSpec struct {
          	Name         string                         `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
          	Environments map[string]*KsonnetEnvironment `` /* 151-byte string literal not displayed */
          }

            KsonnetAppSpec contains Ksonnet app response This roughly reflects: ksonnet/ksonnet/metadata/app/schema.go

            func (*KsonnetAppSpec) Descriptor

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

            func (*KsonnetAppSpec) GetEnvironments

            func (m *KsonnetAppSpec) GetEnvironments() map[string]*KsonnetEnvironment

            func (*KsonnetAppSpec) GetName

            func (m *KsonnetAppSpec) GetName() string

            func (*KsonnetAppSpec) Marshal

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

            func (*KsonnetAppSpec) MarshalTo

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

            func (*KsonnetAppSpec) ProtoMessage

            func (*KsonnetAppSpec) ProtoMessage()

            func (*KsonnetAppSpec) Reset

            func (m *KsonnetAppSpec) Reset()

            func (*KsonnetAppSpec) Size

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

            func (*KsonnetAppSpec) String

            func (m *KsonnetAppSpec) String() string

            func (*KsonnetAppSpec) Unmarshal

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

            type KsonnetEnvironment

            type KsonnetEnvironment struct {
            	// Name is the user defined name of an environment
            	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
            	// KubernetesVersion is the kubernetes version the targetted cluster is running on.
            	K8SVersion string `protobuf:"bytes,2,opt,name=k8sVersion,proto3" json:"k8sVersion,omitempty"`
            	// Path is the relative project path containing metadata for this environment.
            	Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
            	// Destination stores the cluster address that this environment points to.
            	Destination *KsonnetEnvironmentDestination `protobuf:"bytes,4,opt,name=destination" json:"destination,omitempty"`
            }

            func (*KsonnetEnvironment) Descriptor

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

            func (*KsonnetEnvironment) GetDestination

            func (*KsonnetEnvironment) GetK8SVersion

            func (m *KsonnetEnvironment) GetK8SVersion() string

            func (*KsonnetEnvironment) GetName

            func (m *KsonnetEnvironment) GetName() string

            func (*KsonnetEnvironment) GetPath

            func (m *KsonnetEnvironment) GetPath() string

            func (*KsonnetEnvironment) Marshal

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

            func (*KsonnetEnvironment) MarshalTo

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

            func (*KsonnetEnvironment) ProtoMessage

            func (*KsonnetEnvironment) ProtoMessage()

            func (*KsonnetEnvironment) Reset

            func (m *KsonnetEnvironment) Reset()

            func (*KsonnetEnvironment) Size

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

            func (*KsonnetEnvironment) String

            func (m *KsonnetEnvironment) String() string

            func (*KsonnetEnvironment) Unmarshal

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

            type KsonnetEnvironmentDestination

            type KsonnetEnvironmentDestination struct {
            	// Server is the Kubernetes server that the cluster is running on.
            	Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
            	// Namespace is the namespace of the Kubernetes server that targets should be deployed to
            	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
            }

            func (*KsonnetEnvironmentDestination) Descriptor

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

            func (*KsonnetEnvironmentDestination) GetNamespace

            func (m *KsonnetEnvironmentDestination) GetNamespace() string

            func (*KsonnetEnvironmentDestination) GetServer

            func (m *KsonnetEnvironmentDestination) GetServer() string

            func (*KsonnetEnvironmentDestination) Marshal

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

            func (*KsonnetEnvironmentDestination) MarshalTo

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

            func (*KsonnetEnvironmentDestination) ProtoMessage

            func (*KsonnetEnvironmentDestination) ProtoMessage()

            func (*KsonnetEnvironmentDestination) Reset

            func (m *KsonnetEnvironmentDestination) Reset()

            func (*KsonnetEnvironmentDestination) Size

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

            func (*KsonnetEnvironmentDestination) String

            func (*KsonnetEnvironmentDestination) Unmarshal

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

            type RepoKsonnetQuery

            type RepoKsonnetQuery struct {
            	Repo     string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
            	Revision string `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
            }

              RepoKsonnetQuery is a query for Repository contents matching a particular path

              func (*RepoKsonnetQuery) Descriptor

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

              func (*RepoKsonnetQuery) GetRepo

              func (m *RepoKsonnetQuery) GetRepo() string

              func (*RepoKsonnetQuery) GetRevision

              func (m *RepoKsonnetQuery) GetRevision() string

              func (*RepoKsonnetQuery) Marshal

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

              func (*RepoKsonnetQuery) MarshalTo

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

              func (*RepoKsonnetQuery) ProtoMessage

              func (*RepoKsonnetQuery) ProtoMessage()

              func (*RepoKsonnetQuery) Reset

              func (m *RepoKsonnetQuery) Reset()

              func (*RepoKsonnetQuery) Size

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

              func (*RepoKsonnetQuery) String

              func (m *RepoKsonnetQuery) String() string

              func (*RepoKsonnetQuery) Unmarshal

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

              type RepoKsonnetResponse

              type RepoKsonnetResponse struct {
              	Data []*KsonnetAppSpec `protobuf:"bytes,1,rep,name=data" json:"data,omitempty"`
              }

                RepoKsonnetResponse is a response for Repository contents matching a particular path

                func (*RepoKsonnetResponse) Descriptor

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

                func (*RepoKsonnetResponse) GetData

                func (m *RepoKsonnetResponse) GetData() []*KsonnetAppSpec

                func (*RepoKsonnetResponse) Marshal

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

                func (*RepoKsonnetResponse) MarshalTo

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

                func (*RepoKsonnetResponse) ProtoMessage

                func (*RepoKsonnetResponse) ProtoMessage()

                func (*RepoKsonnetResponse) Reset

                func (m *RepoKsonnetResponse) Reset()

                func (*RepoKsonnetResponse) Size

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

                func (*RepoKsonnetResponse) String

                func (m *RepoKsonnetResponse) String() string

                func (*RepoKsonnetResponse) Unmarshal

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

                type RepoQuery

                type RepoQuery struct {
                	Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
                }

                  RepoQuery is a query for Repository resources

                  func (*RepoQuery) Descriptor

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

                  func (*RepoQuery) GetRepo

                  func (m *RepoQuery) GetRepo() string

                  func (*RepoQuery) Marshal

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

                  func (*RepoQuery) MarshalTo

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

                  func (*RepoQuery) ProtoMessage

                  func (*RepoQuery) ProtoMessage()

                  func (*RepoQuery) Reset

                  func (m *RepoQuery) Reset()

                  func (*RepoQuery) Size

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

                  func (*RepoQuery) String

                  func (m *RepoQuery) String() string

                  func (*RepoQuery) Unmarshal

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

                  type RepoResponse

                  type RepoResponse struct {
                  }

                  func (*RepoResponse) Descriptor

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

                  func (*RepoResponse) Marshal

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

                  func (*RepoResponse) MarshalTo

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

                  func (*RepoResponse) ProtoMessage

                  func (*RepoResponse) ProtoMessage()

                  func (*RepoResponse) Reset

                  func (m *RepoResponse) Reset()

                  func (*RepoResponse) Size

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

                  func (*RepoResponse) String

                  func (m *RepoResponse) String() string

                  func (*RepoResponse) Unmarshal

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

                  type RepoUpdateRequest

                  type RepoUpdateRequest struct {
                  	Url  string                                                                `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
                  	Repo *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository `protobuf:"bytes,2,opt,name=repo" json:"repo,omitempty"`
                  }

                  func (*RepoUpdateRequest) Descriptor

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

                  func (*RepoUpdateRequest) GetUrl

                  func (m *RepoUpdateRequest) GetUrl() string

                  func (*RepoUpdateRequest) Marshal

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

                  func (*RepoUpdateRequest) MarshalTo

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

                  func (*RepoUpdateRequest) ProtoMessage

                  func (*RepoUpdateRequest) ProtoMessage()

                  func (*RepoUpdateRequest) Reset

                  func (m *RepoUpdateRequest) Reset()

                  func (*RepoUpdateRequest) Size

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

                  func (*RepoUpdateRequest) String

                  func (m *RepoUpdateRequest) String() string

                  func (*RepoUpdateRequest) Unmarshal

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

                  type RepositoryServiceClient

                  type RepositoryServiceClient interface {
                  	// List returns list of repos
                  	List(ctx context.Context, in *RepoQuery, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.RepositoryList, error)
                  	// ListKsonnetApps returns list of Ksonnet apps in the repo
                  	ListKsonnetApps(ctx context.Context, in *RepoKsonnetQuery, opts ...grpc.CallOption) (*RepoKsonnetResponse, error)
                  	// Create creates a repo
                  	Create(ctx context.Context, in *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, error)
                  	// Get returns a repo by name
                  	Get(ctx context.Context, in *RepoQuery, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, error)
                  	// Update updates a repo
                  	Update(ctx context.Context, in *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, error)
                  	// Update updates a repo (special handler intended to be used only by the gRPC gateway)
                  	UpdateREST(ctx context.Context, in *RepoUpdateRequest, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, error)
                  	// Delete updates a repo
                  	Delete(ctx context.Context, in *RepoQuery, opts ...grpc.CallOption) (*RepoResponse, error)
                  }

                  func NewRepositoryServiceClient

                  func NewRepositoryServiceClient(cc *grpc.ClientConn) RepositoryServiceClient

                  type Server

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

                    Server provides a Repository service

                    func NewServer

                    func NewServer(
                    	repoClientset reposerver.Clientset,
                    	db db.ArgoDB,
                    ) *Server

                      NewServer returns a new instance of the Repository service

                      func (*Server) Create

                      func (s *Server) Create(ctx context.Context, r *appsv1.Repository) (*appsv1.Repository, error)

                        Create creates a repository

                        func (*Server) Delete

                        func (s *Server) Delete(ctx context.Context, q *RepoQuery) (*RepoResponse, error)

                          Delete updates a repository

                          func (*Server) Get

                          func (s *Server) Get(ctx context.Context, q *RepoQuery) (*appsv1.Repository, error)

                            Get returns a repository by URL

                            func (*Server) List

                            func (s *Server) List(ctx context.Context, q *RepoQuery) (*appsv1.RepositoryList, error)

                              List returns list of repositories

                              func (*Server) ListKsonnetApps

                              func (s *Server) ListKsonnetApps(ctx context.Context, q *RepoKsonnetQuery) (*RepoKsonnetResponse, error)

                                ListKsonnetApps returns list of Ksonnet apps in the repo

                                func (*Server) Update

                                func (s *Server) Update(ctx context.Context, r *appsv1.Repository) (*appsv1.Repository, error)

                                  Update updates a repository

                                  func (*Server) UpdateREST

                                  func (s *Server) UpdateREST(ctx context.Context, r *RepoUpdateRequest) (*appsv1.Repository, error)

                                    UpdateREST updates a repository (from a REST request)

                                    Directories

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