database

package
v0.0.0-...-cc4f0fa Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMessageForStatus

func GetMessageForStatus(s Status) string

func GetUserNameForType

func GetUserNameForType(t CredentialType) string

Types

type Credential

type Credential struct {
	ID           CredentialID
	Username     string
	Password     Password
	Host         string
	Port         int64
	DatabaseName string
	CredType     CredentialType
	Scope
}

type CredentialID

type CredentialID string

type CredentialType

type CredentialType int
const (
	CredTypeAdmin CredentialType = iota
	CredTypeAppUser
	CredTypeAppAdmin
	CredTypeAppReadOnly
	CredTypeMonitoring
)

func GetAllCredentialTypes

func GetAllCredentialTypes() []CredentialType

type Credentials

type Credentials map[CredentialType]*Credential

type Database

type Database struct {
	ID          DatabaseID
	Storage     int64
	Size        Size
	Status      Status
	HA          bool
	Credentials Credentials
	Name        string
	Host        string
	Port        int64
	Owner       string
}

type DatabaseID

type DatabaseID string

type Password

type Password string

type Request

type Request struct {
	ID       DatabaseID
	Name     string
	Storage  int64
	Size     Size
	HA       bool
	Metadata map[string]string
	Owner    string
}

type Scope

type Scope string

type Size

type Size int
const (
	SizeXSmall Size = iota
	SizeSmall
	SizeMedium
	SizeLarge
	SizeXLarge
	SizeXXLarge
	SizeMassive
)

type Status

type Status int
const (
	StatusAvailable Status = iota
	StatusUnavailable
	StatusErrored
)

type StatusRequest

type StatusRequest struct {
	Name string
	Status
	ID *DatabaseID
	Scope
}

Jump to

Keyboard shortcuts

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