config

package
v0.5.0-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LocalRegistry  = "localhost/kubefox"
	GitHubClientId = "a76b4dc61b6fec162ef6"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GitHub            GitHub            `json:"github"`
	KubeFox           KubeFox           `json:"kubefox"`
	Kind              Kind              `json:"kind"`
	ContainerRegistry ContainerRegistry `json:"containerRegistry"`

	Flags Flags `json:"-"`
	Fresh bool  `json:"-"`
	// contains filtered or unexported fields
}

func (*Config) CleanPaths

func (cfg *Config) CleanPaths(defAppToWd bool)

func (*Config) IsRegistryLocal

func (cfg *Config) IsRegistryLocal() bool

func (*Config) Load

func (cfg *Config) Load()

func (*Config) Setup

func (cfg *Config) Setup()

func (*Config) Write

func (cfg *Config) Write()

type ContainerRegistry

type ContainerRegistry struct {
	Address string `json:"address" validate:"required"`
	Token   string `json:"token"`
}

type Flags

type Flags struct {
	// persistent flags defined in root command
	RepoPath  string
	AppPath   string
	OutFormat string

	Info    bool
	Verbose bool

	// flags used by subcommands
	Builder    string
	Deployment string
	Env        string
	EnvUID     string
	EnvVersion string
	Kind       string
	Namespace  string
	Platform   string

	WaitTime time.Duration

	NoCache    bool
	PushImage  bool
	SkipDeploy bool
	ForceBuild bool
}

type GitHub

type GitHub struct {
	Org   GitHubOrg  `json:"org"`
	User  GitHubUser `json:"user"`
	Token string     `json:"token"`
}

type GitHubError

type GitHubError struct {
	Msg    string `json:"message"`
	DocURL string `json:"documentation_url"`
}

type GitHubOrg

type GitHubOrg struct {
	Id   int    `json:"id"`
	Name string `json:"login"`
	URL  string `json:"url" validate:"url"`
}

type GitHubUser

type GitHubUser struct {
	Id        int    `json:"id"`
	Name      string `json:"login"`
	AvatarURL string `json:"avatar_url" validate:"url"`
	URL       string `json:"html_url" validate:"url"`
}

type Kind

type Kind struct {
	ClusterName string `json:"clusterName"`
	AlwaysLoad  bool   `json:"alwaysLoad"`
}

type KubeFox

type KubeFox struct {
	Namespace string `json:"namespace"`
	Platform  string `json:"platform"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳