config

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfig = Config{}

	DefaultURL = "api.preview.tigrisdata.cloud"
	Domain     = "tigrisdata.cloud"

	Project string
)
View Source
var DefaultName = "tigris-cli"

Functions

func GetProjectName

func GetProjectName() string

func Load

func Load(name string, config interface{})

func Save

func Save(name string, config interface{}) error

Types

type Config

type Config struct {
	ClientID     string        `json:"client_id" yaml:"client_id,omitempty" mapstructure:"client_id"`
	ClientSecret string        `json:"client_secret" yaml:"client_secret,omitempty" mapstructure:"client_secret"`
	Token        string        `json:"token" yaml:"token,omitempty"`
	URL          string        `json:"url" yaml:"url,omitempty"`
	UseTLS       bool          `json:"use_tls" yaml:"use_tls,omitempty" mapstructure:"use_tls"`
	Timeout      time.Duration `json:"timeout" yaml:"timeout,omitempty"`
	Protocol     string        `json:"protocol" yaml:"protocol,omitempty"`
	Log          Log           `json:"log" yaml:"log,omitempty"`
	Project      string        `json:"project" yaml:"project,omitempty"`
	Branch       string        `json:"branch" yaml:"branch,omitempty"`
}

type Log

type Log struct {
	Level string `json:"level" yaml:"level,omitempty"`
}

Jump to

Keyboard shortcuts

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