Documentation ¶
Index ¶
- type Utils
- func (util *Utils) Check(e error) error
- func (util *Utils) CheckEnvironment(path string) string
- func (util *Utils) CheckFile(path string) bool
- func (util *Utils) CheckTemplateFile(path string) (string, error)
- func (util *Utils) ConvertUnixTime(unixTime int64) time.Time
- func (util *Utils) CreateFile(path string) bool
- func (util *Utils) DeleteFile(path string) bool
- func (util *Utils) FileRemove(path string) error
- func (util *Utils) GenerateGetTable(headers []string, value []*mvccpb.KeyValue)
- func (util *Utils) GetCurrentPath() string
- func (util *Utils) LoadEnvirontment(path string) *entity.Environment
- func (util *Utils) LogFatal(word string, report interface{})
- func (util *Utils) LogInfo(word string, report interface{})
- func (util *Utils) MakeDirs(path string) error
- func (util *Utils) ParseJSON(data string) (map[string]interface{}, error)
- func (util *Utils) ParsingYAML(path string) (*entity.TemplatesModels, error)
- func (util *Utils) ReadFile(path string, perm os.FileMode) string
- func (util *Utils) ReadHome() string
- func (util *Utils) WriteFile(path string, value string, perm os.FileMode) bool
- type UtilsInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Utils ¶
type Utils struct{}
Utils ...
func (*Utils) CheckEnvironment ¶
CheckEnvironment function check default env @path : string return bool, error
func (*Utils) CheckTemplateFile ¶
CheckTemplateFile check template path @argsFile: string
func (*Utils) ConvertUnixTime ¶
ConvertUnixTime ... @unixTime: int64
func (*Utils) CreateFile ¶
CreateFile function create file @path : string return bool
func (*Utils) FileRemove ¶
FileRemove Remove Files @path : string return error
func (*Utils) GenerateGetTable ¶
GenerateGetTable ...
func (*Utils) GetCurrentPath ¶
GetCurrentPath get current path return string
func (*Utils) LoadEnvirontment ¶
func (util *Utils) LoadEnvirontment(path string) *entity.Environment
LoadEnvirontment load environment config @path : string
func (*Utils) ParseJSON ¶
ParseJSON function conver json string to object @data: string return map[string]interface{}, error
func (*Utils) ParsingYAML ¶
func (util *Utils) ParsingYAML(path string) (*entity.TemplatesModels, error)
ParsingYAML ...
type UtilsInterface ¶
type UtilsInterface interface { Check(e error) error LogInfo(word string, report interface{}) LogFatal(word string, report interface{}) ConvertUnixTime(unixTime int64) time.Time CheckFile(path string) bool MakeDirs(path string) error FileRemove(path string) error CreateFile(path string) bool WriteFile(path string, value string, perm os.FileMode) bool ReadFile(path string, perm os.FileMode) string DeleteFile(path string) bool ReadHome() string GetCurrentPath() string CheckEnvironment(path string) string LoadEnvirontment(path string) *entity.Environment ParseJSON(data string) (map[string]interface{}, error) CheckTemplateFile(path string) (string, error) ParsingYAML(path string) (*entity.TemplatesModels, error) GenerateGetTable(headers []string, value []*mvccpb.KeyValue) }
UtilsInterface ..
Click to show internal directories.
Click to hide internal directories.