Documentation ¶
Overview ¶
Package semantics interacts with MarkLogic's semantic APIs
Index ¶
- type Service
- type Things
- type ThingsHandle
- func (th *ThingsHandle) AcceptResponse(resp *http.Response) error
- func (th *ThingsHandle) Deserialize(bytes []byte)
- func (th *ThingsHandle) Deserialized() interface{}
- func (th *ThingsHandle) Get() *Things
- func (th *ThingsHandle) GetFormat() int
- func (th *ThingsHandle) Serialize(response interface{})
- func (th *ThingsHandle) Serialized() string
- func (th *ThingsHandle) SetTimestamp(timestamp string)
- func (th *ThingsHandle) Timestamp() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is used for the semantics service
func NewService ¶
NewService returns a new semantics.Service
type Things ¶
type Things struct {
Subjects []string `xml:"http://www.w3.org/1999/xhtml a"`
}
Things represents a response from the things API
type ThingsHandle ¶
ThingsHandle is a handle that places the results into a Response struct
func (*ThingsHandle) AcceptResponse ¶
func (th *ThingsHandle) AcceptResponse(resp *http.Response) error
AcceptResponse handles an *http.Response
func (*ThingsHandle) Deserialize ¶
func (th *ThingsHandle) Deserialize(bytes []byte)
Deserialize returns Response struct that represents XML or JSON
func (*ThingsHandle) Deserialized ¶
func (th *ThingsHandle) Deserialized() interface{}
Deserialized returns *Things as interface{}
func (*ThingsHandle) GetFormat ¶
func (th *ThingsHandle) GetFormat() int
GetFormat returns int that represents XML or JSON
func (*ThingsHandle) Serialize ¶
func (th *ThingsHandle) Serialize(response interface{})
Serialize returns []byte of XML or JSON that represents the Response struct
func (*ThingsHandle) Serialized ¶
func (th *ThingsHandle) Serialized() string
Serialized returns string of XML or JSON
func (*ThingsHandle) SetTimestamp ¶
func (th *ThingsHandle) SetTimestamp(timestamp string)
SetTimestamp sets the timestamp
func (*ThingsHandle) Timestamp ¶
func (th *ThingsHandle) Timestamp() string
Timestamp retieves a timestamp