utils

package
v0.0.0-...-51b80db Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckType

func CheckType(args ...interface{})

func ConvertArrayToStr

func ConvertArrayToStr(arr []string) string

ConvertArrayToStr 拼接字符串数组 []string 返回单一 string

func ExpandMapToString

func ExpandMapToString(m map[string]interface{}) map[string]string

func MangoPrintTemplate

func MangoPrintTemplate(m interface{}) string

func PathExists

func PathExists(path string) bool

func ReportErr

func ReportErr(err error)

func StructToMap

func StructToMap(m interface{}) map[string]interface{}

Types

type Config

type Config struct {
	Token    string `yaml:"token"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	BaseUrl  string `yaml:"baseUrl"`
}

func ReadLocalConfig

func ReadLocalConfig() *Config

type Docker

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

func (*Docker) InspectImage

func (c *Docker) InspectImage(in string) *Image

func (*Docker) ListImages

func (c *Docker) ListImages() *Images

func (*Docker) NewClient

func (c *Docker) NewClient() *Docker

type Image

type Image struct {
	Item *docker.Image `json:"Item"`
}

type Images

type Images struct {
	Size int                 `json: "size"`
	List []*docker.APIImages `json:"List"`
}

Jump to

Keyboard shortcuts

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