utils

package
v0.0.0-2415 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const SmeCustomerType = "sme"

Variables

This section is empty.

Functions

func CreateMultipartReq

func CreateMultipartReq(payload map[string]string, targetURL string) (*http.Request, error)

func CreatePostFormReq

func CreatePostFormReq(payload map[string]string, targetURL string) (*http.Request, error)

func DecodeBody

func DecodeBody(body io.ReadCloser, contentType string) (string, error)

func DumpToFile

func DumpToFile(load []byte) error

func GetAllEbankURLs

func GetAllEbankURLs() ebankKasikornURLs

func GetAllOnlineKasikornURLs

func GetAllOnlineKasikornURLs() onlineKasikornURLs

func GetFieldNames

func GetFieldNames() postFieldNames

func GetFieldValues

func GetFieldValues() postFieldValues

func GetRegexpSlashedDate

func GetRegexpSlashedDate() *regexp.Regexp

func GetRegexpSlashedDateAndTime

func GetRegexpSlashedDateAndTime() *regexp.Regexp

func GetSixMonthsFromNowCelinig

func GetSixMonthsFromNowCelinig(now time.Time) time.Time

func GetThailandTimeZone

func GetThailandTimeZone() *time.Location

func PlainDateStringToThaiTime

func PlainDateStringToThaiTime(plainDate string) (time.Time, error)

func PlainDateTimeStringToThaiTime

func PlainDateTimeStringToThaiTime(plainDate string) (time.Time, error)

Types

type KasikornDate

type KasikornDate struct {
	Year int `json:"year"`
	Day  int `json:"day"`
}

KasikornDate represents a calendar day in Thailand, i.e. a date without taking into account the time of the day, and meaning within Bangkok time. 1st of January means Day=1.

func (KasikornDate) ToChunks

func (kasikornDate KasikornDate) ToChunks() (string, string, string)

func (KasikornDate) ToTimeDate

func (kasikornDate KasikornDate) ToTimeDate() time.Time

type Period

type Period struct {
	From time.Time
	To   time.Time
}

Jump to

Keyboard shortcuts

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