utils

package
v0.0.0-...-73a0f92 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(origin, prefix, dest string) error

Compress 压缩

func DeCompress

func DeCompress(tarFile, dest string) error

DeCompress 解压

func GetAvailableIPAddress

func GetAvailableIPAddress() ([]string, error)

GetAvailableIPAddress 获取本地可用IP地址

Types

type Conf

type Conf struct {
	Name   string  `yaml:"name"`
	Port   int     `yaml:"port"`
	Server *Server `yaml:"server"`
}

Conf client配置

func (*Conf) GetConf

func (c *Conf) GetConf(filePath string) *Conf

GetConf 读取配置

func (*Conf) Validate

func (c *Conf) Validate() bool

Validate 校验配置

type Server

type Server struct {
	IP   string `yaml:"ip"`
	Port int    `yaml:"port"`
}

Server 配置

Jump to

Keyboard shortcuts

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