cnf

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Data  interface{} `json:"id" msgpack:"id"`
	Kind  Kind        `json:"-" msgpack:"-"`
	Scope string      `json:"-" msgpack:"-"`
	NS    string      `json:"-" msgpack:"-"`
	DB    string      `json:"-" msgpack:"-"`
}

func (*Auth) Reset

func (a *Auth) Reset() *Auth

Reset resets the authentication data.

type Kind

type Kind int
const (
	// Root access
	AuthKV Kind = iota
	// Namespace access
	AuthNS
	// Database access
	AuthDB
	// Scoped user access
	AuthSC
	// No access
	AuthNO
)

func (Kind) MarshalText

func (k Kind) MarshalText() (data []byte, err error)

func (Kind) String

func (k Kind) String() string

func (Kind) UnmarshalText

func (k Kind) UnmarshalText(text []byte) error

type Options

type Options struct {
	DB struct {
		Key  []byte // Data encryption key
		Code string // Data encryption key string
		Path string // Path to store the data file
		Base string // Base key to use in KV stores
		Proc struct {
			Flush  time.Duration // Timeframe for flushing data
			Shrink time.Duration // Timeframe for shrinking data
		}
		Cert struct {
			CA  string
			Crt string
			Key string
			SSL bool
		}
	}

	Port int // Port as an number

	Conn string // Port as a string

	Bind string // Hostname of the node

	Cert struct {
		Crt string // File location of server crt
		Key string // File location of server key
	}

	Auth struct {
		Auth string       // Master authentication user:pass
		User string       // Master authentication username
		Pass string       // Master authentication password
		Addr []string     // Allowed ip ranges for authentication
		Nets []*net.IPNet // Allowed cidr ranges for authentication
	}

	Query struct {
		Timeout time.Duration // Fixed query timeout
	}

	Logging struct {
		Level  string // Stores the configured logging level
		Output string // Stores the configured logging output
		Format string // Stores the configured logging format
	}
}

Options defines global configuration options

var Settings *Options

Jump to

Keyboard shortcuts

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