deployment

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package deployment is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	Deployment_Status_name = map[int32]string{
		0: "PENDING",
		1: "BUILDING",
		2: "PUBLISHED",
		3: "EXPIRED",
		4: "FAILED",
	}
	Deployment_Status_value = map[string]int32{
		"PENDING":   0,
		"BUILDING":  1,
		"PUBLISHED": 2,
		"EXPIRED":   3,
		"FAILED":    4,
	}
)

Enum value maps for Deployment_Status.

View Source
var DeploymentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "deployment.DeploymentService",
	HandlerType: (*DeploymentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "List",
			Handler:    _DeploymentService_List_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _DeploymentService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _DeploymentService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _DeploymentService_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "deployment/deployment.proto",
}

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

View Source
var File_deployment_deployment_proto protoreflect.FileDescriptor

Functions

func RegisterDeploymentServiceHandler

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

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

func RegisterDeploymentServiceHandlerClient

func RegisterDeploymentServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DeploymentServiceClient) error

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

func RegisterDeploymentServiceHandlerFromEndpoint

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

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

func RegisterDeploymentServiceHandlerServer

func RegisterDeploymentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DeploymentServiceServer) error

RegisterDeploymentServiceHandlerServer registers the http handlers for service DeploymentService to "mux". UnaryRPC :call DeploymentServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDeploymentServiceHandlerFromEndpoint instead.

func RegisterDeploymentServiceServer

func RegisterDeploymentServiceServer(s grpc.ServiceRegistrar, srv DeploymentServiceServer)

Types

type Deployment

type Deployment struct {
	Id           string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" bson:"_id,omitempty"` // @gotags: bson:"_id,omitempty"
	Pid          string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"`
	Appid        string `protobuf:"bytes,3,opt,name=appid,proto3" json:"appid,omitempty"`
	ImageId      string `protobuf:"bytes,5,opt,name=image_id,json=imageId,proto3" json:"image_id,omitempty" bson:"image_id,omitempty"`         // @gotags: bson:"image_id,omitempty"
	ImageUrl     string `protobuf:"bytes,6,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty" bson:"image_url,omitempty"`     // @gotags: bson:"image_url,omitempty"
	CommitId     string `protobuf:"bytes,7,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty" bson:"commit_id,omitempty"`     // @gotags: bson:"commit_id,omitempty"
	CommitMsg    string `protobuf:"bytes,8,opt,name=commit_msg,json=commitMsg,proto3" json:"commit_msg,omitempty" bson:"commit_msg,omitempty"` // @gotags: bson:"commit_msg,omitempty"
	CommitAuthor string ``                                                                                                                     // @gotags: bson:"commit_author,omitempty"
	/* 128-byte string literal not displayed */
	Status    Deployment_Status      `protobuf:"varint,10,opt,name=status,proto3,enum=deployment.Deployment_Status" json:"status,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,101,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,103,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Deployment) Descriptor deprecated

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

Deprecated: Use Deployment.ProtoReflect.Descriptor instead.

func (*Deployment) GetAppid

func (x *Deployment) GetAppid() string

func (*Deployment) GetCommitAuthor

func (x *Deployment) GetCommitAuthor() string

func (*Deployment) GetCommitId

func (x *Deployment) GetCommitId() string

func (*Deployment) GetCommitMsg

func (x *Deployment) GetCommitMsg() string

func (*Deployment) GetCreatedAt

func (x *Deployment) GetCreatedAt() *timestamppb.Timestamp

func (*Deployment) GetId

func (x *Deployment) GetId() string

func (*Deployment) GetImageId

func (x *Deployment) GetImageId() string

func (*Deployment) GetImageUrl

func (x *Deployment) GetImageUrl() string

func (*Deployment) GetPid

func (x *Deployment) GetPid() string

func (*Deployment) GetStatus

func (x *Deployment) GetStatus() Deployment_Status

func (*Deployment) GetUpdatedAt

func (x *Deployment) GetUpdatedAt() *timestamppb.Timestamp

func (*Deployment) ProtoMessage

func (*Deployment) ProtoMessage()

func (*Deployment) ProtoReflect

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

func (*Deployment) Reset

func (x *Deployment) Reset()

func (*Deployment) String

func (x *Deployment) String() string

func (*Deployment) Validate

func (m *Deployment) Validate() error

Validate checks the field values on Deployment with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Deployment) ValidateAll

func (m *Deployment) ValidateAll() error

ValidateAll checks the field values on Deployment with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DeploymentMultiError, or nil if none found.

type DeploymentListRequest

type DeploymentListRequest struct {
	Pid string `protobuf:"bytes,1,opt,name=pid,proto3" json:"pid,omitempty"`
	// contains filtered or unexported fields
}

func (*DeploymentListRequest) Descriptor deprecated

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

Deprecated: Use DeploymentListRequest.ProtoReflect.Descriptor instead.

func (*DeploymentListRequest) GetPid

func (x *DeploymentListRequest) GetPid() string

func (*DeploymentListRequest) ProtoMessage

func (*DeploymentListRequest) ProtoMessage()

func (*DeploymentListRequest) ProtoReflect

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

func (*DeploymentListRequest) Reset

func (x *DeploymentListRequest) Reset()

func (*DeploymentListRequest) String

func (x *DeploymentListRequest) String() string

func (*DeploymentListRequest) Validate

func (m *DeploymentListRequest) Validate() error

Validate checks the field values on DeploymentListRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*DeploymentListRequest) ValidateAll

func (m *DeploymentListRequest) ValidateAll() error

ValidateAll checks the field values on DeploymentListRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DeploymentListRequestMultiError, or nil if none found.

type DeploymentListRequestMultiError

type DeploymentListRequestMultiError []error

DeploymentListRequestMultiError is an error wrapping multiple validation errors returned by DeploymentListRequest.ValidateAll() if the designated constraints aren't met.

func (DeploymentListRequestMultiError) AllErrors

func (m DeploymentListRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DeploymentListRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type DeploymentListRequestValidationError

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

DeploymentListRequestValidationError is the validation error returned by DeploymentListRequest.Validate if the designated constraints aren't met.

func (DeploymentListRequestValidationError) Cause

Cause function returns cause value.

func (DeploymentListRequestValidationError) Error

Error satisfies the builtin error interface

func (DeploymentListRequestValidationError) ErrorName

ErrorName returns error name.

func (DeploymentListRequestValidationError) Field

Field function returns field value.

func (DeploymentListRequestValidationError) Key

Key function returns key value.

func (DeploymentListRequestValidationError) Reason

Reason function returns reason value.

type DeploymentListResponse

type DeploymentListResponse struct {
	Items []*Deployment `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	Total int64         `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
	// contains filtered or unexported fields
}

func (*DeploymentListResponse) Descriptor deprecated

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

Deprecated: Use DeploymentListResponse.ProtoReflect.Descriptor instead.

func (*DeploymentListResponse) GetItems

func (x *DeploymentListResponse) GetItems() []*Deployment

func (*DeploymentListResponse) GetTotal

func (x *DeploymentListResponse) GetTotal() int64

func (*DeploymentListResponse) ProtoMessage

func (*DeploymentListResponse) ProtoMessage()

func (*DeploymentListResponse) ProtoReflect

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

func (*DeploymentListResponse) Reset

func (x *DeploymentListResponse) Reset()

func (*DeploymentListResponse) String

func (x *DeploymentListResponse) String() string

func (*DeploymentListResponse) Validate

func (m *DeploymentListResponse) Validate() error

Validate checks the field values on DeploymentListResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*DeploymentListResponse) ValidateAll

func (m *DeploymentListResponse) ValidateAll() error

ValidateAll checks the field values on DeploymentListResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DeploymentListResponseMultiError, or nil if none found.

type DeploymentListResponseMultiError

type DeploymentListResponseMultiError []error

DeploymentListResponseMultiError is an error wrapping multiple validation errors returned by DeploymentListResponse.ValidateAll() if the designated constraints aren't met.

func (DeploymentListResponseMultiError) AllErrors

func (m DeploymentListResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DeploymentListResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type DeploymentListResponseValidationError

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

DeploymentListResponseValidationError is the validation error returned by DeploymentListResponse.Validate if the designated constraints aren't met.

func (DeploymentListResponseValidationError) Cause

Cause function returns cause value.

func (DeploymentListResponseValidationError) Error

Error satisfies the builtin error interface

func (DeploymentListResponseValidationError) ErrorName

ErrorName returns error name.

func (DeploymentListResponseValidationError) Field

Field function returns field value.

func (DeploymentListResponseValidationError) Key

Key function returns key value.

func (DeploymentListResponseValidationError) Reason

Reason function returns reason value.

type DeploymentMultiError

type DeploymentMultiError []error

DeploymentMultiError is an error wrapping multiple validation errors returned by Deployment.ValidateAll() if the designated constraints aren't met.

func (DeploymentMultiError) AllErrors

func (m DeploymentMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DeploymentMultiError) Error

func (m DeploymentMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DeploymentServiceClient

type DeploymentServiceClient interface {
	List(ctx context.Context, in *DeploymentListRequest, opts ...grpc.CallOption) (*DeploymentListResponse, error)
	Create(ctx context.Context, in *Deployment, opts ...grpc.CallOption) (*Deployment, error)
	Update(ctx context.Context, in *Deployment, opts ...grpc.CallOption) (*Deployment, error)
	Delete(ctx context.Context, in *kiae.IdRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

DeploymentServiceClient is the client API for DeploymentService 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.

type DeploymentServiceServer

DeploymentServiceServer is the server API for DeploymentService service. All implementations should embed UnimplementedDeploymentServiceServer for forward compatibility

type DeploymentValidationError

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

DeploymentValidationError is the validation error returned by Deployment.Validate if the designated constraints aren't met.

func (DeploymentValidationError) Cause

func (e DeploymentValidationError) Cause() error

Cause function returns cause value.

func (DeploymentValidationError) Error

Error satisfies the builtin error interface

func (DeploymentValidationError) ErrorName

func (e DeploymentValidationError) ErrorName() string

ErrorName returns error name.

func (DeploymentValidationError) Field

Field function returns field value.

func (DeploymentValidationError) Key

Key function returns key value.

func (DeploymentValidationError) Reason

func (e DeploymentValidationError) Reason() string

Reason function returns reason value.

type Deployment_Status

type Deployment_Status int32
const (
	Deployment_PENDING   Deployment_Status = 0
	Deployment_BUILDING  Deployment_Status = 1
	Deployment_PUBLISHED Deployment_Status = 2
	Deployment_EXPIRED   Deployment_Status = 3
	Deployment_FAILED    Deployment_Status = 4
)

func (Deployment_Status) Descriptor

func (Deployment_Status) Enum

func (Deployment_Status) EnumDescriptor deprecated

func (Deployment_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Deployment_Status.Descriptor instead.

func (Deployment_Status) Number

func (Deployment_Status) String

func (x Deployment_Status) String() string

func (Deployment_Status) Type

type UnimplementedDeploymentServiceServer

type UnimplementedDeploymentServiceServer struct {
}

UnimplementedDeploymentServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedDeploymentServiceServer) Create

func (UnimplementedDeploymentServiceServer) Delete

func (UnimplementedDeploymentServiceServer) List

func (UnimplementedDeploymentServiceServer) Update

type UnsafeDeploymentServiceServer

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

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

Jump to

Keyboard shortcuts

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