command

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Type_name = map[int32]string{
		0:  "COMMAND_TYPE_METADATA_SET",
		1:  "COMMAND_TYPE_METADATA_DELETE",
		2:  "COMMAND_TYPE_NOOP",
		3:  "COMMAND_TYPE_ENFORCE_REQUEST",
		4:  "COMMAND_TYPE_ADD_POLICIES",
		5:  "COMMAND_TYPE_REMOVE_POLICIES",
		6:  "COMMAND_TYPE_REMOVE_FILTERED_POLICY",
		7:  "COMMAND_TYPE_UPDATE_POLICY",
		8:  "COMMAND_TYPE_UPDATE_POLICIES",
		9:  "COMMAND_TYPE_CLEAR_POLICY",
		10: "COMMAND_TYPE_SET_MODEL",
		11: "COMMAND_TYPE_CREATE_NS",
	}
	Type_value = map[string]int32{
		"COMMAND_TYPE_METADATA_SET":           0,
		"COMMAND_TYPE_METADATA_DELETE":        1,
		"COMMAND_TYPE_NOOP":                   2,
		"COMMAND_TYPE_ENFORCE_REQUEST":        3,
		"COMMAND_TYPE_ADD_POLICIES":           4,
		"COMMAND_TYPE_REMOVE_POLICIES":        5,
		"COMMAND_TYPE_REMOVE_FILTERED_POLICY": 6,
		"COMMAND_TYPE_UPDATE_POLICY":          7,
		"COMMAND_TYPE_UPDATE_POLICIES":        8,
		"COMMAND_TYPE_CLEAR_POLICY":           9,
		"COMMAND_TYPE_SET_MODEL":              10,
		"COMMAND_TYPE_CREATE_NS":              11,
	}
)

Enum value maps for Type.

View Source
var (
	EnforcePayload_Level_name = map[int32]string{
		0: "QUERY_REQUEST_LEVEL_NONE",
		1: "QUERY_REQUEST_LEVEL_WEAK",
		2: "QUERY_REQUEST_LEVEL_STRONG",
	}
	EnforcePayload_Level_value = map[string]int32{
		"QUERY_REQUEST_LEVEL_NONE":   0,
		"QUERY_REQUEST_LEVEL_WEAK":   1,
		"QUERY_REQUEST_LEVEL_STRONG": 2,
	}
)

Enum value maps for EnforcePayload_Level.

View Source
var File_command_proto protoreflect.FileDescriptor

Functions

func ToStringArray

func ToStringArray(input []*StringArray) [][]string

Types

type AddPoliciesPayload

type AddPoliciesPayload struct {
	Sec   string         `protobuf:"bytes,1,opt,name=sec,proto3" json:"sec,omitempty"`
	PType string         `protobuf:"bytes,2,opt,name=pType,proto3" json:"pType,omitempty"`
	Rules []*StringArray `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

func (*AddPoliciesPayload) Descriptor deprecated

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

Deprecated: Use AddPoliciesPayload.ProtoReflect.Descriptor instead.

func (*AddPoliciesPayload) GetPType

func (x *AddPoliciesPayload) GetPType() string

func (*AddPoliciesPayload) GetRules

func (x *AddPoliciesPayload) GetRules() []*StringArray

func (*AddPoliciesPayload) GetSec

func (x *AddPoliciesPayload) GetSec() string

func (*AddPoliciesPayload) ProtoMessage

func (*AddPoliciesPayload) ProtoMessage()

func (*AddPoliciesPayload) ProtoReflect

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

func (*AddPoliciesPayload) Reset

func (x *AddPoliciesPayload) Reset()

func (*AddPoliciesPayload) String

func (x *AddPoliciesPayload) String() string

type Command

type Command struct {
	Type Type `protobuf:"varint,1,opt,name=type,proto3,enum=command.Type" json:"type,omitempty"`
	// namespace
	Ns string `protobuf:"bytes,2,opt,name=ns,proto3" json:"ns,omitempty"`
	// payload
	Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	// metadata
	Md         map[string]string `` /* 145-byte string literal not displayed */
	Compressed bool              `protobuf:"varint,5,opt,name=compressed,proto3" json:"compressed,omitempty"`
	// contains filtered or unexported fields
}

func (*Command) Descriptor deprecated

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

Deprecated: Use Command.ProtoReflect.Descriptor instead.

func (*Command) GetCompressed

func (x *Command) GetCompressed() bool

func (*Command) GetMd

func (x *Command) GetMd() map[string]string

func (*Command) GetNs

func (x *Command) GetNs() string

func (*Command) GetPayload

func (x *Command) GetPayload() []byte

func (*Command) GetType

func (x *Command) GetType() Type

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) ProtoReflect

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

func (*Command) Reset

func (x *Command) Reset()

func (*Command) String

func (x *Command) String() string

type EnforcePayload

type EnforcePayload struct {
	B         [][]byte             `protobuf:"bytes,1,rep,name=b,proto3" json:"b,omitempty"`
	Timings   bool                 `protobuf:"varint,2,opt,name=timings,proto3" json:"timings,omitempty"`
	Level     EnforcePayload_Level `protobuf:"varint,3,opt,name=level,proto3,enum=command.EnforcePayload_Level" json:"level,omitempty"`
	Freshness int64                `protobuf:"varint,4,opt,name=freshness,proto3" json:"freshness,omitempty"`
	// contains filtered or unexported fields
}

func (*EnforcePayload) Descriptor deprecated

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

Deprecated: Use EnforcePayload.ProtoReflect.Descriptor instead.

func (*EnforcePayload) GetB

func (x *EnforcePayload) GetB() [][]byte

func (*EnforcePayload) GetFreshness

func (x *EnforcePayload) GetFreshness() int64

func (*EnforcePayload) GetLevel

func (x *EnforcePayload) GetLevel() EnforcePayload_Level

func (*EnforcePayload) GetTimings

func (x *EnforcePayload) GetTimings() bool

func (*EnforcePayload) ProtoMessage

func (*EnforcePayload) ProtoMessage()

func (*EnforcePayload) ProtoReflect

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

func (*EnforcePayload) Reset

func (x *EnforcePayload) Reset()

func (*EnforcePayload) String

func (x *EnforcePayload) String() string

type EnforcePayload_Level

type EnforcePayload_Level int32
const (
	EnforcePayload_QUERY_REQUEST_LEVEL_NONE   EnforcePayload_Level = 0
	EnforcePayload_QUERY_REQUEST_LEVEL_WEAK   EnforcePayload_Level = 1
	EnforcePayload_QUERY_REQUEST_LEVEL_STRONG EnforcePayload_Level = 2
)

func (EnforcePayload_Level) Descriptor

func (EnforcePayload_Level) Enum

func (EnforcePayload_Level) EnumDescriptor deprecated

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

Deprecated: Use EnforcePayload_Level.Descriptor instead.

func (EnforcePayload_Level) Number

func (EnforcePayload_Level) String

func (x EnforcePayload_Level) String() string

func (EnforcePayload_Level) Type

type MetadataDelete

type MetadataDelete struct {
	RaftId string `protobuf:"bytes,1,opt,name=raft_id,json=raftId,proto3" json:"raft_id,omitempty"`
	// contains filtered or unexported fields
}

func (*MetadataDelete) Descriptor deprecated

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

Deprecated: Use MetadataDelete.ProtoReflect.Descriptor instead.

func (*MetadataDelete) GetRaftId

func (x *MetadataDelete) GetRaftId() string

func (*MetadataDelete) ProtoMessage

func (*MetadataDelete) ProtoMessage()

func (*MetadataDelete) ProtoReflect

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

func (*MetadataDelete) Reset

func (x *MetadataDelete) Reset()

func (*MetadataDelete) String

func (x *MetadataDelete) String() string

type MetadataSet

type MetadataSet struct {
	RaftId string            `protobuf:"bytes,1,opt,name=raft_id,json=raftId,proto3" json:"raft_id,omitempty"`
	Data   map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*MetadataSet) Descriptor deprecated

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

Deprecated: Use MetadataSet.ProtoReflect.Descriptor instead.

func (*MetadataSet) GetData

func (x *MetadataSet) GetData() map[string]string

func (*MetadataSet) GetRaftId

func (x *MetadataSet) GetRaftId() string

func (*MetadataSet) ProtoMessage

func (*MetadataSet) ProtoMessage()

func (*MetadataSet) ProtoReflect

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

func (*MetadataSet) Reset

func (x *MetadataSet) Reset()

func (*MetadataSet) String

func (x *MetadataSet) String() string

type Noop

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

func (*Noop) Descriptor deprecated

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

Deprecated: Use Noop.ProtoReflect.Descriptor instead.

func (*Noop) GetId

func (x *Noop) GetId() string

func (*Noop) ProtoMessage

func (*Noop) ProtoMessage()

func (*Noop) ProtoReflect

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

func (*Noop) Reset

func (x *Noop) Reset()

func (*Noop) String

func (x *Noop) String() string

type RemoveFilteredPolicyPayload

type RemoveFilteredPolicyPayload struct {
	Sec         string   `protobuf:"bytes,1,opt,name=sec,proto3" json:"sec,omitempty"`
	PType       string   `protobuf:"bytes,2,opt,name=pType,proto3" json:"pType,omitempty"`
	FieldIndex  int32    `protobuf:"varint,3,opt,name=fieldIndex,proto3" json:"fieldIndex,omitempty"`
	FieldValues []string `protobuf:"bytes,4,rep,name=fieldValues,proto3" json:"fieldValues,omitempty"`
	// contains filtered or unexported fields
}

func (*RemoveFilteredPolicyPayload) Descriptor deprecated

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

Deprecated: Use RemoveFilteredPolicyPayload.ProtoReflect.Descriptor instead.

func (*RemoveFilteredPolicyPayload) GetFieldIndex

func (x *RemoveFilteredPolicyPayload) GetFieldIndex() int32

func (*RemoveFilteredPolicyPayload) GetFieldValues

func (x *RemoveFilteredPolicyPayload) GetFieldValues() []string

func (*RemoveFilteredPolicyPayload) GetPType

func (x *RemoveFilteredPolicyPayload) GetPType() string

func (*RemoveFilteredPolicyPayload) GetSec

func (x *RemoveFilteredPolicyPayload) GetSec() string

func (*RemoveFilteredPolicyPayload) ProtoMessage

func (*RemoveFilteredPolicyPayload) ProtoMessage()

func (*RemoveFilteredPolicyPayload) ProtoReflect

func (*RemoveFilteredPolicyPayload) Reset

func (x *RemoveFilteredPolicyPayload) Reset()

func (*RemoveFilteredPolicyPayload) String

func (x *RemoveFilteredPolicyPayload) String() string

type RemovePoliciesPayload

type RemovePoliciesPayload struct {
	Sec   string         `protobuf:"bytes,1,opt,name=sec,proto3" json:"sec,omitempty"`
	PType string         `protobuf:"bytes,2,opt,name=pType,proto3" json:"pType,omitempty"`
	Rules []*StringArray `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

func (*RemovePoliciesPayload) Descriptor deprecated

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

Deprecated: Use RemovePoliciesPayload.ProtoReflect.Descriptor instead.

func (*RemovePoliciesPayload) GetPType

func (x *RemovePoliciesPayload) GetPType() string

func (*RemovePoliciesPayload) GetRules

func (x *RemovePoliciesPayload) GetRules() []*StringArray

func (*RemovePoliciesPayload) GetSec

func (x *RemovePoliciesPayload) GetSec() string

func (*RemovePoliciesPayload) ProtoMessage

func (*RemovePoliciesPayload) ProtoMessage()

func (*RemovePoliciesPayload) ProtoReflect

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

func (*RemovePoliciesPayload) Reset

func (x *RemovePoliciesPayload) Reset()

func (*RemovePoliciesPayload) String

func (x *RemovePoliciesPayload) String() string

type SetModelFromString

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

func (*SetModelFromString) Descriptor deprecated

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

Deprecated: Use SetModelFromString.ProtoReflect.Descriptor instead.

func (*SetModelFromString) GetText

func (x *SetModelFromString) GetText() string

func (*SetModelFromString) ProtoMessage

func (*SetModelFromString) ProtoMessage()

func (*SetModelFromString) ProtoReflect

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

func (*SetModelFromString) Reset

func (x *SetModelFromString) Reset()

func (*SetModelFromString) String

func (x *SetModelFromString) String() string

type StringArray

type StringArray struct {
	S []string `protobuf:"bytes,1,rep,name=s,proto3" json:"s,omitempty"`
	// contains filtered or unexported fields
}

func NewStringArray

func NewStringArray(input [][]string) []*StringArray

func (*StringArray) Descriptor deprecated

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

Deprecated: Use StringArray.ProtoReflect.Descriptor instead.

func (*StringArray) GetS

func (x *StringArray) GetS() []string

func (*StringArray) ProtoMessage

func (*StringArray) ProtoMessage()

func (*StringArray) ProtoReflect

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

func (*StringArray) Reset

func (x *StringArray) Reset()

func (*StringArray) String

func (x *StringArray) String() string

type Type

type Type int32
const (
	Type_COMMAND_TYPE_METADATA_SET           Type = 0
	Type_COMMAND_TYPE_METADATA_DELETE        Type = 1
	Type_COMMAND_TYPE_NOOP                   Type = 2
	Type_COMMAND_TYPE_ENFORCE_REQUEST        Type = 3
	Type_COMMAND_TYPE_ADD_POLICIES           Type = 4
	Type_COMMAND_TYPE_REMOVE_POLICIES        Type = 5
	Type_COMMAND_TYPE_REMOVE_FILTERED_POLICY Type = 6
	Type_COMMAND_TYPE_UPDATE_POLICY          Type = 7
	Type_COMMAND_TYPE_UPDATE_POLICIES        Type = 8
	Type_COMMAND_TYPE_CLEAR_POLICY           Type = 9
	Type_COMMAND_TYPE_SET_MODEL              Type = 10
	Type_COMMAND_TYPE_CREATE_NS              Type = 11
)

func (Type) Descriptor

func (Type) Descriptor() protoreflect.EnumDescriptor

func (Type) Enum

func (x Type) Enum() *Type

func (Type) EnumDescriptor deprecated

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

Deprecated: Use Type.Descriptor instead.

func (Type) Number

func (x Type) Number() protoreflect.EnumNumber

func (Type) String

func (x Type) String() string

func (Type) Type

func (Type) Type() protoreflect.EnumType

type UpdatePoliciesPayload

type UpdatePoliciesPayload struct {
	Sec      string         `protobuf:"bytes,1,opt,name=sec,proto3" json:"sec,omitempty"`
	PType    string         `protobuf:"bytes,2,opt,name=pType,proto3" json:"pType,omitempty"`
	NewRules []*StringArray `protobuf:"bytes,3,rep,name=newRules,proto3" json:"newRules,omitempty"`
	OldRules []*StringArray `protobuf:"bytes,4,rep,name=oldRules,proto3" json:"oldRules,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdatePoliciesPayload) Descriptor deprecated

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

Deprecated: Use UpdatePoliciesPayload.ProtoReflect.Descriptor instead.

func (*UpdatePoliciesPayload) GetNewRules

func (x *UpdatePoliciesPayload) GetNewRules() []*StringArray

func (*UpdatePoliciesPayload) GetOldRules

func (x *UpdatePoliciesPayload) GetOldRules() []*StringArray

func (*UpdatePoliciesPayload) GetPType

func (x *UpdatePoliciesPayload) GetPType() string

func (*UpdatePoliciesPayload) GetSec

func (x *UpdatePoliciesPayload) GetSec() string

func (*UpdatePoliciesPayload) ProtoMessage

func (*UpdatePoliciesPayload) ProtoMessage()

func (*UpdatePoliciesPayload) ProtoReflect

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

func (*UpdatePoliciesPayload) Reset

func (x *UpdatePoliciesPayload) Reset()

func (*UpdatePoliciesPayload) String

func (x *UpdatePoliciesPayload) String() string

type UpdatePolicyPayload

type UpdatePolicyPayload struct {
	Sec     string   `protobuf:"bytes,1,opt,name=sec,proto3" json:"sec,omitempty"`
	PType   string   `protobuf:"bytes,2,opt,name=pType,proto3" json:"pType,omitempty"`
	NewRule []string `protobuf:"bytes,3,rep,name=newRule,proto3" json:"newRule,omitempty"`
	OldRule []string `protobuf:"bytes,4,rep,name=oldRule,proto3" json:"oldRule,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdatePolicyPayload) Descriptor deprecated

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

Deprecated: Use UpdatePolicyPayload.ProtoReflect.Descriptor instead.

func (*UpdatePolicyPayload) GetNewRule

func (x *UpdatePolicyPayload) GetNewRule() []string

func (*UpdatePolicyPayload) GetOldRule

func (x *UpdatePolicyPayload) GetOldRule() []string

func (*UpdatePolicyPayload) GetPType

func (x *UpdatePolicyPayload) GetPType() string

func (*UpdatePolicyPayload) GetSec

func (x *UpdatePolicyPayload) GetSec() string

func (*UpdatePolicyPayload) ProtoMessage

func (*UpdatePolicyPayload) ProtoMessage()

func (*UpdatePolicyPayload) ProtoReflect

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

func (*UpdatePolicyPayload) Reset

func (x *UpdatePolicyPayload) Reset()

func (*UpdatePolicyPayload) String

func (x *UpdatePolicyPayload) String() string

Jump to

Keyboard shortcuts

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