object

package
v0.3.42 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 31 Imported by: 0

Documentation

Overview

Package object is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ObjectManager_QueryObjects_FullMethodName = "/prodvana.object.ObjectManager/QueryObjects"
	ObjectManager_GetLabels_FullMethodName    = "/prodvana.object.ObjectManager/GetLabels"
)

Variables

View Source
var (
	ObjectType_name = map[int32]string{
		0: "UNKNOWN",
		1: "RUNTIME",
		2: "APPLICATION",
		3: "SERVICE",
		4: "RELEASE_CHANNEL",
		5: "PROTECTION",
		6: "DEPLOYMENT",
		7: "RELEASE",
	}
	ObjectType_value = map[string]int32{
		"UNKNOWN":         0,
		"RUNTIME":         1,
		"APPLICATION":     2,
		"SERVICE":         3,
		"RELEASE_CHANNEL": 4,
		"PROTECTION":      5,
		"DEPLOYMENT":      6,
		"RELEASE":         7,
	}
)

Enum value maps for ObjectType.

View Source
var File_prodvana_object_manager_proto protoreflect.FileDescriptor
View Source
var File_prodvana_object_meta_proto protoreflect.FileDescriptor
View Source
var ObjectManager_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "prodvana.object.ObjectManager",
	HandlerType: (*ObjectManagerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "QueryObjects",
			Handler:    _ObjectManager_QueryObjects_Handler,
		},
		{
			MethodName: "GetLabels",
			Handler:    _ObjectManager_GetLabels_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "prodvana/object/manager.proto",
}

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

Functions

func RegisterObjectManagerHandler added in v0.2.10

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

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

func RegisterObjectManagerHandlerClient added in v0.2.10

func RegisterObjectManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ObjectManagerClient) error

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

func RegisterObjectManagerHandlerFromEndpoint added in v0.2.10

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

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

func RegisterObjectManagerHandlerServer added in v0.2.10

func RegisterObjectManagerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ObjectManagerServer) error

RegisterObjectManagerHandlerServer registers the http handlers for service ObjectManager to "mux". UnaryRPC :call ObjectManagerServer 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 RegisterObjectManagerHandlerFromEndpoint instead.

func RegisterObjectManagerServer added in v0.2.10

func RegisterObjectManagerServer(s grpc.ServiceRegistrar, srv ObjectManagerServer)

Types

type GetLabelsReq added in v0.2.10

type GetLabelsReq struct {
	Type ObjectType `protobuf:"varint,1,opt,name=type,proto3,enum=prodvana.object.ObjectType" json:"type,omitempty"`
	Id   string     `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetLabelsReq) Descriptor deprecated added in v0.2.10

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

Deprecated: Use GetLabelsReq.ProtoReflect.Descriptor instead.

func (*GetLabelsReq) GetId added in v0.2.13

func (x *GetLabelsReq) GetId() string

func (*GetLabelsReq) GetType added in v0.2.10

func (x *GetLabelsReq) GetType() ObjectType

func (*GetLabelsReq) ProtoMessage added in v0.2.10

func (*GetLabelsReq) ProtoMessage()

func (*GetLabelsReq) ProtoReflect added in v0.2.10

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

func (*GetLabelsReq) Reset added in v0.2.10

func (x *GetLabelsReq) Reset()

func (*GetLabelsReq) String added in v0.2.10

func (x *GetLabelsReq) String() string

func (*GetLabelsReq) Validate added in v0.2.10

func (m *GetLabelsReq) Validate() error

Validate checks the field values on GetLabelsReq 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 (*GetLabelsReq) ValidateAll added in v0.2.10

func (m *GetLabelsReq) ValidateAll() error

ValidateAll checks the field values on GetLabelsReq 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 GetLabelsReqMultiError, or nil if none found.

type GetLabelsReqMultiError added in v0.2.10

type GetLabelsReqMultiError []error

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

func (GetLabelsReqMultiError) AllErrors added in v0.2.10

func (m GetLabelsReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetLabelsReqMultiError) Error added in v0.2.10

func (m GetLabelsReqMultiError) Error() string

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

type GetLabelsReqValidationError added in v0.2.10

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

GetLabelsReqValidationError is the validation error returned by GetLabelsReq.Validate if the designated constraints aren't met.

func (GetLabelsReqValidationError) Cause added in v0.2.10

Cause function returns cause value.

func (GetLabelsReqValidationError) Error added in v0.2.10

Error satisfies the builtin error interface

func (GetLabelsReqValidationError) ErrorName added in v0.2.10

func (e GetLabelsReqValidationError) ErrorName() string

ErrorName returns error name.

func (GetLabelsReqValidationError) Field added in v0.2.10

Field function returns field value.

func (GetLabelsReqValidationError) Key added in v0.2.10

Key function returns key value.

func (GetLabelsReqValidationError) Reason added in v0.2.10

Reason function returns reason value.

type GetLabelsResp added in v0.2.10

type GetLabelsResp struct {
	Labels []*labels.LabelDefinition `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty"`
	// contains filtered or unexported fields
}

func (*GetLabelsResp) Descriptor deprecated added in v0.2.10

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

Deprecated: Use GetLabelsResp.ProtoReflect.Descriptor instead.

func (*GetLabelsResp) GetLabels added in v0.2.10

func (x *GetLabelsResp) GetLabels() []*labels.LabelDefinition

func (*GetLabelsResp) ProtoMessage added in v0.2.10

func (*GetLabelsResp) ProtoMessage()

func (*GetLabelsResp) ProtoReflect added in v0.2.10

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

func (*GetLabelsResp) Reset added in v0.2.10

func (x *GetLabelsResp) Reset()

func (*GetLabelsResp) String added in v0.2.10

func (x *GetLabelsResp) String() string

func (*GetLabelsResp) Validate added in v0.2.10

func (m *GetLabelsResp) Validate() error

Validate checks the field values on GetLabelsResp 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 (*GetLabelsResp) ValidateAll added in v0.2.10

func (m *GetLabelsResp) ValidateAll() error

ValidateAll checks the field values on GetLabelsResp 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 GetLabelsRespMultiError, or nil if none found.

type GetLabelsRespMultiError added in v0.2.10

type GetLabelsRespMultiError []error

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

func (GetLabelsRespMultiError) AllErrors added in v0.2.10

func (m GetLabelsRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetLabelsRespMultiError) Error added in v0.2.10

func (m GetLabelsRespMultiError) Error() string

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

type GetLabelsRespValidationError added in v0.2.10

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

GetLabelsRespValidationError is the validation error returned by GetLabelsResp.Validate if the designated constraints aren't met.

func (GetLabelsRespValidationError) Cause added in v0.2.10

Cause function returns cause value.

func (GetLabelsRespValidationError) Error added in v0.2.10

Error satisfies the builtin error interface

func (GetLabelsRespValidationError) ErrorName added in v0.2.10

func (e GetLabelsRespValidationError) ErrorName() string

ErrorName returns error name.

func (GetLabelsRespValidationError) Field added in v0.2.10

Field function returns field value.

func (GetLabelsRespValidationError) Key added in v0.2.10

Key function returns key value.

func (GetLabelsRespValidationError) Reason added in v0.2.10

Reason function returns reason value.

type ObjectManagerClient added in v0.2.10

type ObjectManagerClient interface {
	QueryObjects(ctx context.Context, in *QueryObjectReq, opts ...grpc.CallOption) (*QueryObjectResp, error)
	GetLabels(ctx context.Context, in *GetLabelsReq, opts ...grpc.CallOption) (*GetLabelsResp, error)
}

ObjectManagerClient is the client API for ObjectManager 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 NewObjectManagerClient added in v0.2.10

func NewObjectManagerClient(cc grpc.ClientConnInterface) ObjectManagerClient

type ObjectManagerServer added in v0.2.10

type ObjectManagerServer interface {
	QueryObjects(context.Context, *QueryObjectReq) (*QueryObjectResp, error)
	GetLabels(context.Context, *GetLabelsReq) (*GetLabelsResp, error)
	// contains filtered or unexported methods
}

ObjectManagerServer is the server API for ObjectManager service. All implementations must embed UnimplementedObjectManagerServer for forward compatibility

type ObjectMeta

type ObjectMeta struct {
	Id      string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name    string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// only set for objects who has configurations with parametrization support. At the time of this writing, only services.
	ConfigVersion  string                  `protobuf:"bytes,4,opt,name=config_version,json=configVersion,proto3" json:"config_version,omitempty"`
	Source         version.Source          `protobuf:"varint,5,opt,name=source,proto3,enum=prodvana.version.Source" json:"source,omitempty"`
	SourceMetadata *version.SourceMetadata `protobuf:"bytes,6,opt,name=source_metadata,json=sourceMetadata,proto3" json:"source_metadata,omitempty"`
	Type           ObjectType              `protobuf:"varint,7,opt,name=type,proto3,enum=prodvana.object.ObjectType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*ObjectMeta) Descriptor deprecated

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

Deprecated: Use ObjectMeta.ProtoReflect.Descriptor instead.

func (*ObjectMeta) GetConfigVersion

func (x *ObjectMeta) GetConfigVersion() string

func (*ObjectMeta) GetId

func (x *ObjectMeta) GetId() string

func (*ObjectMeta) GetName

func (x *ObjectMeta) GetName() string

func (*ObjectMeta) GetSource

func (x *ObjectMeta) GetSource() version.Source

func (*ObjectMeta) GetSourceMetadata

func (x *ObjectMeta) GetSourceMetadata() *version.SourceMetadata

func (*ObjectMeta) GetType added in v0.2.10

func (x *ObjectMeta) GetType() ObjectType

func (*ObjectMeta) GetVersion

func (x *ObjectMeta) GetVersion() string

func (*ObjectMeta) ProtoMessage

func (*ObjectMeta) ProtoMessage()

func (*ObjectMeta) ProtoReflect

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

func (*ObjectMeta) Reset

func (x *ObjectMeta) Reset()

func (*ObjectMeta) String

func (x *ObjectMeta) String() string

func (*ObjectMeta) Validate

func (m *ObjectMeta) Validate() error

Validate checks the field values on ObjectMeta 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 (*ObjectMeta) ValidateAll

func (m *ObjectMeta) ValidateAll() error

ValidateAll checks the field values on ObjectMeta 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 ObjectMetaMultiError, or nil if none found.

type ObjectMetaMultiError

type ObjectMetaMultiError []error

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

func (ObjectMetaMultiError) AllErrors

func (m ObjectMetaMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ObjectMetaMultiError) Error

func (m ObjectMetaMultiError) Error() string

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

type ObjectMetaValidationError

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

ObjectMetaValidationError is the validation error returned by ObjectMeta.Validate if the designated constraints aren't met.

func (ObjectMetaValidationError) Cause

func (e ObjectMetaValidationError) Cause() error

Cause function returns cause value.

func (ObjectMetaValidationError) Error

Error satisfies the builtin error interface

func (ObjectMetaValidationError) ErrorName

func (e ObjectMetaValidationError) ErrorName() string

ErrorName returns error name.

func (ObjectMetaValidationError) Field

Field function returns field value.

func (ObjectMetaValidationError) Key

Key function returns key value.

func (ObjectMetaValidationError) Reason

func (e ObjectMetaValidationError) Reason() string

Reason function returns reason value.

type ObjectType added in v0.2.10

type ObjectType int32
const (
	ObjectType_UNKNOWN         ObjectType = 0
	ObjectType_RUNTIME         ObjectType = 1
	ObjectType_APPLICATION     ObjectType = 2
	ObjectType_SERVICE         ObjectType = 3
	ObjectType_RELEASE_CHANNEL ObjectType = 4
	ObjectType_PROTECTION      ObjectType = 5
	ObjectType_DEPLOYMENT      ObjectType = 6
	ObjectType_RELEASE         ObjectType = 7
)

func (ObjectType) Descriptor added in v0.2.10

func (ObjectType) Descriptor() protoreflect.EnumDescriptor

func (ObjectType) Enum added in v0.2.10

func (x ObjectType) Enum() *ObjectType

func (ObjectType) EnumDescriptor deprecated added in v0.2.10

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

Deprecated: Use ObjectType.Descriptor instead.

func (ObjectType) Number added in v0.2.10

func (x ObjectType) Number() protoreflect.EnumNumber

func (ObjectType) String added in v0.2.10

func (x ObjectType) String() string

func (ObjectType) Type added in v0.2.10

type QueryObjectReq added in v0.2.10

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

func (*QueryObjectReq) Descriptor deprecated added in v0.2.10

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

Deprecated: Use QueryObjectReq.ProtoReflect.Descriptor instead.

func (*QueryObjectReq) GetQuery added in v0.2.10

func (x *QueryObjectReq) GetQuery() string

func (*QueryObjectReq) ProtoMessage added in v0.2.10

func (*QueryObjectReq) ProtoMessage()

func (*QueryObjectReq) ProtoReflect added in v0.2.10

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

func (*QueryObjectReq) Reset added in v0.2.10

func (x *QueryObjectReq) Reset()

func (*QueryObjectReq) String added in v0.2.10

func (x *QueryObjectReq) String() string

func (*QueryObjectReq) Validate added in v0.2.10

func (m *QueryObjectReq) Validate() error

Validate checks the field values on QueryObjectReq 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 (*QueryObjectReq) ValidateAll added in v0.2.10

func (m *QueryObjectReq) ValidateAll() error

ValidateAll checks the field values on QueryObjectReq 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 QueryObjectReqMultiError, or nil if none found.

type QueryObjectReqMultiError added in v0.2.10

type QueryObjectReqMultiError []error

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

func (QueryObjectReqMultiError) AllErrors added in v0.2.10

func (m QueryObjectReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (QueryObjectReqMultiError) Error added in v0.2.10

func (m QueryObjectReqMultiError) Error() string

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

type QueryObjectReqValidationError added in v0.2.10

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

QueryObjectReqValidationError is the validation error returned by QueryObjectReq.Validate if the designated constraints aren't met.

func (QueryObjectReqValidationError) Cause added in v0.2.10

Cause function returns cause value.

func (QueryObjectReqValidationError) Error added in v0.2.10

Error satisfies the builtin error interface

func (QueryObjectReqValidationError) ErrorName added in v0.2.10

func (e QueryObjectReqValidationError) ErrorName() string

ErrorName returns error name.

func (QueryObjectReqValidationError) Field added in v0.2.10

Field function returns field value.

func (QueryObjectReqValidationError) Key added in v0.2.10

Key function returns key value.

func (QueryObjectReqValidationError) Reason added in v0.2.10

Reason function returns reason value.

type QueryObjectResp added in v0.2.10

type QueryObjectResp struct {
	Objects []*ObjectMeta `protobuf:"bytes,1,rep,name=objects,proto3" json:"objects,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryObjectResp) Descriptor deprecated added in v0.2.10

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

Deprecated: Use QueryObjectResp.ProtoReflect.Descriptor instead.

func (*QueryObjectResp) GetObjects added in v0.2.10

func (x *QueryObjectResp) GetObjects() []*ObjectMeta

func (*QueryObjectResp) ProtoMessage added in v0.2.10

func (*QueryObjectResp) ProtoMessage()

func (*QueryObjectResp) ProtoReflect added in v0.2.10

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

func (*QueryObjectResp) Reset added in v0.2.10

func (x *QueryObjectResp) Reset()

func (*QueryObjectResp) String added in v0.2.10

func (x *QueryObjectResp) String() string

func (*QueryObjectResp) Validate added in v0.2.10

func (m *QueryObjectResp) Validate() error

Validate checks the field values on QueryObjectResp 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 (*QueryObjectResp) ValidateAll added in v0.2.10

func (m *QueryObjectResp) ValidateAll() error

ValidateAll checks the field values on QueryObjectResp 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 QueryObjectRespMultiError, or nil if none found.

type QueryObjectRespMultiError added in v0.2.10

type QueryObjectRespMultiError []error

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

func (QueryObjectRespMultiError) AllErrors added in v0.2.10

func (m QueryObjectRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (QueryObjectRespMultiError) Error added in v0.2.10

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

type QueryObjectRespValidationError added in v0.2.10

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

QueryObjectRespValidationError is the validation error returned by QueryObjectResp.Validate if the designated constraints aren't met.

func (QueryObjectRespValidationError) Cause added in v0.2.10

Cause function returns cause value.

func (QueryObjectRespValidationError) Error added in v0.2.10

Error satisfies the builtin error interface

func (QueryObjectRespValidationError) ErrorName added in v0.2.10

func (e QueryObjectRespValidationError) ErrorName() string

ErrorName returns error name.

func (QueryObjectRespValidationError) Field added in v0.2.10

Field function returns field value.

func (QueryObjectRespValidationError) Key added in v0.2.10

Key function returns key value.

func (QueryObjectRespValidationError) Reason added in v0.2.10

Reason function returns reason value.

type UnimplementedObjectManagerServer added in v0.2.10

type UnimplementedObjectManagerServer struct {
}

UnimplementedObjectManagerServer must be embedded to have forward compatible implementations.

func (UnimplementedObjectManagerServer) GetLabels added in v0.2.10

func (UnimplementedObjectManagerServer) QueryObjects added in v0.2.10

type UnsafeObjectManagerServer added in v0.2.10

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

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

Jump to

Keyboard shortcuts

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