Documentation ¶
Index ¶
- func AddDatabaseParam(params string, client *clients.Client) string
- func AddTransactionParam(params string, transaction *Transaction) string
- func BuildRequestFromHandle(c clients.RESTClient, method string, uri string, reqHandle handle.Handle) (*http.Request, error)
- func Execute(c clients.RESTClient, req *http.Request, responseHandle handle.ResponseHandle) error
- func GetClientsByHost(client *clients.Client, forestInfo []ForestInfo) map[string]*clients.Client
- func GetURIs(c *clients.Client, query handle.Handle, forestName string, ...) error
- func MappedParameters(params string, prefix string, values map[string]string) string
- func PostForm(c clients.RESTClient, endpoint string, atomicParams map[string][]string, ...) error
- func RepeatingParameters(params string, valueLabel string, values []string) string
- type Database
- type ForestInfo
- type ForestInfoHandle
- func (fih *ForestInfoHandle) AcceptResponse(resp *http.Response) error
- func (fih *ForestInfoHandle) Deserialize(bytes []byte)
- func (fih *ForestInfoHandle) Deserialized() interface{}
- func (fih *ForestInfoHandle) Get() *[]ForestInfo
- func (fih *ForestInfoHandle) GetFormat() int
- func (fih *ForestInfoHandle) Read(bytes []byte) (n int, err error)
- func (fih *ForestInfoHandle) Serialize(forestInfo interface{})
- func (fih *ForestInfoHandle) Serialized() string
- func (fih *ForestInfoHandle) SetTimestamp(timestamp string)
- func (fih *ForestInfoHandle) Timestamp() string
- type Host
- type SerializableStringMap
- type Server
- type Transaction
- type TransactionStatus
- type TransactionStatusHandle
- func (tsh *TransactionStatusHandle) AcceptResponse(resp *http.Response) error
- func (tsh *TransactionStatusHandle) Deserialize(bytes []byte)
- func (tsh *TransactionStatusHandle) Deserialized() interface{}
- func (tsh *TransactionStatusHandle) Get() *TransactionStatus
- func (tsh *TransactionStatusHandle) GetFormat() int
- func (tsh *TransactionStatusHandle) Read(bytes []byte) (n int, err error)
- func (tsh *TransactionStatusHandle) Serialize(transactionStatus interface{})
- func (tsh *TransactionStatusHandle) Serialized() string
- func (tsh *TransactionStatusHandle) SetTimestamp(timestamp string)
- func (tsh *TransactionStatusHandle) Timestamp() string
- type Transform
- type URIsHandle
- func (uh *URIsHandle) AcceptResponse(resp *http.Response) error
- func (uh *URIsHandle) Deserialize(bytes []byte)
- func (uh *URIsHandle) Deserialized() interface{}
- func (uh *URIsHandle) Get() []string
- func (uh *URIsHandle) GetFormat() int
- func (uh *URIsHandle) Serialize(uris interface{})
- func (uh *URIsHandle) Serialized() string
- func (uh *URIsHandle) SetTimestamp(timestamp string)
- func (uh *URIsHandle) Timestamp() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDatabaseParam ¶
AddDatabaseParam is a utility function for adding the database parameter
func AddTransactionParam ¶
func AddTransactionParam(params string, transaction *Transaction) string
AddTransactionParam is a utility function for adding a transaction parameter
func BuildRequestFromHandle ¶
func BuildRequestFromHandle(c clients.RESTClient, method string, uri string, reqHandle handle.Handle) (*http.Request, error)
BuildRequestFromHandle builds a *http.Request based off a handle.Handle
func Execute ¶
func Execute(c clients.RESTClient, req *http.Request, responseHandle handle.ResponseHandle) error
Execute uses a client to run a request and places the results in the response Handle
func GetClientsByHost ¶
GetClientsByHost provides the forest information about the database
func GetURIs ¶
func GetURIs( c *clients.Client, query handle.Handle, forestName string, transaction *Transaction, start uint64, after string, pageLength uint, respHandle handle.ResponseHandle) error
GetURIs retrieves URIs from the internal API for the Data Movement SDK
func MappedParameters ¶
MappedParameters is a utility function for putting map[string]string to parameters
Types ¶
type ForestInfo ¶
type ForestInfo struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` UpdatesAllowed string `json:"updatesAllowed,omitempty"` Database string `json:"database,omitempty"` Host string `json:"host,omitempty"` RequestHost string `json:"requestHost,omitempty"` AlternateHost string `json:"alternateHost,omitempty"` OpenReplicaHost string `json:"openReplicaHost,omitempty"` }
ForestInfo describes a forest with associated host info
func GetForestInfo ¶
func GetForestInfo(c *clients.Client) []ForestInfo
GetForestInfo provides the forest information about the database
func (*ForestInfo) PreferredHost ¶
func (fi *ForestInfo) PreferredHost() string
PreferredHost for the forest
type ForestInfoHandle ¶
type ForestInfoHandle struct { *bytes.Buffer Format int ForestInfo []ForestInfo // contains filtered or unexported fields }
ForestInfoHandle is a handle that places the results into a ForestInfo struct
func (*ForestInfoHandle) AcceptResponse ¶
func (fih *ForestInfoHandle) AcceptResponse(resp *http.Response) error
AcceptResponse handles an *http.Response
func (*ForestInfoHandle) Deserialize ¶
func (fih *ForestInfoHandle) Deserialize(bytes []byte)
Deserialize returns Query struct that represents XML or JSON
func (*ForestInfoHandle) Deserialized ¶
func (fih *ForestInfoHandle) Deserialized() interface{}
Deserialized returns *[]ForestInfo as interface{}
func (*ForestInfoHandle) Get ¶
func (fih *ForestInfoHandle) Get() *[]ForestInfo
Get returns string of XML or JSON
func (*ForestInfoHandle) GetFormat ¶
func (fih *ForestInfoHandle) GetFormat() int
GetFormat returns int that represents XML or JSON
func (*ForestInfoHandle) Read ¶
func (fih *ForestInfoHandle) Read(bytes []byte) (n int, err error)
Read bytes
func (*ForestInfoHandle) Serialize ¶
func (fih *ForestInfoHandle) Serialize(forestInfo interface{})
Serialize returns []byte of XML or JSON that represents the Query struct
func (*ForestInfoHandle) Serialized ¶
func (fih *ForestInfoHandle) Serialized() string
Serialized returns string of XML or JSON
func (*ForestInfoHandle) SetTimestamp ¶
func (fih *ForestInfoHandle) SetTimestamp(timestamp string)
SetTimestamp sets the timestamp
func (*ForestInfoHandle) Timestamp ¶
func (fih *ForestInfoHandle) Timestamp() string
Timestamp retieves a timestamp
type SerializableStringMap ¶
SerializableStringMap is a map[string]string which can be converted to XML.
func (SerializableStringMap) MarshalXML ¶
func (s SerializableStringMap) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML marshals map[string]string into XML.
type Transaction ¶
type Transaction struct { Name string ID string TimeLimit int Database string // contains filtered or unexported fields }
Transaction represents a transaction for a request
func (*Transaction) GetStatus ¶
func (t *Transaction) GetStatus() TransactionStatus
GetStatus returns the status of a Transaction
func (*Transaction) Rollback ¶
func (t *Transaction) Rollback() bool
Rollback rolls back a Transaction
type TransactionStatus ¶
type TransactionStatus struct { Host Host `json:"host"` Server Server `json:"server"` Database Database `json:"database"` TransactionID string `json:"transaction-id"` TransactionName string `json:"transaction-name"` TransactionMode string `json:"transaction-mode"` TransactionTimestamp string `json:"transaction-timestamp"` TransactionState string `json:"transaction-state"` Canceled string `json:"canceled"` StartTime string `json:"start-time"` TimeLimit string `json:"time-limit"` MaxTimeLimit string `json:"max-time-limit"` User string `json:"user"` Admin string `json:"admin"` }
TransactionStatus represents a status of a transaction
type TransactionStatusHandle ¶
type TransactionStatusHandle struct { *bytes.Buffer TransactionStatus TransactionStatus // contains filtered or unexported fields }
TransactionStatusHandle is a handle that places the results into a TransactionStatus struct
func (*TransactionStatusHandle) AcceptResponse ¶
func (tsh *TransactionStatusHandle) AcceptResponse(resp *http.Response) error
AcceptResponse handles an *http.Response
func (*TransactionStatusHandle) Deserialize ¶
func (tsh *TransactionStatusHandle) Deserialize(bytes []byte)
Deserialize returns Query struct that represents XML or JSON
func (*TransactionStatusHandle) Deserialized ¶
func (tsh *TransactionStatusHandle) Deserialized() interface{}
Deserialized returns interface{}
func (*TransactionStatusHandle) Get ¶
func (tsh *TransactionStatusHandle) Get() *TransactionStatus
Get returns string of XML or JSON
func (*TransactionStatusHandle) GetFormat ¶
func (tsh *TransactionStatusHandle) GetFormat() int
GetFormat returns int that represents JSON
func (*TransactionStatusHandle) Read ¶
func (tsh *TransactionStatusHandle) Read(bytes []byte) (n int, err error)
Read bytes
func (*TransactionStatusHandle) Serialize ¶
func (tsh *TransactionStatusHandle) Serialize(transactionStatus interface{})
Serialize returns []byte of XML or JSON that represents the Query struct
func (*TransactionStatusHandle) Serialized ¶
func (tsh *TransactionStatusHandle) Serialized() string
Serialized returns string of XML or JSON
func (*TransactionStatusHandle) SetTimestamp ¶
func (tsh *TransactionStatusHandle) SetTimestamp(timestamp string)
SetTimestamp sets the timestamp
func (*TransactionStatusHandle) Timestamp ¶
func (tsh *TransactionStatusHandle) Timestamp() string
Timestamp retieves a timestamp
type Transform ¶
Transform represents a transform for a request
func (*Transform) ToParameters ¶
ToParameters converts a transform to its url form
type URIsHandle ¶
URIsHandle for retrieving URIs from the internal/uris endpoint
func (*URIsHandle) AcceptResponse ¶
func (uh *URIsHandle) AcceptResponse(resp *http.Response) error
AcceptResponse handles an *http.Response
func (*URIsHandle) Deserialize ¶
func (uh *URIsHandle) Deserialize(bytes []byte)
Deserialize returns Query struct that represents XML or JSON
func (*URIsHandle) Deserialized ¶
func (uh *URIsHandle) Deserialized() interface{}
Deserialized returns string array of URIs as interface{}
func (*URIsHandle) GetFormat ¶
func (uh *URIsHandle) GetFormat() int
GetFormat returns int that represents XML or JSON
func (*URIsHandle) Serialize ¶
func (uh *URIsHandle) Serialize(uris interface{})
Serialize returns []byte of XML or JSON that represents the Query struct
func (*URIsHandle) Serialized ¶
func (uh *URIsHandle) Serialized() string
Serialized returns string of XML or JSON
func (*URIsHandle) SetTimestamp ¶
func (uh *URIsHandle) SetTimestamp(timestamp string)
SetTimestamp sets the timestamp
func (*URIsHandle) Timestamp ¶
func (uh *URIsHandle) Timestamp() string
Timestamp retieves a timestamp