Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) Close() error
- func (c *Client) Exec(service, method string, auth fmt.Stringer, args oscript.M, result interface{}) (*Response, error)
- func (c *Client) Read(r interface{}) (*Response, error)
- func (c *Client) ReadFile(fa interface{}) (*Response, error)
- func (c *Client) ReadTo(w io.Writer) error
- func (c *Client) Write(service, method string, auth fmt.Stringer, args oscript.M) error
- func (c *Client) WriteFrom(r io.Reader) error
- type OpError
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var OpenRequest = []byte{1, 8, 1, 3, 0, 0, 2, 4}
OpenRequest is a expectation bytes on first place in every request service.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(conn io.ReadWriteCloser) *Client
type OpError ¶
type OpError struct { // service is a service with happened error Service string // Err is a message of the error Err error }
An OpError is the error type usually returned by functions in the ot package. It describes the service method, and text of an error.
type Response ¶
type Response struct { Status int `oscript:"_Status"` API string `oscript:"_apiError"` StatusMessage string `oscript:"_StatusMessage"` Desc string `oscript:"_errMsg"` Results interface{} `oscript:"Results"` FileAttr interface{} `oscript:"FileAttributes"` Service string `oscript:"-"` }
Response is response on any request.
func (*Response) ErrMessage ¶
Click to show internal directories.
Click to hide internal directories.