cli

package
v0.0.0-...-33384a8 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvConfigFile  = "CONF_FILE"
	EnvConfigHost  = "CONF_HOST"
	EnvConfigToken = "CONF_TOKEN"
	EnvServiceID   = "SERVICE_ID"
	EnvTimezone    = "TIMEZONE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader func() kratosConfig.Source

type Options

type Options struct {
	AppName      string
	AppVersion   string
	AppBuildTime string
	Description  string

	ConfigFile  string
	ConfigHost  string
	ConfigToken string
	ServiceID   string
	Timezone    string

	StartFn func(opt *StartOptions) error
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewCLI

func NewCLI(opts *Options) Service

func (Service) CMD

func (c Service) CMD() *cobra.Command

func (Service) Parse

func (c Service) Parse()

func (Service) Start

func (c Service) Start()

type StartOptions

type StartOptions struct {
	Loader Loader

	AppName      string
	AppVersion   string
	AppBuildTime string
	ServiceID    string
	Timezone     string
}

Jump to

Keyboard shortcuts

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