admin

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: 9 Imported by: 0

Documentation

Overview

Package admin can initialize MarkLogic instances

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InitHandle

type InitHandle struct {
	*bytes.Buffer
	Format int
	// contains filtered or unexported fields
}

InitHandle returns the raw string results of JSON or XML

func (*InitHandle) AcceptResponse

func (rh *InitHandle) AcceptResponse(resp *http.Response) error

AcceptResponse handles an *http.Response

func (*InitHandle) Deserialize

func (rh *InitHandle) Deserialize(bytes []byte)

Deserialize returns Response struct that represents XML or JSON

func (*InitHandle) Deserialized

func (rh *InitHandle) Deserialized() interface{}

Deserialized returns deserialized InitializeProperties

func (*InitHandle) Get

func (rh *InitHandle) Get() *InitializeProperties

Get returns deserialized InitializeProperties

func (*InitHandle) GetFormat

func (rh *InitHandle) GetFormat() int

GetFormat returns int that represents XML or JSON

func (*InitHandle) Serialize

func (rh *InitHandle) Serialize(response interface{})

Serialize returns []byte of XML or JSON that represents the Response struct

func (*InitHandle) Serialized

func (rh *InitHandle) Serialized() string

Serialized returns string of XML or JSON

func (*InitHandle) SetTimestamp

func (rh *InitHandle) SetTimestamp(timestamp string)

SetTimestamp sets the timestamp

func (*InitHandle) Timestamp

func (rh *InitHandle) Timestamp() string

Timestamp retieves a timestamp

type InitializeProperties

type InitializeProperties struct {
	XMLName    xml.Name `xml:"http://marklogic.com/manage init" json:"-"`
	LicenseKey string   `xml:"license-key" json:"license-key"`
	Licensee   string   `xml:"licensee" json:"licensee"`
}

InitializeProperties represents a request for /admin/v1/init API

type InstanceAdminHandle

type InstanceAdminHandle struct {
	*bytes.Buffer
	Format int
	// contains filtered or unexported fields
}

InstanceAdminHandle returns the raw string results of JSON or XML

func (*InstanceAdminHandle) AcceptResponse

func (rh *InstanceAdminHandle) AcceptResponse(resp *http.Response) error

AcceptResponse handles an *http.Response

func (*InstanceAdminHandle) Deserialize

func (rh *InstanceAdminHandle) Deserialize(bytes []byte)

Deserialize returns Response struct that represents XML or JSON

func (*InstanceAdminHandle) Deserialized

func (rh *InstanceAdminHandle) Deserialized() interface{}

Deserialized returns deserialized InstanceAdminRequest as interface{}

func (*InstanceAdminHandle) Get

Get returns returns deserialized InstanceAdminRequest

func (*InstanceAdminHandle) GetFormat

func (rh *InstanceAdminHandle) GetFormat() int

GetFormat returns int that represents XML or JSON

func (*InstanceAdminHandle) Serialize

func (rh *InstanceAdminHandle) Serialize(request interface{})

Serialize returns []byte of XML or JSON that represents the Response struct

func (*InstanceAdminHandle) Serialized

func (rh *InstanceAdminHandle) Serialized() string

Serialized returns string of XML or JSON

func (*InstanceAdminHandle) SetTimestamp

func (rh *InstanceAdminHandle) SetTimestamp(timestamp string)

SetTimestamp sets the timestamp

func (*InstanceAdminHandle) Timestamp

func (rh *InstanceAdminHandle) Timestamp() string

Timestamp retieves a timestamp

type InstanceAdminRequest

type InstanceAdminRequest struct {
	XMLName  xml.Name `xml:"http://marklogic.com/manage instance-admin" json:"-"`
	Username string   `xml:"admin-username" json:"admin-username"`
	Password string   `xml:"admin-password" json:"admin-password"`
	Realm    string   `xml:"realm" json:"realm"`
}

InstanceAdminRequest represents the properties of a MarkLogic Database

type LastStartupElement

type LastStartupElement struct {
	XMLName xml.Name `xml:"last-startup" json:"-"`
	Value   string   `xml:",chardata"`
	HostID  string   `xml:"host-id,attr"`
}

LastStartupElement represents MarkLogic last startup information

type LinkElement

type LinkElement struct {
	XMLName xml.Name `xml:"link" json:"-"`
	KindRef string   `xml:"kindref"`
	URIRef  string   `xml:"uriref"`
}

LinkElement represents link information

type RestartResponse

type RestartResponse struct {
	XMLName     xml.Name           `xml:"http://marklogic.com/manage restart" json:"-"`
	LastStartup LastStartupElement `xml:"last-startup" json:"last-startup,omitempty"`
	Link        LinkElement        `xml:"link" json:"link,omitempty"`
	Message     string             `xml:"message" json:"message,omitempty"`
	// contains filtered or unexported fields
}

RestartResponse represents a response from /admin/v1/init API

type RestartResponseHandle

type RestartResponseHandle struct {
	*bytes.Buffer
	Format int
	// contains filtered or unexported fields
}

RestartResponseHandle is a handle that places the results into a Response struct

func (*RestartResponseHandle) AcceptResponse

func (rh *RestartResponseHandle) AcceptResponse(resp *http.Response) error

AcceptResponse handles an *http.Response

func (*RestartResponseHandle) Deserialize

func (rh *RestartResponseHandle) Deserialize(bytes []byte)

Deserialize returns Response struct that represents XML or JSON

func (*RestartResponseHandle) Deserialized

func (rh *RestartResponseHandle) Deserialized() interface{}

Deserialized returns deserialised RestartResponse as interface{}

func (*RestartResponseHandle) Get

Get returns deserialised RestartResponse

func (*RestartResponseHandle) GetFormat

func (rh *RestartResponseHandle) GetFormat() int

GetFormat returns int that represents XML or JSON

func (*RestartResponseHandle) Serialize

func (rh *RestartResponseHandle) Serialize(response interface{})

Serialize returns []byte of XML or JSON that represents the Response struct

func (*RestartResponseHandle) Serialized

func (rh *RestartResponseHandle) Serialized() string

Serialized returns string of XML or JSON

func (*RestartResponseHandle) SetTimestamp

func (rh *RestartResponseHandle) SetTimestamp(timestamp string)

SetTimestamp sets the timestamp

func (*RestartResponseHandle) Timestamp

func (rh *RestartResponseHandle) Timestamp() string

Timestamp retieves a timestamp

type Service

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

Service is used for the admin service

func NewService

func NewService(client *clients.AdminClient) *Service

NewService returns a new admin.Service

func (*Service) Init

func (s *Service) Init(license handle.Handle, response handle.ResponseHandle) error

Init MarkLogic instance

func (*Service) InstanceAdmin

func (s *Service) InstanceAdmin(username string, password string, realm string, response handle.ResponseHandle) error

InstanceAdmin install the admin username and password, and initialize the security database and objects.

type TimestampResponseHandle

type TimestampResponseHandle struct {
	*bytes.Buffer
	Format int
	// contains filtered or unexported fields
}

TimestampResponseHandle is a handle that places the results into a Response struct

func (*TimestampResponseHandle) AcceptResponse

func (rh *TimestampResponseHandle) AcceptResponse(resp *http.Response) error

AcceptResponse handles an *http.Response

func (*TimestampResponseHandle) Deserialize

func (rh *TimestampResponseHandle) Deserialize(bytes []byte)

Deserialize returns Response struct that represents XML or JSON

func (*TimestampResponseHandle) Deserialized

func (rh *TimestampResponseHandle) Deserialized() interface{}

Deserialized returns deserialized timestamp string as interface{}

func (*TimestampResponseHandle) Get

func (rh *TimestampResponseHandle) Get() *string

Get returns string of timestamp

func (*TimestampResponseHandle) GetFormat

func (rh *TimestampResponseHandle) GetFormat() int

GetFormat returns int that represents XML or JSON

func (*TimestampResponseHandle) Serialize

func (rh *TimestampResponseHandle) Serialize(response interface{})

Serialize returns []byte of XML or JSON that represents the Response struct

func (*TimestampResponseHandle) Serialized

func (rh *TimestampResponseHandle) Serialized() string

Serialized returns string of XML or JSON

func (*TimestampResponseHandle) SetTimestamp

func (rh *TimestampResponseHandle) SetTimestamp(timestamp string)

SetTimestamp sets the timestamp

func (*TimestampResponseHandle) Timestamp

func (rh *TimestampResponseHandle) Timestamp() string

Timestamp retieves a timestamp

Jump to

Keyboard shortcuts

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