semantics

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package semantics interacts with MarkLogic's semantic APIs

Index

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

func NewService(client *clients.Client) *Service

NewService returns a new semantics.Service

func (*Service) Things

func (s *Service) Things(iris []string, response handle.ResponseHandle) error

Things associated with the IRIs

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

type ThingsHandle struct {
	*bytes.Buffer
	// contains filtered or unexported fields
}

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) Get

func (th *ThingsHandle) Get() *Things

Get returns *Things

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

Jump to

Keyboard shortcuts

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