Documentation ¶
Overview ¶
Package deployment is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterDeploymentServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterDeploymentServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DeploymentServiceClient) error
- func RegisterDeploymentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterDeploymentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DeploymentServiceServer) error
- func RegisterDeploymentServiceServer(s grpc.ServiceRegistrar, srv DeploymentServiceServer)
- type Deployment
- func (*Deployment) Descriptor() ([]byte, []int)deprecated
- func (x *Deployment) GetAppid() string
- func (x *Deployment) GetCommitAuthor() string
- func (x *Deployment) GetCommitId() string
- func (x *Deployment) GetCommitMsg() string
- func (x *Deployment) GetCreatedAt() *timestamppb.Timestamp
- func (x *Deployment) GetId() string
- func (x *Deployment) GetImageId() string
- func (x *Deployment) GetImageUrl() string
- func (x *Deployment) GetPid() string
- func (x *Deployment) GetStatus() Deployment_Status
- func (x *Deployment) GetUpdatedAt() *timestamppb.Timestamp
- func (*Deployment) ProtoMessage()
- func (x *Deployment) ProtoReflect() protoreflect.Message
- func (x *Deployment) Reset()
- func (x *Deployment) String() string
- func (m *Deployment) Validate() error
- func (m *Deployment) ValidateAll() error
- type DeploymentListRequest
- func (*DeploymentListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeploymentListRequest) GetPid() string
- func (*DeploymentListRequest) ProtoMessage()
- func (x *DeploymentListRequest) ProtoReflect() protoreflect.Message
- func (x *DeploymentListRequest) Reset()
- func (x *DeploymentListRequest) String() string
- func (m *DeploymentListRequest) Validate() error
- func (m *DeploymentListRequest) ValidateAll() error
- type DeploymentListRequestMultiError
- type DeploymentListRequestValidationError
- func (e DeploymentListRequestValidationError) Cause() error
- func (e DeploymentListRequestValidationError) Error() string
- func (e DeploymentListRequestValidationError) ErrorName() string
- func (e DeploymentListRequestValidationError) Field() string
- func (e DeploymentListRequestValidationError) Key() bool
- func (e DeploymentListRequestValidationError) Reason() string
- type DeploymentListResponse
- func (*DeploymentListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeploymentListResponse) GetItems() []*Deployment
- func (x *DeploymentListResponse) GetTotal() int64
- func (*DeploymentListResponse) ProtoMessage()
- func (x *DeploymentListResponse) ProtoReflect() protoreflect.Message
- func (x *DeploymentListResponse) Reset()
- func (x *DeploymentListResponse) String() string
- func (m *DeploymentListResponse) Validate() error
- func (m *DeploymentListResponse) ValidateAll() error
- type DeploymentListResponseMultiError
- type DeploymentListResponseValidationError
- func (e DeploymentListResponseValidationError) Cause() error
- func (e DeploymentListResponseValidationError) Error() string
- func (e DeploymentListResponseValidationError) ErrorName() string
- func (e DeploymentListResponseValidationError) Field() string
- func (e DeploymentListResponseValidationError) Key() bool
- func (e DeploymentListResponseValidationError) Reason() string
- type DeploymentMultiError
- type DeploymentServiceClient
- type DeploymentServiceServer
- type DeploymentValidationError
- type Deployment_Status
- func (Deployment_Status) Descriptor() protoreflect.EnumDescriptor
- func (x Deployment_Status) Enum() *Deployment_Status
- func (Deployment_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x Deployment_Status) Number() protoreflect.EnumNumber
- func (x Deployment_Status) String() string
- func (Deployment_Status) Type() protoreflect.EnumType
- type UnimplementedDeploymentServiceServer
- func (UnimplementedDeploymentServiceServer) Create(context.Context, *Deployment) (*Deployment, error)
- func (UnimplementedDeploymentServiceServer) Delete(context.Context, *kiae.IdRequest) (*emptypb.Empty, error)
- func (UnimplementedDeploymentServiceServer) List(context.Context, *DeploymentListRequest) (*DeploymentListResponse, error)
- func (UnimplementedDeploymentServiceServer) Update(context.Context, *Deployment) (*Deployment, error)
- type UnsafeDeploymentServiceServer
Constants ¶
This section is empty.
Variables ¶
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.
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)
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 ¶
func (m DeploymentListRequestMultiError) Error() string
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 ¶
func (e DeploymentListRequestValidationError) Cause() error
Cause function returns cause value.
func (DeploymentListRequestValidationError) Error ¶
func (e DeploymentListRequestValidationError) Error() string
Error satisfies the builtin error interface
func (DeploymentListRequestValidationError) ErrorName ¶
func (e DeploymentListRequestValidationError) ErrorName() string
ErrorName returns error name.
func (DeploymentListRequestValidationError) Field ¶
func (e DeploymentListRequestValidationError) Field() string
Field function returns field value.
func (DeploymentListRequestValidationError) Key ¶
func (e DeploymentListRequestValidationError) Key() bool
Key function returns key value.
func (DeploymentListRequestValidationError) Reason ¶
func (e DeploymentListRequestValidationError) Reason() string
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 ¶
func (m DeploymentListResponseMultiError) Error() string
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 ¶
func (e DeploymentListResponseValidationError) Cause() error
Cause function returns cause value.
func (DeploymentListResponseValidationError) Error ¶
func (e DeploymentListResponseValidationError) Error() string
Error satisfies the builtin error interface
func (DeploymentListResponseValidationError) ErrorName ¶
func (e DeploymentListResponseValidationError) ErrorName() string
ErrorName returns error name.
func (DeploymentListResponseValidationError) Field ¶
func (e DeploymentListResponseValidationError) Field() string
Field function returns field value.
func (DeploymentListResponseValidationError) Key ¶
func (e DeploymentListResponseValidationError) Key() bool
Key function returns key value.
func (DeploymentListResponseValidationError) Reason ¶
func (e DeploymentListResponseValidationError) Reason() string
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.
func NewDeploymentServiceClient ¶
func NewDeploymentServiceClient(cc grpc.ClientConnInterface) DeploymentServiceClient
type DeploymentServiceServer ¶
type DeploymentServiceServer interface { List(context.Context, *DeploymentListRequest) (*DeploymentListResponse, error) Create(context.Context, *Deployment) (*Deployment, error) Update(context.Context, *Deployment) (*Deployment, error) Delete(context.Context, *kiae.IdRequest) (*emptypb.Empty, error) }
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 ¶
func (e DeploymentValidationError) Error() string
Error satisfies the builtin error interface
func (DeploymentValidationError) ErrorName ¶
func (e DeploymentValidationError) ErrorName() string
ErrorName returns error name.
func (DeploymentValidationError) Field ¶
func (e DeploymentValidationError) Field() string
Field function returns field value.
func (DeploymentValidationError) Key ¶
func (e DeploymentValidationError) Key() bool
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) Descriptor() protoreflect.EnumDescriptor
func (Deployment_Status) Enum ¶
func (x Deployment_Status) Enum() *Deployment_Status
func (Deployment_Status) EnumDescriptor
deprecated
func (Deployment_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use Deployment_Status.Descriptor instead.
func (Deployment_Status) Number ¶
func (x Deployment_Status) Number() protoreflect.EnumNumber
func (Deployment_Status) String ¶
func (x Deployment_Status) String() string
func (Deployment_Status) Type ¶
func (Deployment_Status) Type() protoreflect.EnumType
type UnimplementedDeploymentServiceServer ¶
type UnimplementedDeploymentServiceServer struct { }
UnimplementedDeploymentServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedDeploymentServiceServer) Create ¶
func (UnimplementedDeploymentServiceServer) Create(context.Context, *Deployment) (*Deployment, error)
func (UnimplementedDeploymentServiceServer) Update ¶
func (UnimplementedDeploymentServiceServer) Update(context.Context, *Deployment) (*Deployment, error)
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.