Documentation ¶
Index ¶
- Constants
- func AppendFilePath(basePath string, fileOrFolder string) string
- func AppendFilePaths(basePath string, fileOrFolders ...string) string
- func ForceDeleteFolder(foldername string, loggerEntry *logrus.Entry) (err error)
- func GetReflectTypeOfStructObject(sampleModel interface{}) reflect.Type
- func MakeDirectoryHelper(destinationFolder string, loggerEntry *logrus.Entry) (err error)
- type ErrorWithCodeData
- type LogCapturer
- type SimpleUserData
Constants ¶
const OSPathSeparator = string(os.PathSeparator)
OSPathSeparator versi string dari os.PathSeparator
Variables ¶
This section is empty.
Functions ¶
func AppendFilePath ¶
AppendFilePath add file/ folder ke path. esensi nya base path bisa di akhiri dengan path separator. fungsi ini memastikan kalau misal not end with path separator, akan di tambahkan path separator. kalau sudah, tinggal gabung string saja <strong>basePath: <strong> folder awal untuk di tambahkan file atau folder
func AppendFilePaths ¶
AppendFilePaths versi ini dengan path berupa array. misal nested folder
func ForceDeleteFolder ¶
ForceDeleteFolder delete folder yang tidak kosong. paksa
func GetReflectTypeOfStructObject ¶
GetReflectTypeOfStructObject read actual object type. this function will scan for actual object type when wrapped as interface{}. actual object type could be determined
Types ¶
type ErrorWithCodeData ¶
type ErrorWithCodeData interface { error //GetErrorCode read error code GetErrorCode() string //GetRawError rawerror data GetRawError() error }
ErrorWithCodeData error with code
func ErrorWithCode ¶
func ErrorWithCode(errorMessage string, errorCode string) ErrorWithCodeData
ErrorWithCode generate error with code
func ErrorWithCodeAndRawError ¶
func ErrorWithCodeAndRawError(errorMessage string, errorCode string, err error) ErrorWithCodeData
ErrorWithCodeAndRawError generate error with raw error
type LogCapturer ¶
type LogCapturer interface {
Release()
}
LogCapturer reroutes testing.T log output
func CaptureLog ¶
func CaptureLog(t *testing.T) LogCapturer
CaptureLog redirects logrus output to testing.Log
type SimpleUserData ¶
type SimpleUserData struct { //ID internal id of user. if primary key is int32 ID int32 //UUID uuid dari user UUID string //Username username. ini berisi sama dengan UserUUID kalau misal anonymous Username string //RealName dari column real_name RealName string //Email dari column: email Email string //UserUUID dari column uuid UserUUID string //Phone kalau user dengan phone auth , ini akan di ambil dari phone1 Phone string }
SimpleUserData simple user data