mock_interfaces

package
v2.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "mock"

ModuleName is the module name used for models of the mock ifplugin.

Variables

View Source
var Interface_Type_name = map[int32]string{
	0: "UNDEFINED_TYPE",
	1: "LOOPBACK",
	2: "TAP",
}
View Source
var Interface_Type_value = map[string]int32{
	"UNDEFINED_TYPE": 0,
	"LOOPBACK":       1,
	"TAP":            2,
}
View Source
var (
	ModelInterface = models.Register(&Interface{}, models.Spec{
		Module:  ModuleName,
		Version: "v1",
		Type:    "interfaces",
	})
)

Functions

func InterfaceKey

func InterfaceKey(name string) string

InterfaceKey returns the key used in NB DB to store the configuration of the given mock interface.

Types

type Interface

type Interface struct {
	Name                 string         `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type                 Interface_Type `protobuf:"varint,2,opt,name=type,proto3,enum=mock.interfaces.Interface_Type" json:"type,omitempty"`
	Enabled              bool           `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"`
	PhysAddress          string         `protobuf:"bytes,4,opt,name=phys_address,json=physAddress,proto3" json:"phys_address,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*Interface) Descriptor

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

func (*Interface) GetEnabled

func (m *Interface) GetEnabled() bool

func (*Interface) GetName

func (m *Interface) GetName() string

func (*Interface) GetPhysAddress

func (m *Interface) GetPhysAddress() string

func (*Interface) GetType

func (m *Interface) GetType() Interface_Type

func (*Interface) ProtoMessage

func (*Interface) ProtoMessage()

func (*Interface) Reset

func (m *Interface) Reset()

func (*Interface) String

func (m *Interface) String() string

func (*Interface) XXX_DiscardUnknown

func (m *Interface) XXX_DiscardUnknown()

func (*Interface) XXX_Marshal

func (m *Interface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Interface) XXX_Merge

func (dst *Interface) XXX_Merge(src proto.Message)

func (*Interface) XXX_MessageName

func (*Interface) XXX_MessageName() string

func (*Interface) XXX_Size

func (m *Interface) XXX_Size() int

func (*Interface) XXX_Unmarshal

func (m *Interface) XXX_Unmarshal(b []byte) error

type Interface_Type

type Interface_Type int32
const (
	Interface_UNDEFINED_TYPE Interface_Type = 0
	Interface_LOOPBACK       Interface_Type = 1
	Interface_TAP            Interface_Type = 2
)

func (Interface_Type) EnumDescriptor

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

func (Interface_Type) String

func (x Interface_Type) String() string

Jump to

Keyboard shortcuts

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