utils

package
v0.0.0-...-a74fbde Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2017 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DbStructListToMapList

func DbStructListToMapList(s interface{}) (r []map[string]interface{})

DbStructListToMapList DB構造体リストからマップリストに変換する

func DbStructToMap

func DbStructToMap(s interface{}) map[string]interface{}

DbStructToMap DB構造体からマップに変換する

func DbValueToMap

func DbValueToMap(e reflect.Value) map[string]interface{}

DbValueToMap Value型をマップに変換する

func Decrypter

func Decrypter(s []byte) (string, error)

Decrypter 復号化する

func Encrypter

func Encrypter(s []byte) (string, error)

Encrypter 暗号化する

func ExistsFile

func ExistsFile(filename string) bool

ExistsFile ファイル存在する

func GetAppPath

func GetAppPath() (string, error)

GetAppPath アプリケーションパスを取得する

func GetArrayCombile

func GetArrayCombile(k []string, v []string) (map[string]string, error)

GetArrayCombile 配列をkeyと結合させる

func GetRandNum

func GetRandNum(n int) int

GetRandNum ランダム数を取得する

func GetRandString

func GetRandString(n int) string

GetRandString ランダムな文字列を取得する

func InStringArray

func InStringArray(str string, list []string) bool

InStringArray 文字列配列に含んでいる

func IntToEncryption

func IntToEncryption(i int) string

IntToEncryption 数値を暗号化する

func IsTest

func IsTest() bool

IsTest テスト環境か判定する

func Now

func Now() time.Time

Now 現在日時を取得する

func SetNow

func SetNow(n time.Time)

SetNow 現在日時を設定する

func SetTestRandNum

func SetTestRandNum(n int)

SetTestRandNum テストランダム数を設定する

func SetTestRandString

func SetTestRandString(s string)

SetTestRandString テストランダム文字列を設定する

func SrringToEncryption

func SrringToEncryption(s string) string

SrringToEncryption 文字列を暗号化する

func StringToDate

func StringToDate(s string) (time.Time, error)

StringToDate 日付に変換する

func StructListToMapList

func StructListToMapList(s interface{}) (r []map[string]interface{})

StructListToMapList 構造体リストからマップリストに変換する

func StructToMap

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

StructToMap 構造体からマップに変換する

func Urldecode

func Urldecode(s string) (string, error)

Urldecode URLデコードを取得する

func Urlencode

func Urlencode(s string) string

Urlencode URLエンコードを取得する

func ValueToMap

func ValueToMap(e reflect.Value) map[string]interface{}

ValueToMap Value型をマップに変換する

Types

This section is empty.

Directories

Path Synopsis
oauth

Jump to

Keyboard shortcuts

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