cli

package
v4.10.4 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: Apache-2.0 Imports: 70 Imported by: 1

Documentation

Overview

DigitalRebar Provision CLI provides the core parts of the CLI. This CLI uses an access core based upon a set of generated files from the generated swagger.json file.

Copyright © 2020 RackN <support@rackn.com>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ActuallyPowerThings is a boolean to use in testing to keep from power off the test machine
	ActuallyPowerThings = true
	// DefaultStateLoc is the default location to save agent state
	DefaultStateLoc string
)
View Source
var (

	// Session is the global client access session
	Session *api.Client
)

Functions

func AddDirToZip

func AddDirToZip(zipWriter *zip.Writer, dirname string) error

given a top level dir this will walk it adding files and folders. to the archive

func AddFileToZip

func AddFileToZip(zipWriter *zip.Writer, filename string) error

adds an individual file to the archive

func NewApp

func NewApp() *cobra.Command

NewApp is the app start function

func NewBasicKeyRequest

func NewBasicKeyRequest() *basicKeyReq

NewBasicKeyRequest returns a default BasicKeyRequest.

func PatchWithFunction

func PatchWithFunction(key string, op *ops, fn func(models.Model) (models.Model, bool)) error

The input function takes the object and returns the modified object and if the object changed.

func PatchWithString

func PatchWithString(key, js string, op *ops) error

func ResetDefaults

func ResetDefaults()

Types

type DocData

type DocData struct {
	Name          string
	RefName       string
	DisplayName   string
	Full          string
	Version       string
	Documentation string
	Objects       [][]models.Docer
}

func (*DocData) LengthString

func (dd *DocData) LengthString(str, pat string) string

type LabDocData added in v4.10.0

type LabDocData struct {
	Lab        *models.Lab
	LabSection *models.LabSection
	Depth      int
	InTab      bool
	VideoTag   string
	VideoTime  string
}

func (*LabDocData) Encapsulate added in v4.10.0

func (dd *LabDocData) Encapsulate(str, first, pat string) string

func (*LabDocData) LengthString added in v4.10.0

func (dd *LabDocData) LengthString(str, pat string) string

func (*LabDocData) MarkdownToRst added in v4.10.0

func (dd *LabDocData) MarkdownToRst(data string) string

func (*LabDocData) RenderSection added in v4.10.0

func (dd *LabDocData) RenderSection(tmplFile string, ls *models.LabSection, depth int, tab string) string

func (*LabDocData) ToRef added in v4.10.0

func (dd *LabDocData) ToRef(names ...string) string

type Service added in v4.9.3

type Service struct {
	Service string
	Port    string
}

type Services added in v4.9.3

type Services struct {
	Services []Service
	Warnings []Warning
}

type Warning added in v4.9.3

type Warning struct {
	Service string
	Port    string
	Warn    string
}

Jump to

Keyboard shortcuts

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