Documentation ¶
Index ¶
- Constants
- Variables
- func Execute()
- func NewConfig() *cobra.Command
- func NewConfigInit() *cobra.Command
- func NewContainer(v *viper.Viper, userOptions ...fx.Option) *fx.App
- func NewDocCommand() *cobra.Command
- func NewDocFlagCommand() *cobra.Command
- func NewRootCommand() *cobra.Command
- func NewScriptCheck() *cobra.Command
- func NewScriptExec() *cobra.Command
- func NewServer() *cobra.Command
- func NewServerStart() *cobra.Command
- func NewStorage() *cobra.Command
- func NewStorageDelete() *cobra.Command
- func NewStorageInit() *cobra.Command
- func NewStorageList() *cobra.Command
- func NewStorageScan() *cobra.Command
- func NewStorageUpgrade() *cobra.Command
- func NewVersion() *cobra.Command
- func PrintVersion(cmd *cobra.Command, args []string)
Constants ¶
View Source
const ServiceName = "ledger"
Variables ¶
View Source
var ( Version = "develop" BuildDate = "-" Commit = "-" DefaultSegmentWriteKey = "" )
View Source
var UICmd = &cobra.Command{ Use: "ui", RunE: func(cmd *cobra.Command, args []string) error { addr := viper.GetString("ui.http.bind_address") handler := http.FileServer(http.FS(uipath)) http.HandleFunc("/", func(rw http.ResponseWriter, r *http.Request) { isFile := regexp.MustCompile(`\.[a-z]{2,}$`) path := r.URL.Path if !isFile.MatchString(path) { path = "/" } r.URL.Path = fmt.Sprintf("/control%s", path) handler.ServeHTTP(rw, r) }) if viper.GetBool(uiBrowserFlag) { openuri(addr) } fmt.Printf("Numary control is live on http://%s\n", addr) httpErr := http.ListenAndServe(addr, nil) if httpErr != nil && httpErr != http.ErrServerClosed { return httpErr } return nil }, }
Functions ¶
func NewConfigInit ¶
func NewDocCommand ¶ added in v1.3.0
func NewDocFlagCommand ¶ added in v1.3.0
func NewRootCommand ¶
func NewScriptCheck ¶
func NewScriptExec ¶
func NewServerStart ¶
func NewStorage ¶
func NewStorageDelete ¶ added in v1.3.2
func NewStorageInit ¶
func NewStorageList ¶ added in v1.3.2
func NewStorageScan ¶ added in v1.3.2
func NewStorageUpgrade ¶ added in v1.3.2
func NewVersion ¶
func PrintVersion ¶
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.