libs

package
v0.0.0-...-f62e3b5 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2020 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Curl

type Curl struct {
}

Curl 物件參數

func (Curl) New

func (c Curl) New() *Curl

New 建構式

func (*Curl) Post

func (c *Curl) Post(url string, params []byte, header map[string]string) []byte

Post 進行HTTP POST

type Helper

type Helper struct{}

Helper 物件參數

func (*Helper) InArray

func (h *Helper) InArray(arr []string, str string) bool

InArray 於陣列中有對應之值

func (Helper) New

func (h Helper) New() *Helper

New 建構式

type MySQL

type MySQL struct {
	Conn *gorm.DB
}

MySQL 物件參數

func (*MySQL) GetAdater

func (m *MySQL) GetAdater() *gorm.DB

GetAdater 取得MySQL元件

func (MySQL) New

func (m MySQL) New() *MySQL

New 建構式

type Redis

type Redis struct {
	Client *redis.Client
}

Redis 物件參數

func (*Redis) Get

func (r *Redis) Get(key string) string

Get 取得Redis資料

func (Redis) New

func (r Redis) New(addr, password string, db int) *Redis

New 建構式

func (*Redis) Remove

func (r *Redis) Remove(key string) bool

Remove 移除Redis資料

func (*Redis) Set

func (r *Redis) Set(key, value string) bool

Set 設定Redis資料

type ResultObject

type ResultObject struct{}

ResultObject 物件參數

func (*ResultObject) Build

func (ro *ResultObject) Build(status int, message string) *dto.ResultObject

Build 製作成RO物件

func (*ResultObject) BuildJSON

func (ro *ResultObject) BuildJSON(status int, message string) string

BuildJSON 設定RO物件並回傳JSON

func (ResultObject) New

func (ro ResultObject) New() *ResultObject

New 建構式

type Zip

type Zip struct{}

Zip 物件參數

func (*Zip) Compress

func (z *Zip) Compress(files []string, dst string) int

Compress 壓縮檔案

func (Zip) New

func (z Zip) New() *Zip

New 建構式

Jump to

Keyboard shortcuts

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