project

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2018 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Package project is a generated protocol buffer package.

Project Service

Project Service API performs CRUD actions against project resources

It is generated from these files:
	server/project/project.proto

It has these top-level messages:
	ProjectCreateRequest
	ProjectTokenDeleteRequest
	ProjectTokenCreateRequest
	ProjectTokenResponse
	ProjectQuery
	ProjectUpdateRequest
	EmptyResponse

Package project is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// JWTTokenSubFormat format of the JWT token subject that ArgoCD vends out.
	JWTTokenSubFormat = "proj:%s:%s"
)

Variables

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

Functions

func RegisterProjectServiceHandler

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

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

func RegisterProjectServiceHandlerClient

func RegisterProjectServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProjectServiceClient) error

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

func RegisterProjectServiceHandlerFromEndpoint

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

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

func RegisterProjectServiceServer

func RegisterProjectServiceServer(s *grpc.Server, srv ProjectServiceServer)

Types

type EmptyResponse

type EmptyResponse struct {
}

func (*EmptyResponse) Descriptor

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

func (*EmptyResponse) Marshal

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

func (*EmptyResponse) MarshalTo

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

func (*EmptyResponse) ProtoMessage

func (*EmptyResponse) ProtoMessage()

func (*EmptyResponse) Reset

func (m *EmptyResponse) Reset()

func (*EmptyResponse) Size

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

func (*EmptyResponse) String

func (m *EmptyResponse) String() string

func (*EmptyResponse) Unmarshal

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

type ProjectCreateRequest

type ProjectCreateRequest struct {
	Project *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.AppProject `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"`
}

ProjectCreateRequest defines project creation parameters.

func (*ProjectCreateRequest) Descriptor

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

func (*ProjectCreateRequest) Marshal

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

func (*ProjectCreateRequest) MarshalTo

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

func (*ProjectCreateRequest) ProtoMessage

func (*ProjectCreateRequest) ProtoMessage()

func (*ProjectCreateRequest) Reset

func (m *ProjectCreateRequest) Reset()

func (*ProjectCreateRequest) Size

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

func (*ProjectCreateRequest) String

func (m *ProjectCreateRequest) String() string

func (*ProjectCreateRequest) Unmarshal

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

type ProjectQuery

type ProjectQuery struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}

ProjectQuery is a query for Project resources

func (*ProjectQuery) Descriptor

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

func (*ProjectQuery) GetName

func (m *ProjectQuery) GetName() string

func (*ProjectQuery) Marshal

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

func (*ProjectQuery) MarshalTo

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

func (*ProjectQuery) ProtoMessage

func (*ProjectQuery) ProtoMessage()

func (*ProjectQuery) Reset

func (m *ProjectQuery) Reset()

func (*ProjectQuery) Size

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

func (*ProjectQuery) String

func (m *ProjectQuery) String() string

func (*ProjectQuery) Unmarshal

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

type ProjectServiceClient

type ProjectServiceClient interface {
	// Create a new project token.
	CreateToken(ctx context.Context, in *ProjectTokenCreateRequest, opts ...grpc.CallOption) (*ProjectTokenResponse, error)
	// Delete a new project token.
	DeleteToken(ctx context.Context, in *ProjectTokenDeleteRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
	// Create a new project.
	Create(ctx context.Context, in *ProjectCreateRequest, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.AppProject, error)
	// List returns list of projects
	List(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.AppProjectList, error)
	// Get returns a project by name
	Get(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.AppProject, error)
	// Update updates a project
	Update(ctx context.Context, in *ProjectUpdateRequest, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.AppProject, error)
	// Delete deletes a project
	Delete(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*EmptyResponse, error)
	// ListEvents returns a list of project events
	ListEvents(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*k8s_io_api_core_v1.EventList, error)
}

func NewProjectServiceClient

func NewProjectServiceClient(cc *grpc.ClientConn) ProjectServiceClient

type ProjectServiceServer

type ProjectServiceServer interface {
	// Create a new project token.
	CreateToken(context.Context, *ProjectTokenCreateRequest) (*ProjectTokenResponse, error)
	// Delete a new project token.
	DeleteToken(context.Context, *ProjectTokenDeleteRequest) (*EmptyResponse, error)
	// Create a new project.
	Create(context.Context, *ProjectCreateRequest) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.AppProject, error)
	// List returns list of projects
	List(context.Context, *ProjectQuery) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.AppProjectList, error)
	// Get returns a project by name
	Get(context.Context, *ProjectQuery) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.AppProject, error)
	// Update updates a project
	Update(context.Context, *ProjectUpdateRequest) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.AppProject, error)
	// Delete deletes a project
	Delete(context.Context, *ProjectQuery) (*EmptyResponse, error)
	// ListEvents returns a list of project events
	ListEvents(context.Context, *ProjectQuery) (*k8s_io_api_core_v1.EventList, error)
}

type ProjectTokenCreateRequest added in v0.8.0

type ProjectTokenCreateRequest struct {
	Project     string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Role        string `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty"`
	// expiresIn represents a duration in seconds
	ExpiresIn int64 `protobuf:"varint,4,opt,name=expiresIn,proto3" json:"expiresIn,omitempty"`
}

ProjectTokenCreateRequest defines project token creation parameters.

func (*ProjectTokenCreateRequest) Descriptor added in v0.8.0

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

func (*ProjectTokenCreateRequest) GetDescription added in v0.8.0

func (m *ProjectTokenCreateRequest) GetDescription() string

func (*ProjectTokenCreateRequest) GetExpiresIn added in v0.8.0

func (m *ProjectTokenCreateRequest) GetExpiresIn() int64

func (*ProjectTokenCreateRequest) GetProject added in v0.8.0

func (m *ProjectTokenCreateRequest) GetProject() string

func (*ProjectTokenCreateRequest) GetRole added in v0.8.0

func (m *ProjectTokenCreateRequest) GetRole() string

func (*ProjectTokenCreateRequest) Marshal added in v0.8.0

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

func (*ProjectTokenCreateRequest) MarshalTo added in v0.8.0

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

func (*ProjectTokenCreateRequest) ProtoMessage added in v0.8.0

func (*ProjectTokenCreateRequest) ProtoMessage()

func (*ProjectTokenCreateRequest) Reset added in v0.8.0

func (m *ProjectTokenCreateRequest) Reset()

func (*ProjectTokenCreateRequest) Size added in v0.8.0

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

func (*ProjectTokenCreateRequest) String added in v0.8.0

func (m *ProjectTokenCreateRequest) String() string

func (*ProjectTokenCreateRequest) Unmarshal added in v0.8.0

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

type ProjectTokenDeleteRequest added in v0.8.0

type ProjectTokenDeleteRequest struct {
	Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
	Role    string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
	Iat     int64  `protobuf:"varint,3,opt,name=iat,proto3" json:"iat,omitempty"`
}

ProjectTokenCreateRequest defines project token deletion parameters.

func (*ProjectTokenDeleteRequest) Descriptor added in v0.8.0

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

func (*ProjectTokenDeleteRequest) GetIat added in v0.8.0

func (m *ProjectTokenDeleteRequest) GetIat() int64

func (*ProjectTokenDeleteRequest) GetProject added in v0.8.0

func (m *ProjectTokenDeleteRequest) GetProject() string

func (*ProjectTokenDeleteRequest) GetRole added in v0.8.0

func (m *ProjectTokenDeleteRequest) GetRole() string

func (*ProjectTokenDeleteRequest) Marshal added in v0.8.0

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

func (*ProjectTokenDeleteRequest) MarshalTo added in v0.8.0

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

func (*ProjectTokenDeleteRequest) ProtoMessage added in v0.8.0

func (*ProjectTokenDeleteRequest) ProtoMessage()

func (*ProjectTokenDeleteRequest) Reset added in v0.8.0

func (m *ProjectTokenDeleteRequest) Reset()

func (*ProjectTokenDeleteRequest) Size added in v0.8.0

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

func (*ProjectTokenDeleteRequest) String added in v0.8.0

func (m *ProjectTokenDeleteRequest) String() string

func (*ProjectTokenDeleteRequest) Unmarshal added in v0.8.0

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

type ProjectTokenResponse added in v0.8.0

type ProjectTokenResponse struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
}

ProjectTokenResponse wraps the created token or returns an empty string if deleted.

func (*ProjectTokenResponse) Descriptor added in v0.8.0

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

func (*ProjectTokenResponse) GetToken added in v0.8.0

func (m *ProjectTokenResponse) GetToken() string

func (*ProjectTokenResponse) Marshal added in v0.8.0

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

func (*ProjectTokenResponse) MarshalTo added in v0.8.0

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

func (*ProjectTokenResponse) ProtoMessage added in v0.8.0

func (*ProjectTokenResponse) ProtoMessage()

func (*ProjectTokenResponse) Reset added in v0.8.0

func (m *ProjectTokenResponse) Reset()

func (*ProjectTokenResponse) Size added in v0.8.0

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

func (*ProjectTokenResponse) String added in v0.8.0

func (m *ProjectTokenResponse) String() string

func (*ProjectTokenResponse) Unmarshal added in v0.8.0

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

type ProjectUpdateRequest

type ProjectUpdateRequest struct {
	Project *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.AppProject `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"`
}

func (*ProjectUpdateRequest) Descriptor

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

func (*ProjectUpdateRequest) Marshal

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

func (*ProjectUpdateRequest) MarshalTo

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

func (*ProjectUpdateRequest) ProtoMessage

func (*ProjectUpdateRequest) ProtoMessage()

func (*ProjectUpdateRequest) Reset

func (m *ProjectUpdateRequest) Reset()

func (*ProjectUpdateRequest) Size

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

func (*ProjectUpdateRequest) String

func (m *ProjectUpdateRequest) String() string

func (*ProjectUpdateRequest) Unmarshal

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

type Server

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

Server provides a Project service

func NewServer

func NewServer(ns string, kubeclientset kubernetes.Interface, appclientset appclientset.Interface, enf *rbac.Enforcer, projectLock *util.KeyLock, sessionMgr *session.SessionManager) *Server

NewServer returns a new instance of the Project service

func (*Server) Create

Create a new project.

func (*Server) CreateToken added in v0.8.0

CreateToken creates a new token to access a project

func (*Server) Delete

func (s *Server) Delete(ctx context.Context, q *ProjectQuery) (*EmptyResponse, error)

Delete deletes a project

func (*Server) DeleteToken added in v0.8.0

func (s *Server) DeleteToken(ctx context.Context, q *ProjectTokenDeleteRequest) (*EmptyResponse, error)

DeleteToken deletes a token in a project

func (*Server) Get

Get returns a project by name

func (*Server) List

List returns list of projects

func (*Server) ListEvents added in v0.8.0

func (s *Server) ListEvents(ctx context.Context, q *ProjectQuery) (*v1.EventList, error)

func (*Server) Update

Update updates a project

Jump to

Keyboard shortcuts

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