config

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: May 13, 2025 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package config provides the config of cli

Index

Constants

View Source
const (
	KeyTokenString = "token"
	KeyUser        = "user"
	KeyUsername    = "username"
)

Keys about auth

View Source
const (
	KeyInteractive     = "interactive"
	KeyAutoCheckUpdate = "auto_check_update"
)

Keys about CLI behavior

Variables

This section is empty.

Functions

func DefaultConfigFilePath

func DefaultConfigFilePath() (string, error)

DefaultConfigFilePath returns the default config file path($HOME/.config/zeabur/cli.yaml)

Types

type Config

type Config interface {
	GetTokenString() string // token string is the single token string, it may be set by user or our login function
	SetTokenString(token string)

	GetUser() string // nickname of user
	SetUser(user string)
	GetUsername() string // it is kind like id of user
	SetUsername(username string)

	GetContext() zcontext.Context

	Write() error
}

func New

func New(path string) Config

Jump to

Keyboard shortcuts

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