ravendb

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NUMBER_OF_RETRIES                       int    = 5
	DEFAULT_SECURE_RAVENDB_HTTP_PORT        int    = 443
	DEFAULT_USECURED_RAVENDB_HTTP_PORT      int    = 8080
	DEFAULT_SECURE_RAVENDB_TCP_PORT         int    = 38888
	DEFAULT_UNSECURED_RAVENDB_TCP_PORT      int    = 38881
	DEFAULT_HTTP_PORT                       int    = 80
	CREDENTIALS_FOR_SECURE_STORE_FIELD_NAME string = "store"
	ADMIN_CERTIFICATE                       string = "Admin Certificate"
)

Variables

This section is empty.

Functions

func OpenZipFile added in v1.0.1

func OpenZipFile(sc ServerConfig, path string) (map[string]*CertificateHolder, error)

func Provider

func Provider() *schema.Provider

Provider returns the provider to be used by the code.

Types

type CertificateHolder added in v1.0.1

type CertificateHolder struct {
	Pfx  []byte `json:"Pfx,omitempty"`
	Cert []byte `json:"Cert,omitempty"`
	Key  []byte `json:"Key,omitempty"`
}

func (CertificateHolder) String added in v1.0.1

func (sc CertificateHolder) String() (string, error)

type Database added in v1.0.2

type Database struct {
	Name             string            `json:"Name,omitempty"`
	Settings         map[string]string `json:"Settings,omitempty"`
	ReplicationNodes []string          `json:"ReplicationNodes,omitempty"`
	Key              string            `json:"Key,omitempty"`
	Indexes          []Index           `json:"Indexes,omitempty"`
}

type DatabaseToDelete added in v1.0.2

type DatabaseToDelete struct {
	Name       string `json:"Name,omitempty"`
	HardDelete bool   `json:"HardDelete,omitempty"`
}

type DeployError

type DeployError struct {
	Output string
	Err    error
}

func (*DeployError) Error

func (e *DeployError) Error() string

type Index added in v1.0.2

type Index struct {
	IndexName     string            `json:"IndexName,omitempty"`
	Maps          []string          `json:"Maps,omitempty"`
	Reduce        string            `json:"Reduce,omitempty"`
	Configuration map[string]string `json:"Configuration,omitempty"`
}

type IndexesToDelete added in v1.0.2

type IndexesToDelete struct {
	DatabaseName string   `json:"DatabaseName,omitempty"`
	IndexesNames []string `json:"IndexesNames,omitempty"`
}

type NodeState

type NodeState struct {
	Host              string                       `json:"Host,omitempty"`
	Licence           []byte                       `json:"Licence,omitempty"`
	Settings          map[string]interface{}       `json:"Settings,omitempty"`
	ClusterSetupZip   map[string]CertificateHolder `json:"ClusterSetupZip,omitempty"`
	HttpUrl           string                       `json:"HttpUrl,omitempty"`
	TcpUrl            string                       `json:"TcpUrl,omitempty"`
	Assets            map[string][]byte            `json:"Assets,omitempty"`
	Unsecured         bool                         `json:"Unsecured,omitempty"`
	Version           string                       `json:"Version,omitempty"`
	Failed            bool                         `json:"Failed,omitempty"`
	Databases         []Database                   `json:"Databases,omitempty"`
	DatabasesToDelete []DatabaseToDelete           `json:"DatabasesToDelete,omitempty"`
	IndexesToDelete   []IndexesToDelete            `json:"IndexesToDelete,omitempty"`
}

type Package

type Package struct {
	Version       string `json:"Version,omitempty"`
	Arch          string `json:"Arch,omitempty"`
	UbuntuVersion string `json:"UbuntuVersion,omitempty"`
}

type SSH

type SSH struct {
	User string `json:"User,omitempty"`
	Pem  []byte `json:"Pem,omitempty"`
	Port int    `json:"Port,omitempty"`
}

type ServerConfig

type ServerConfig struct {
	Package             Package                       `json:"Package"`
	Hosts               []string                      `json:"Hosts,omitempty"`
	License             []byte                        `json:"License,omitempty"`
	Settings            map[string]interface{}        `json:"Settings,omitempty"`
	ClusterSetupZip     map[string]*CertificateHolder `json:"ClusterSetupZip,omitempty"`
	Url                 Url                           `json:"Url"`
	Assets              map[string][]byte             `json:"Assets,omitempty"`
	Unsecured           bool                          `json:"Unsecured,omitempty"`
	SSH                 SSH                           `json:"SSH"`
	HealthcheckDatabase string                        `json:"HealthcheckDatabase,omitempty"`
	Databases           []Database                    `json:"Databases,omitempty"`
	DatabasesToDelete   []DatabaseToDelete            `json:"DatabasesToDelete,omitempty"`
	IndexesToDelete     []IndexesToDelete             `json:"IndexesToDelete,omitempty"`
}

func (*ServerConfig) ConnectToRemoteWithRetry

func (sc *ServerConfig) ConnectToRemoteWithRetry(publicIP string, conn *ssh.Client, authConfig *ssh.ClientConfig) (*ssh.Client, error)

func (*ServerConfig) ConvertPfx added in v1.0.1

func (sc *ServerConfig) ConvertPfx() (holder CertificateHolder, err error)

func (*ServerConfig) Deploy

func (sc *ServerConfig) Deploy(parallel bool) (string, error)

func (*ServerConfig) GetUrlByIndex

func (sc *ServerConfig) GetUrlByIndex(index int, scheme string) (string, string, error)

func (*ServerConfig) ReadServer

func (sc *ServerConfig) ReadServer(publicIP string, index int) (NodeState, error)

func (*ServerConfig) RemoveRavenDbInstances

func (sc *ServerConfig) RemoveRavenDbInstances() diag.Diagnostics

type Url

type Url struct {
	List     []string `json:"List,omitempty"`
	HttpPort int      `json:"HttpPort,omitempty"`
	TcpPort  int      `json:"TcpPort,omitempty"`
}

Jump to

Keyboard shortcuts

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