environment

package
v0.0.0-...-00900f5 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 10 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_v1_environment_environment_proto protoreflect.FileDescriptor
View Source
var File_api_v1_environment_revision_proto protoreflect.FileDescriptor
View Source
var File_api_v1_environment_service_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.v1.environment.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _Service_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _Service_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Service_Delete_Handler,
		},
		{
			MethodName: "List",
			Handler:    _Service_List_Handler,
		},
		{
			MethodName: "GetNamespaces",
			Handler:    _Service_GetNamespaces_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/environment/service.proto",
}

Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type CreateRequest

type CreateRequest struct {
	EnvironmentId string    `protobuf:"bytes,1,opt,name=environment_id,json=environmentId,proto3" json:"environment_id,omitempty"`
	Initializers  []*Update `protobuf:"bytes,2,rep,name=initializers,proto3" json:"initializers,omitempty"`
	ClusterId     string    `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
	// Namespace template is used to generate the namespace name when configuring
	// resources. Default is to set the namespace equal to the project name.
	// Default value is: {{ .Project.Name }}
	// Valid template properties are:
	//
	//	.Project.Name - name of the project
	//	.Environment.Name - name of the environment.
	NamespaceTemplate string `protobuf:"bytes,4,opt,name=namespace_template,json=namespaceTemplate,proto3" json:"namespace_template,omitempty"`
	// If true, the environment will be marked as ephemeral.
	// It is possible for developers to create ephemeral environments.
	Ephemeral bool `protobuf:"varint,5,opt,name=ephemeral,proto3" json:"ephemeral,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetClusterId

func (x *CreateRequest) GetClusterId() string

func (*CreateRequest) GetEnvironmentId

func (x *CreateRequest) GetEnvironmentId() string

func (*CreateRequest) GetEphemeral

func (x *CreateRequest) GetEphemeral() bool

func (*CreateRequest) GetInitializers

func (x *CreateRequest) GetInitializers() []*Update

func (*CreateRequest) GetNamespaceTemplate

func (x *CreateRequest) GetNamespaceTemplate() string

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

func (x *CreateRequest) ProtoReflect() protoreflect.Message

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

type CreateResponse

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

func (*CreateResponse) Descriptor deprecated

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

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect

func (x *CreateResponse) ProtoReflect() protoreflect.Message

func (*CreateResponse) Reset

func (x *CreateResponse) Reset()

func (*CreateResponse) String

func (x *CreateResponse) String() string

type DeleteRequest

type DeleteRequest struct {
	EnvironmentId string `protobuf:"bytes,1,opt,name=environment_id,json=environmentId,proto3" json:"environment_id,omitempty"`
	// Force delete all running capsules in the enviornment. If false,
	// the request will be aborted if any capsules is running in the
	// environment.
	Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetEnvironmentId

func (x *DeleteRequest) GetEnvironmentId() string

func (*DeleteRequest) GetForce

func (x *DeleteRequest) GetForce() bool

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

func (x *DeleteRequest) ProtoReflect() protoreflect.Message

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

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

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

func (x *DeleteResponse) ProtoReflect() protoreflect.Message

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type Environment

type Environment struct {

	// ID of the environment.
	EnvironmentId string `protobuf:"bytes,1,opt,name=environment_id,json=environmentId,proto3" json:"environment_id,omitempty"`
	// The version of the Rig-operator CRD for this environment.
	OperatorVersion string `protobuf:"bytes,3,opt,name=operator_version,json=operatorVersion,proto3" json:"operator_version,omitempty"`
	// ID of the backing cluster.
	ClusterId string `protobuf:"bytes,4,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
	// Namespace template is used to generate the namespace name when configuring
	// resources. Default is to set the namespace equal to the project name.
	NamespaceTemplate string `protobuf:"bytes,5,opt,name=namespace_template,json=namespaceTemplate,proto3" json:"namespace_template,omitempty"`
	// If true, the environment is deletable by developer users, and can be
	// deleted with capsules running.
	Ephemeral bool `protobuf:"varint,6,opt,name=ephemeral,proto3" json:"ephemeral,omitempty"`
	// Active Projects. These projects can deploy capsules to this environment.
	// This is overridden by a true the global flag.
	ActiveProjects []string `protobuf:"bytes,7,rep,name=active_projects,json=activeProjects,proto3" json:"active_projects,omitempty"`
	// If true, the environment is available to all projects.
	Global bool `protobuf:"varint,8,opt,name=global,proto3" json:"global,omitempty"`
	// contains filtered or unexported fields
}

Environment model.

func (*Environment) Descriptor deprecated

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

Deprecated: Use Environment.ProtoReflect.Descriptor instead.

func (*Environment) GetActiveProjects

func (x *Environment) GetActiveProjects() []string

func (*Environment) GetClusterId

func (x *Environment) GetClusterId() string

func (*Environment) GetEnvironmentId

func (x *Environment) GetEnvironmentId() string

func (*Environment) GetEphemeral

func (x *Environment) GetEphemeral() bool

func (*Environment) GetGlobal

func (x *Environment) GetGlobal() bool

func (*Environment) GetNamespaceTemplate

func (x *Environment) GetNamespaceTemplate() string

func (*Environment) GetOperatorVersion

func (x *Environment) GetOperatorVersion() string

func (*Environment) ProtoMessage

func (*Environment) ProtoMessage()

func (*Environment) ProtoReflect

func (x *Environment) ProtoReflect() protoreflect.Message

func (*Environment) Reset

func (x *Environment) Reset()

func (*Environment) String

func (x *Environment) String() string

type GetNamespacesRequest

type GetNamespacesRequest struct {
	ProjectEnvs []*ProjectEnvironment `protobuf:"bytes,1,rep,name=project_envs,json=projectEnvs,proto3" json:"project_envs,omitempty"`
	// contains filtered or unexported fields
}

func (*GetNamespacesRequest) Descriptor deprecated

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

Deprecated: Use GetNamespacesRequest.ProtoReflect.Descriptor instead.

func (*GetNamespacesRequest) GetProjectEnvs

func (x *GetNamespacesRequest) GetProjectEnvs() []*ProjectEnvironment

func (*GetNamespacesRequest) ProtoMessage

func (*GetNamespacesRequest) ProtoMessage()

func (*GetNamespacesRequest) ProtoReflect

func (x *GetNamespacesRequest) ProtoReflect() protoreflect.Message

func (*GetNamespacesRequest) Reset

func (x *GetNamespacesRequest) Reset()

func (*GetNamespacesRequest) String

func (x *GetNamespacesRequest) String() string

type GetNamespacesResponse

type GetNamespacesResponse struct {
	Namespaces []*ProjectEnvironmentNamespace `protobuf:"bytes,2,rep,name=namespaces,proto3" json:"namespaces,omitempty"`
	// contains filtered or unexported fields
}

func (*GetNamespacesResponse) Descriptor deprecated

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

Deprecated: Use GetNamespacesResponse.ProtoReflect.Descriptor instead.

func (*GetNamespacesResponse) GetNamespaces

func (x *GetNamespacesResponse) GetNamespaces() []*ProjectEnvironmentNamespace

func (*GetNamespacesResponse) ProtoMessage

func (*GetNamespacesResponse) ProtoMessage()

func (*GetNamespacesResponse) ProtoReflect

func (x *GetNamespacesResponse) ProtoReflect() protoreflect.Message

func (*GetNamespacesResponse) Reset

func (x *GetNamespacesResponse) Reset()

func (*GetNamespacesResponse) String

func (x *GetNamespacesResponse) String() string

type ListRequest

type ListRequest struct {

	// Pagination options.
	Pagination *model.Pagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// Exclude ephemeral environments in the list.
	ExcludeEphemeral bool `protobuf:"varint,3,opt,name=exclude_ephemeral,json=excludeEphemeral,proto3" json:"exclude_ephemeral,omitempty"`
	// Get environments for a specific project.
	ProjectFilter string `protobuf:"bytes,4,opt,name=project_filter,json=projectFilter,proto3" json:"project_filter,omitempty"`
	// contains filtered or unexported fields
}

Request for listing available environments.

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetExcludeEphemeral

func (x *ListRequest) GetExcludeEphemeral() bool

func (*ListRequest) GetPagination

func (x *ListRequest) GetPagination() *model.Pagination

func (*ListRequest) GetProjectFilter

func (x *ListRequest) GetProjectFilter() string

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

func (x *ListRequest) ProtoReflect() protoreflect.Message

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type ListResponse

type ListResponse struct {

	// List of environments.
	Environments []*Environment `protobuf:"bytes,1,rep,name=environments,proto3" json:"environments,omitempty"`
	// The version of the Rig-platform.
	PlatformVersion string `protobuf:"bytes,2,opt,name=platform_version,json=platformVersion,proto3" json:"platform_version,omitempty"`
	// contains filtered or unexported fields
}

Response for listing available environments.

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetEnvironments

func (x *ListResponse) GetEnvironments() []*Environment

func (*ListResponse) GetPlatformVersion

func (x *ListResponse) GetPlatformVersion() string

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

func (x *ListResponse) ProtoReflect() protoreflect.Message

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

type ProjectEnvironment

type ProjectEnvironment struct {
	ProjectId     string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	EnvironmentId string `protobuf:"bytes,2,opt,name=environment_id,json=environmentId,proto3" json:"environment_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ProjectEnvironment) Descriptor deprecated

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

Deprecated: Use ProjectEnvironment.ProtoReflect.Descriptor instead.

func (*ProjectEnvironment) GetEnvironmentId

func (x *ProjectEnvironment) GetEnvironmentId() string

func (*ProjectEnvironment) GetProjectId

func (x *ProjectEnvironment) GetProjectId() string

func (*ProjectEnvironment) ProtoMessage

func (*ProjectEnvironment) ProtoMessage()

func (*ProjectEnvironment) ProtoReflect

func (x *ProjectEnvironment) ProtoReflect() protoreflect.Message

func (*ProjectEnvironment) Reset

func (x *ProjectEnvironment) Reset()

func (*ProjectEnvironment) String

func (x *ProjectEnvironment) String() string

type ProjectEnvironmentNamespace

type ProjectEnvironmentNamespace struct {
	ProjectId     string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	EnvironmentId string `protobuf:"bytes,2,opt,name=environment_id,json=environmentId,proto3" json:"environment_id,omitempty"`
	Namespace     string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

func (*ProjectEnvironmentNamespace) Descriptor deprecated

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

Deprecated: Use ProjectEnvironmentNamespace.ProtoReflect.Descriptor instead.

func (*ProjectEnvironmentNamespace) GetEnvironmentId

func (x *ProjectEnvironmentNamespace) GetEnvironmentId() string

func (*ProjectEnvironmentNamespace) GetNamespace

func (x *ProjectEnvironmentNamespace) GetNamespace() string

func (*ProjectEnvironmentNamespace) GetProjectId

func (x *ProjectEnvironmentNamespace) GetProjectId() string

func (*ProjectEnvironmentNamespace) ProtoMessage

func (*ProjectEnvironmentNamespace) ProtoMessage()

func (*ProjectEnvironmentNamespace) ProtoReflect

func (*ProjectEnvironmentNamespace) Reset

func (x *ProjectEnvironmentNamespace) Reset()

func (*ProjectEnvironmentNamespace) String

func (x *ProjectEnvironmentNamespace) String() string

type Revision

type Revision struct {
	Spec     *v1.Environment         `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"`
	Metadata *model.RevisionMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*Revision) Descriptor deprecated

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

Deprecated: Use Revision.ProtoReflect.Descriptor instead.

func (*Revision) GetMetadata

func (x *Revision) GetMetadata() *model.RevisionMetadata

func (*Revision) GetSpec

func (x *Revision) GetSpec() *v1.Environment

func (*Revision) ProtoMessage

func (*Revision) ProtoMessage()

func (*Revision) ProtoReflect

func (x *Revision) ProtoReflect() protoreflect.Message

func (*Revision) Reset

func (x *Revision) Reset()

func (*Revision) String

func (x *Revision) String() string

type ServiceClient

type ServiceClient interface {
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
	// List available environments.
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	GetNamespaces(ctx context.Context, in *GetNamespacesRequest, opts ...grpc.CallOption) (*GetNamespacesResponse, error)
}

ServiceClient is the client API for Service service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	Create(context.Context, *CreateRequest) (*CreateResponse, error)
	Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
	Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
	// List available environments.
	List(context.Context, *ListRequest) (*ListResponse, error)
	GetNamespaces(context.Context, *GetNamespacesRequest) (*GetNamespacesResponse, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) Create

func (UnimplementedServiceServer) Delete

func (UnimplementedServiceServer) GetNamespaces

func (UnimplementedServiceServer) List

func (UnimplementedServiceServer) Update

type UnsafeServiceServer

type UnsafeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.

type Update

type Update struct {

	// Types that are assignable to Field:
	//
	//	*Update_AddProject
	//	*Update_RemoveProject
	//	*Update_SetGlobal
	Field isUpdate_Field `protobuf_oneof:"field"`
	// contains filtered or unexported fields
}

func (*Update) Descriptor deprecated

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

Deprecated: Use Update.ProtoReflect.Descriptor instead.

func (*Update) GetAddProject

func (x *Update) GetAddProject() string

func (*Update) GetField

func (m *Update) GetField() isUpdate_Field

func (*Update) GetRemoveProject

func (x *Update) GetRemoveProject() string

func (*Update) GetSetGlobal

func (x *Update) GetSetGlobal() bool

func (*Update) ProtoMessage

func (*Update) ProtoMessage()

func (*Update) ProtoReflect

func (x *Update) ProtoReflect() protoreflect.Message

func (*Update) Reset

func (x *Update) Reset()

func (*Update) String

func (x *Update) String() string

type UpdateRequest

type UpdateRequest struct {
	EnvironmentId string    `protobuf:"bytes,1,opt,name=environment_id,json=environmentId,proto3" json:"environment_id,omitempty"`
	Updates       []*Update `protobuf:"bytes,2,rep,name=updates,proto3" json:"updates,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRequest) Descriptor deprecated

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

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetEnvironmentId

func (x *UpdateRequest) GetEnvironmentId() string

func (*UpdateRequest) GetUpdates

func (x *UpdateRequest) GetUpdates() []*Update

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) ProtoReflect

func (x *UpdateRequest) ProtoReflect() protoreflect.Message

func (*UpdateRequest) Reset

func (x *UpdateRequest) Reset()

func (*UpdateRequest) String

func (x *UpdateRequest) String() string

type UpdateResponse

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

func (*UpdateResponse) Descriptor deprecated

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

Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.

func (*UpdateResponse) ProtoMessage

func (*UpdateResponse) ProtoMessage()

func (*UpdateResponse) ProtoReflect

func (x *UpdateResponse) ProtoReflect() protoreflect.Message

func (*UpdateResponse) Reset

func (x *UpdateResponse) Reset()

func (*UpdateResponse) String

func (x *UpdateResponse) String() string

type Update_AddProject

type Update_AddProject struct {
	AddProject string `protobuf:"bytes,2,opt,name=add_project,json=addProject,proto3,oneof"`
}

type Update_RemoveProject

type Update_RemoveProject struct {
	RemoveProject string `protobuf:"bytes,3,opt,name=remove_project,json=removeProject,proto3,oneof"`
}

type Update_SetGlobal

type Update_SetGlobal struct {
	SetGlobal bool `protobuf:"varint,4,opt,name=set_global,json=setGlobal,proto3,oneof"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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