expander

package
v0.0.0-...-5978c11 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Expander_Validate_FullMethodName = "/expander_grpc.Expander/Validate"
	Expander_Evaluate_FullMethodName = "/expander_grpc.Expander/Evaluate"
)

Variables

View Source
var (
	Status_name = map[int32]string{
		0: "SUCCESS",
		1: "VALIDATE_FAILED",
		2: "EVALUATE_FAILED",
		3: "EVALUATE_WAIT",
		4: "UNEXPECTED_ERROR",
	}
	Status_value = map[string]int32{
		"SUCCESS":          0,
		"VALIDATE_FAILED":  1,
		"EVALUATE_FAILED":  2,
		"EVALUATE_WAIT":    3,
		"UNEXPECTED_ERROR": 4,
	}
)

Enum value maps for Status.

View Source
var (
	ResultType_name = map[int32]string{
		0: "UNKNOWN",
		1: "MANIFESTS",
		2: "VALUES",
	}
	ResultType_value = map[string]int32{
		"UNKNOWN":   0,
		"MANIFESTS": 1,
		"VALUES":    2,
	}
)

Enum value maps for ResultType.

View Source
var Expander_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "expander_grpc.Expander",
	HandlerType: (*ExpanderServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Validate",
			Handler:    _Expander_Validate_Handler,
		},
		{
			MethodName: "Evaluate",
			Handler:    _Expander_Evaluate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/expander.proto",
}

Expander_ServiceDesc is the grpc.ServiceDesc for Expander 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_proto_expander_proto protoreflect.FileDescriptor

Functions

func RegisterExpanderServer

func RegisterExpanderServer(s grpc.ServiceRegistrar, srv ExpanderServer)

Types

type Error

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

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type EvaluateRequest

type EvaluateRequest struct {
	Config   []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	Context  []byte `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"`
	Facade   []byte `protobuf:"bytes,3,opt,name=facade,proto3" json:"facade,omitempty"`
	Value    []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	Resource string `protobuf:"bytes,5,opt,name=resource,proto3" json:"resource,omitempty"`
	// contains filtered or unexported fields
}

func (*EvaluateRequest) Descriptor deprecated

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

Deprecated: Use EvaluateRequest.ProtoReflect.Descriptor instead.

func (*EvaluateRequest) GetConfig

func (x *EvaluateRequest) GetConfig() []byte

func (*EvaluateRequest) GetContext

func (x *EvaluateRequest) GetContext() []byte

func (*EvaluateRequest) GetFacade

func (x *EvaluateRequest) GetFacade() []byte

func (*EvaluateRequest) GetResource

func (x *EvaluateRequest) GetResource() string

func (*EvaluateRequest) GetValue

func (x *EvaluateRequest) GetValue() []byte

func (*EvaluateRequest) ProtoMessage

func (*EvaluateRequest) ProtoMessage()

func (*EvaluateRequest) ProtoReflect

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

func (*EvaluateRequest) Reset

func (x *EvaluateRequest) Reset()

func (*EvaluateRequest) String

func (x *EvaluateRequest) String() string

type EvaluateResult

type EvaluateResult struct {
	Status    Status     `protobuf:"varint,1,opt,name=status,proto3,enum=expander_grpc.Status" json:"status,omitempty"`
	Error     *Error     `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	Type      ResultType `protobuf:"varint,3,opt,name=type,proto3,enum=expander_grpc.ResultType" json:"type,omitempty"`
	Manifests []byte     `protobuf:"bytes,4,opt,name=manifests,proto3" json:"manifests,omitempty"`
	Values    []byte     `protobuf:"bytes,5,opt,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

func (*EvaluateResult) Descriptor deprecated

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

Deprecated: Use EvaluateResult.ProtoReflect.Descriptor instead.

func (*EvaluateResult) GetError

func (x *EvaluateResult) GetError() *Error

func (*EvaluateResult) GetManifests

func (x *EvaluateResult) GetManifests() []byte

func (*EvaluateResult) GetStatus

func (x *EvaluateResult) GetStatus() Status

func (*EvaluateResult) GetType

func (x *EvaluateResult) GetType() ResultType

func (*EvaluateResult) GetValues

func (x *EvaluateResult) GetValues() []byte

func (*EvaluateResult) ProtoMessage

func (*EvaluateResult) ProtoMessage()

func (*EvaluateResult) ProtoReflect

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

func (*EvaluateResult) Reset

func (x *EvaluateResult) Reset()

func (*EvaluateResult) String

func (x *EvaluateResult) String() string

type ExpanderClient

type ExpanderClient interface {
	// Verify the expander config/template
	Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResult, error)
	// Evaluate the expander config in context of inputs and return manifests
	Evaluate(ctx context.Context, in *EvaluateRequest, opts ...grpc.CallOption) (*EvaluateResult, error)
}

ExpanderClient is the client API for Expander 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 NewExpanderClient

func NewExpanderClient(cc grpc.ClientConnInterface) ExpanderClient

type ExpanderServer

type ExpanderServer interface {
	// Verify the expander config/template
	Validate(context.Context, *ValidateRequest) (*ValidateResult, error)
	// Evaluate the expander config in context of inputs and return manifests
	Evaluate(context.Context, *EvaluateRequest) (*EvaluateResult, error)
	// contains filtered or unexported methods
}

ExpanderServer is the server API for Expander service. All implementations must embed UnimplementedExpanderServer for forward compatibility

type ResultType

type ResultType int32
const (
	ResultType_UNKNOWN   ResultType = 0
	ResultType_MANIFESTS ResultType = 1
	ResultType_VALUES    ResultType = 2
)

func (ResultType) Descriptor

func (ResultType) Descriptor() protoreflect.EnumDescriptor

func (ResultType) Enum

func (x ResultType) Enum() *ResultType

func (ResultType) EnumDescriptor deprecated

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

Deprecated: Use ResultType.Descriptor instead.

func (ResultType) Number

func (x ResultType) Number() protoreflect.EnumNumber

func (ResultType) String

func (x ResultType) String() string

func (ResultType) Type

type Status

type Status int32
const (
	Status_SUCCESS          Status = 0
	Status_VALIDATE_FAILED  Status = 1
	Status_EVALUATE_FAILED  Status = 2
	Status_EVALUATE_WAIT    Status = 3
	Status_UNEXPECTED_ERROR Status = 4
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

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

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

type UnimplementedExpanderServer

type UnimplementedExpanderServer struct {
}

UnimplementedExpanderServer must be embedded to have forward compatible implementations.

func (UnimplementedExpanderServer) Evaluate

func (UnimplementedExpanderServer) Validate

type UnsafeExpanderServer

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

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

type ValidateRequest

type ValidateRequest struct {
	Config   []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	Context  []byte `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"`
	Facade   []byte `protobuf:"bytes,3,opt,name=facade,proto3" json:"facade,omitempty"`
	Value    []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	Resource string `protobuf:"bytes,5,opt,name=resource,proto3" json:"resource,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidateRequest) Descriptor deprecated

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

Deprecated: Use ValidateRequest.ProtoReflect.Descriptor instead.

func (*ValidateRequest) GetConfig

func (x *ValidateRequest) GetConfig() []byte

func (*ValidateRequest) GetContext

func (x *ValidateRequest) GetContext() []byte

func (*ValidateRequest) GetFacade

func (x *ValidateRequest) GetFacade() []byte

func (*ValidateRequest) GetResource

func (x *ValidateRequest) GetResource() string

func (*ValidateRequest) GetValue

func (x *ValidateRequest) GetValue() []byte

func (*ValidateRequest) ProtoMessage

func (*ValidateRequest) ProtoMessage()

func (*ValidateRequest) ProtoReflect

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

func (*ValidateRequest) Reset

func (x *ValidateRequest) Reset()

func (*ValidateRequest) String

func (x *ValidateRequest) String() string

type ValidateResult

type ValidateResult struct {
	Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=expander_grpc.Status" json:"status,omitempty"`
	Error  *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidateResult) Descriptor deprecated

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

Deprecated: Use ValidateResult.ProtoReflect.Descriptor instead.

func (*ValidateResult) GetError

func (x *ValidateResult) GetError() *Error

func (*ValidateResult) GetStatus

func (x *ValidateResult) GetStatus() Status

func (*ValidateResult) ProtoMessage

func (*ValidateResult) ProtoMessage()

func (*ValidateResult) ProtoReflect

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

func (*ValidateResult) Reset

func (x *ValidateResult) Reset()

func (*ValidateResult) String

func (x *ValidateResult) String() string

Jump to

Keyboard shortcuts

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