iodin

package
v0.0.0-...-ee5e8e7 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Unlicense Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Request_Command_name = map[int32]string{
	0:   "INVALID",
	1:   "MDB_OPEN",
	2:   "MDB_RESET",
	3:   "MDB_TX",
	100: "STOP",
}
View Source
var Request_Command_value = map[string]int32{
	"INVALID":   0,
	"MDB_OPEN":  1,
	"MDB_RESET": 2,
	"MDB_TX":    3,
	"STOP":      100,
}
View Source
var Response_Status_name = map[int32]string{
	0: "INVALID",
	1: "OK",
	2: "ERR_INPUT",
	3: "ERR_INTERNAL",
	4: "ERR_CHECKSUM",
	5: "ERR_TIMEOUT",
	6: "ERR_HARDWARE",
}
View Source
var Response_Status_value = map[string]int32{
	"INVALID":      0,
	"OK":           1,
	"ERR_INPUT":    2,
	"ERR_INTERNAL": 3,
	"ERR_CHECKSUM": 4,
	"ERR_TIMEOUT":  5,
	"ERR_HARDWARE": 6,
}

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(path string) (*Client, error)

func (*Client) Close

func (self *Client) Close() error

func (*Client) DecRef

func (self *Client) DecRef(debug string) error

func (*Client) Do

func (self *Client) Do(request *Request, response *Response) error

func (*Client) IncRef

func (self *Client) IncRef(debug string)

type Request

type Request struct {
	Version              uint32          `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Command              Request_Command `protobuf:"varint,2,opt,name=command,proto3,enum=iodin.Request_Command" json:"command,omitempty"`
	Timeout              uint32          `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
	ArgUint              uint32          `protobuf:"varint,4,opt,name=arg_uint,json=argUint,proto3" json:"arg_uint,omitempty"`
	ArgBytes             []byte          `protobuf:"bytes,5,opt,name=arg_bytes,json=argBytes,proto3" json:"arg_bytes,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*Request) Descriptor

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

func (*Request) GetArgBytes

func (m *Request) GetArgBytes() []byte

func (*Request) GetArgUint

func (m *Request) GetArgUint() uint32

func (*Request) GetCommand

func (m *Request) GetCommand() Request_Command

func (*Request) GetTimeout

func (m *Request) GetTimeout() uint32

func (*Request) GetVersion

func (m *Request) GetVersion() uint32

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

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

func (*Request) XXX_Merge

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

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

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

type Request_Command

type Request_Command int32
const (
	Request_INVALID   Request_Command = 0
	Request_MDB_OPEN  Request_Command = 1
	Request_MDB_RESET Request_Command = 2
	Request_MDB_TX    Request_Command = 3
	Request_STOP      Request_Command = 100
)

func (Request_Command) EnumDescriptor

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

func (Request_Command) String

func (x Request_Command) String() string

type Response

type Response struct {
	Version              uint32          `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Status               Response_Status `protobuf:"varint,2,opt,name=status,proto3,enum=iodin.Response_Status" json:"status,omitempty"`
	Error                string          `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	DataBytes            []byte          `protobuf:"bytes,4,opt,name=data_bytes,json=dataBytes,proto3" json:"data_bytes,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*Response) Descriptor

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

func (*Response) GetDataBytes

func (m *Response) GetDataBytes() []byte

func (*Response) GetError

func (m *Response) GetError() string

func (*Response) GetStatus

func (m *Response) GetStatus() Response_Status

func (*Response) GetVersion

func (m *Response) GetVersion() uint32

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

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

func (*Response) XXX_Merge

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

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

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

type Response_Status

type Response_Status int32
const (
	Response_INVALID      Response_Status = 0
	Response_OK           Response_Status = 1
	Response_ERR_INPUT    Response_Status = 2
	Response_ERR_INTERNAL Response_Status = 3
	Response_ERR_CHECKSUM Response_Status = 4
	Response_ERR_TIMEOUT  Response_Status = 5
	Response_ERR_HARDWARE Response_Status = 6
)

func (Response_Status) EnumDescriptor

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

func (Response_Status) String

func (x Response_Status) String() string

Jump to

Keyboard shortcuts

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