sqlconfig

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package sqlconfig, defines the metadata for representing a sqlconfig file. It includes structs for representing an endpoint, context, user, and the overall sqlconfig file itself. Each struct has fields for storing the various pieces of information that make up an SQL configuration, such as endpoint address and port, context name and endpoint, and user authentication type and details. These structs are used to manage and manipulate the sqlconfig.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetDetails

type AssetDetails struct {
	*ContainerDetails `mapstructure:"container,omitempty" yaml:"container,omitempty"`
}

type BasicAuthDetails

type BasicAuthDetails struct {
	Username          string `mapstructure:"username"`
	PasswordEncrypted bool   `mapstructure:"password-encrypted" yaml:"password-encrypted"`
	Password          string `mapstructure:"password"`
}

type ContainerDetails

type ContainerDetails struct {
	Id    string `mapstructure:"id"`
	Image string `mapstructure:"image"`
}

type Context

type Context struct {
	ContextDetails `mapstructure:"context" yaml:"context"`
	Name           string `mapstructure:"name"`
}

type ContextDetails

type ContextDetails struct {
	Endpoint string  `mapstructure:"endpoint"`
	User     *string `mapstructure:"user,omitempty" yaml:"user,omitempty"`
}

type Endpoint

type Endpoint struct {
	*AssetDetails   `mapstructure:"asset,omitempty" yaml:"asset,omitempty"`
	EndpointDetails `mapstructure:"endpoint" yaml:"endpoint"`
	Name            string `mapstructure:"name"`
}

type EndpointDetails

type EndpointDetails struct {
	Address string `mapstructure:"address"`
	Port    int    `mapstructure:"port"`
}

type Sqlconfig

type Sqlconfig struct {
	Version        string     `mapstructure:"version"`
	Endpoints      []Endpoint `mapstructure:"endpoints"`
	Contexts       []Context  `mapstructure:"contexts"`
	CurrentContext string     `mapstructure:"currentcontext"`
	Users          []User     `mapstructure:"users"`
}

type User

type User struct {
	Name               string            `mapstructure:"name"`
	AuthenticationType string            `mapstructure:"authentication-type" yaml:"authentication-type"`
	BasicAuth          *BasicAuthDetails `mapstructure:"basic-auth,omitempty" yaml:"basic-auth,omitempty"`
}

Jump to

Keyboard shortcuts

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