base

package module
v0.0.0-...-ecba7da Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: GPL-3.0 Imports: 39 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DailyDecodingQuota   = 100
	FloatPrecisionFactor = 0.0000001
)
View Source
const (
	PAGE_ROWS    = 20
	BLANK_CUTSET = "\r\n\t "

	DEFAULT_STRING_SIZE = "255"
	DEFAULT_IPV4_SIZE   = "16"
	DEFAULT_IPV6_SIZE   = "40"
	DEFAULT_DOTIDS_SIZE = "80"
	ZERO_TIME           = "0000-01-01 00:00:00"
)
View Source
const (
	INITIAL_STATE            = "under_deployment"
	SETADMINISTRATOR_STATE   = "welcome"
	SUPPORTEDLANGUAGES_STATE = "language"
	SETDBMS_STATE            = "dbms"
	OPENREGISTRATION_STATE   = "registration"
	SETSMTP_STATE            = "smtp"
	INSERVICE_STATE          = "inservice"
)

setup wizard situation

View Source
const (
	Usertype_customer      = 1
	Usertype_partner       = 2
	Usertype_staffer       = 8
	Usertype_director      = 9
	Usertype_master        = 99
	Usertype_administrator = 100
)
View Source
const (
	RESOLUTION_RATIO = 72.0
	MM_PER_INCH      = 25.4
)
View Source
const (
	SQLite              = 1
	MySQL               = 2
	Oracle              = 3
	DB_Connecting       = 1
	DB_Initializing     = 2
	DB_Loading          = 3
	DB_Troubleshooting  = 4
	DB_Undermaintenance = 5
	DB_Running          = 6
	DB_Stop             = 9
)
View Source
const (
	IDbase64Table = "0DSAC8EFG7HIBKJ~LMNPQROTU4g6XWY9VZbd.aceh1fiklmnt5opqrjsvwxuy2z3"
)

Variables

View Source
var APIretryChannel chan int
View Source
var AccessLogger, VisitLogger, ErrorLogger *log.Logger
View Source
var AextraChannel chan int
View Source
var BLANK001C = '\u001c'
View Source
var BLANK001D = '\u001d'
View Source
var BLANK001E = '\u001e'
View Source
var BLANK001F = '\u001f'
View Source
var BOM []byte = []byte{'\xEF', '\xBB', '\xBF'}
View Source
var BatchemailChannel chan int
View Source
var BextraChannel chan int
View Source
var BizopenedChannel chan int
View Source
var C2A0 []byte = []byte{'\xC2', '\xA0'}
View Source
var CacheDone chan bool
View Source
var CextraChannel chan int
View Source
var ControlCenterAccountChannel chan string
View Source
var DB_cyclenode int
View Source
var DB_database string
View Source
var DB_type int //sqlite,mysql,oracle,sqlserver
View Source
var DDSM2_privateKeyPem string
View Source
var DDSM2_publicKeyPem string
View Source
var DataexportCommandChannel chan string
View Source
var DextraChannel chan int
View Source
var DistributeChannel chan int
View Source
var EextraChannel chan int
View Source
var ExitChannel chan os.Signal
View Source
var FextraChannel chan int
View Source
var HTTP_port string
View Source
var HeartbeatChannel chan int
View Source
var IdeographicSpace []byte = []byte{'\xE3', '\x80', '\x80'} //227,128,128  \u3000
View Source
var IdeographicSpaceES string = " " //Escape Sequence
View Source
var IdeographicSpaceRUNE rune = '\u3000'
View Source
var ImportChannel chan int
View Source
var InspectionChannel chan int
View Source
var LabelingChannel chan int /*starting batch labeling tasks at lowest traffic point.*/
View Source
var MakeLicenseChannel chan MakeLicenseT
View Source
var MapCurrency map[string]CurrencyT
View Source
var NEWLINE byte = '\n'
View Source
var NEWPAGE byte = '\f'
View Source
var NoticeChannel chan SysNoticeT
View Source
var ParticularSpaceRUNE []rune = []rune{'\u3000', '\u0002', '\u0007', '\u0008', '\u000b',
	'\u000c', '\u00a0', '\u001b', '\u001c', '\u001d', '\u001e', '\u001f', '\u2006',
	'\u200d', '\u200e', '\u200f', '\u2028', '\u2029',
	'\uc2a0', '\ufeff'}
View Source
var PickupChannel chan JsonpickupT
View Source
var PumpinChannel chan int
View Source
var PumpoutChannel chan int
View Source
var RETURN byte = '\r'
View Source
var SafegovcnChannel chan int
View Source
var TAB rune = '\t'

\t 制表符

View Source
var TodayDecodingNumber = 0
View Source
var TotalChannel chan int
View Source
var TxtImgChannel chan string
View Source
var U0002 rune = '\u0002'
View Source
var U0008 rune = '\u0008' //Backspace
View Source
var U000a rune = '\u000a' //换行符
View Source
var U000c rune = '\u000c' //换页符
View Source
var U000d rune = '\u000d' //回车符
View Source
var U00a0 rune = '\u00a0' //不换行符
View Source
var U2006 rune = '\u2006' //空格符
View Source
var U200d rune = '\u200d' //零宽连接符
View Source
var U200e rune = '\u200e' //从左至右书写标记
View Source
var U200f rune = '\u200f' //从右至左书写标记
View Source
var U2028 rune = '\u2028' //行分隔符
View Source
var U2029 rune = '\u2029' //行分隔符
View Source
var Ufeff rune = '\ufeff' //字节顺序标记
View Source
var UpgradeChannel chan int
View Source
var VTAB rune = '\u000b'

Functions

func AbsoluteHyper

func AbsoluteHyper(baseUrl, hyperlink string) string

AbsoluteHyper("www.abc.com/cake/a.php?p=1&g=2","../index.php") "b.php"

func AcceptLanguageCodes

func AcceptLanguageCodes() (codes []string)

func AcceptLanguageSet

func AcceptLanguageSet() (ids, jsontxt string)

func AddMonth

func AddMonth(year, month, n int) (y, m int)

func AddOperation

func AddOperation(r *http.Request, user_id int64, entity_id int, instance_id int64, action, brief string)

func AddSlashes

func AddSlashes(str string) string

func AddThisYearWorkdays

func AddThisYearWorkdays() (e error)

func AddWeekdays

func AddWeekdays()

func AddYearWorkdays

func AddYearWorkdays(year int) (e error)

func Aggregate

func Aggregate(identifier, subentity, target, definition string, mapQuery map[string]string, limit string) (r_val string, e error)

count(1),sum(amount)

func AllLanguages

func AllLanguages() (languages []simplelanguageT)

func AppendFile

func AppendFile(mainfile, appendfile string) (err error)

func Backquote

func Backquote(str string) (ss string)

func Base64ParamDecode

func Base64ParamDecode(data string) (b []byte, e error)

func BaseCurrency_code

func BaseCurrency_code() (code string)

func BaseCurrency_id

func BaseCurrency_id() (id string)

func BaseLanguage_id

func BaseLanguage_id() (id string)

func Baselanguage_code

func Baselanguage_code() (code string)

func BetweenHeadTail

func BetweenHeadTail(b []byte, head, tail string) (dt string)

func Briefing

func Briefing(message string, max int) (brief string)

func ByteFormat

func ByteFormat(bytes int64) (ss string)

func CalcColumnWidth

func CalcColumnWidth(ncols int) (colwidths []string)

func CalcCommission

func CalcCommission(cash_pay float64) (commission float64)

func CalcPercent

func CalcPercent(str string, precision int) (ss string)

6.00% ---> 0.06

func CellQuotation

func CellQuotation(str string) (ss string)

use in meta .table file

func CharType

func CharType(ch rune) (ty int)

func CheckFileSignature

func CheckFileSignature(filename string) (e error)

filename format: identifier_a1bae84094d454870b0012facd6e822f.ddat

func CleanDirBySuffix

func CleanDirBySuffix(path, suffix string) (n int)

func Clean_dir

func Clean_dir(path string, beforehours int) (n int)

func Clientlanguage_id

func Clientlanguage_id(r *http.Request) (id string)

func CombineRoadmap

func CombineRoadmap(identifier, subentities string) (roadmap []string)

productcategory,property

func CompleteSuffix

func CompleteSuffix(scene, suffix string) (scenex string)

func ConfigurationKeyGen

func ConfigurationKeyGen(salt int64) (keys []int)

func ContainsBLANK001C

func ContainsBLANK001C(ss string) (flag bool)

func ContainsBLANK001D

func ContainsBLANK001D(ss string) (flag bool)

func ContainsBLANK001E

func ContainsBLANK001E(ss string) (flag bool)

func ContainsBLANK001F

func ContainsBLANK001F(ss string) (flag bool)

func ContainsNEWLINE

func ContainsNEWLINE(ss string) (flag bool)

func ContainsNEWPAGE

func ContainsNEWPAGE(ss string) (flag bool)

func ContainsRETURN

func ContainsRETURN(ss string) (flag bool)

func ContainsTAB

func ContainsTAB(ss string) (flag bool)

func ContainsU00a0

func ContainsU00a0(ss string) (flag bool)

func ContainsU000a

func ContainsU000a(ss string) (flag bool)

func ContainsU000c

func ContainsU000c(ss string) (flag bool)

func ContainsU000d

func ContainsU000d(ss string) (flag bool)

func ContainsU0002

func ContainsU0002(ss string) (flag bool)

func ContainsU0008

func ContainsU0008(ss string) (flag bool)

func ContainsU200d

func ContainsU200d(ss string) (flag bool)

func ContainsU200e

func ContainsU200e(ss string) (flag bool)

func ContainsU200f

func ContainsU200f(ss string) (flag bool)

func ContainsU2006

func ContainsU2006(ss string) (flag bool)

func ContainsU2028

func ContainsU2028(ss string) (flag bool)

func ContainsU2029

func ContainsU2029(ss string) (flag bool)

func ContainsUfeff

func ContainsUfeff(ss string) (flag bool)

func ContainsVTAB

func ContainsVTAB(ss string) (flag bool)

func CopyFile

func CopyFile(src, dst string) (int64, error)

func CountryPreferred

func CountryPreferred(countrycode string) (country_id, preferredlanguage_id, preferredcurrency_id, preferreddateformat_id, preferredtimeformat_id int)

func CreateSubdirs

func CreateSubdirs(dirs string)

func Currency_code

func Currency_code(id string) (code string)

func Currency_id

func Currency_id(currency string) string

func DB

func DB() (d_b *sql.DB)

func DB_in_Connecting

func DB_in_Connecting()

func DB_in_Initializing

func DB_in_Initializing()

func DB_in_Loading

func DB_in_Loading()

func DB_in_Running

func DB_in_Running()

func DB_in_Stop

func DB_in_Stop()

func DB_in_Troubleshooting

func DB_in_Troubleshooting()

func DB_in_Undermaintenance

func DB_in_Undermaintenance()

func DBclose

func DBclose()

func DBconnect

func DBconnect() (d_b *sql.DB, err error)

func DBlaunch

func DBlaunch() (err error)

func DBname

func DBname() (database string)

func DBtables

func DBtables() (tables []tableT, err error)

func DBtype

func DBtype(ss string) (dbtype int)

func DailyDecodingQuotaStr

func DailyDecodingQuotaStr() (quota string)

func DateTimeLayout

func DateTimeLayout(ymd_hns string) (format string)

yyyy=2006, mmmm=January, MMM=Jan mm=01 dd=02 m=1 d=2 HH=15 hh=03 nn=04 ss=05 yyyy-mm-dd,2006-01-02 yyyy/mm/dd,2006/01/02 dd-mm-yyyy,02-01-2006 dd/mm/yyyy,02/01/2006 dd mmmm yyyy,02 January 2006 dd.mm.yyyy,02.01.2006 d.m.yyyy,2.1.2006 mm-dd-yyyy,01-02-2006 mm/dd/yyyy,01/02/2006 `MMM dd, yyyy`,`Jan 02, 2006` `mmmm dd, yyyy`,`January 02, 2006` ---------------------------------- HH:nn:ss,15:04:05 HH:nn,15:04 hh:nn:ss am/pm,03:04:05 pm hh:nn am/pm,03:04 pm

func DaysBetweenTwoDate

func DaysBetweenTwoDate(dateStart, dateEnd time.Time) (days int)

func Decode

func Decode(scheme, str string) (ss string)

func DecodeByKey

func DecodeByKey(src string, keys []int) (sr string)

func DecodeID

func DecodeID(src string) (id int64)

func DecodeParam

func DecodeParam(src string) (sr string)

func DeepdataKeys

func DeepdataKeys() (keys []int)

func DoDBconnect

func DoDBconnect(language_id, db_type, db_file, db_host, db_port, db_user, db_pswd, db_database string) (d_b *sql.DB, err error)

func EchoTxt

func EchoTxt(txt string) (echo string)

func EmptyDatabase

func EmptyDatabase() (err error)

func Emptytable

func Emptytable(tablename string) (err error)

func Encode

func Encode(scheme, str string) (ss string)

func EncodeByKey

func EncodeByKey(src string, keys []int) (sr string)

func EncodeID

func EncodeID(id int64) (sr string)

func EncodeParam

func EncodeParam(src string) (sr string)

func ExCurrency

func ExCurrency(amount float64, from_currency, to_currency string) (amt float64)

func ExPrice

func ExPrice(currency_code string, cny_price float64) (s_left, s_right string, price float64)

func ExchangeRate

func ExchangeRate(currency string) (rate float64)

func ExeExt

func ExeExt() (ext string)

func ExistTables

func ExistTables() (tables int)

func Expiration

func Expiration() (flag bool)

func ExtractCNmobile

func ExtractCNmobile(str string) (mobile string)

func ExtractCNphone

func ExtractCNphone(str string) (phone string)

func Extractemail

func Extractemail(str string) (email string)

func FileBase64ToString

func FileBase64ToString(filename string) string

func FileMD5

func FileMD5(filename string) (md5str string)

func Filemodtime

func Filemodtime(filename string) (tm time.Time)

func Filesize

func Filesize(filename string) (size int64)

func FirstUpper

func FirstUpper(s string) string

func FirstWords

func FirstWords(str string, maxBytes int) (gist string)

func FloatEqual

func FloatEqual(a, b string) (flag bool)

func FloatLessthan

func FloatLessthan(a, b string) (flag bool)

func FullWordSlice

func FullWordSlice(str string) (wordss []string)

func FulltextQueryExpression

func FulltextQueryExpression(q string) (expression string)

func GetAccessLog

func GetAccessLog() *log.Logger

func GetActualLanguageVersionText

func GetActualLanguageVersionText(data, language, version_separator string) (str string)

func GetAdministratorAuthority

func GetAdministratorAuthority() (authority string)

func GetBack2DBMS_state

func GetBack2DBMS_state(dir_run string) (err error)

func GetConfigurationLanguage

func GetConfigurationLanguage(key, language_id string) (value string)

func GetConfigurationMultiple

func GetConfigurationMultiple(key string) (value string)

func GetConfigurationSimple

func GetConfigurationSimple(key string) (value string)

func GetCookieStore

func GetCookieStore() (cs *sessions.CookieStore)

func GetDBconnections

func GetDBconnections() (db_connections []dbconnectionT, onlineParam map[string]string)

func GetDBparameter

func GetDBparameter(key, value string) (db_connection, db_type, db_file, db_host, db_port, db_user, db_pswd, db_database string)

func GetDir

func GetDir(soft_ware string) (exeDir, exeFile, runDir, resDir string)

func GetErrorLog

func GetErrorLog() *log.Logger

func GetItemName

func GetItemName(items string, itemcode int) (itemname string)

func GetLanguageVersionText

func GetLanguageVersionText(data, base_language, language, version_separator string) (str string)

func GetLanguageids

func GetLanguageids() (ids []string)

func GetLanguages

func GetLanguages() (langs []string)

func GetLogDir

func GetLogDir() (ss string)

func GetMacAddrs

func GetMacAddrs() (macAddrs []string)

func GetNsegment

func GetNsegment(str string, n int) (segment []string)

func GetPreferredMAC

func GetPreferredMAC() (mac string)

func GetResDir

func GetResDir() (ss string)

func GetRoadmapids

func GetRoadmapids(identifier, subentity string, instance_id int64) (roadmapids []int64)

func GetRunDir

func GetRunDir() (ss string)

func GetSoftware

func GetSoftware() string

func GetSystemUserID

func GetSystemUserID() string

func GetTempDir

func GetTempDir() (ss string)

func GetUploadsDir

func GetUploadsDir() (ss string)

func GetUsertype

func GetUsertype(usertype_id int) (usertype string)

func GetV

func GetV(key string) (val string)

func GetVersion

func GetVersion() (ss string)

func GetVisitLog

func GetVisitLog() *log.Logger

func GetWidgetDependency

func GetWidgetDependency(widget string) (dependencies []string)

func GetWidgetDependencyNames

func GetWidgetDependencyNames(widget string) (dependencies []string)

func GetWidgetJS

func GetWidgetJS(widget string) (jsjs []string)

func Getorgancode

func Getorgancode() string

func Getorganname

func Getorganname() string

func Granularity

func Granularity(q_in, q_granularity string) (mapQ map[string]string)

q_in: `{"retailerid":0,"time_created":"2025-04-11"}` q_granularity: `{"time_created":"day"}` mapQ: {"retailerid":0,"time_created":"[2025-04-11,2025-04-12)"}

func HasReadWritePermission

func HasReadWritePermission(spath string) (flag bool)

func Hasright

func Hasright(memberlevel string) (flag bool)

func HumanizedTime

func HumanizedTime(tm time.Time, dateformat, timeformat, clientlanguage_id string) (dt string)

1分钟之内<60秒 刚刚 just now 1小时之内<3600秒 x分钟前 x minutes ago 今天24点之前 今天23:59 23:59 today 昨天 昨天00:00 00:00 yesterday 今年 mm-dd 按账户偏好展现(省略年份) 去年及以前 yyyy-mm-dd 按账户偏好展现 TIP_JUST = 刚刚 TIP_XM_AGO = %d 几分钟前 TIP_HN_TODAY = 今天 HH:nn TIP_HN_YESTERDAY = 昨天 HH:nn

func Iconhtml

func Iconhtml(icon string) (iconhtml string)

func IllustrationAbsolutePath

func IllustrationAbsolutePath(ipath string) (apath string)

func IllustrationPath

func IllustrationPath() (apath string)

func ImagePixelsWidthHeight

func ImagePixelsWidthHeight(filename string) (width, height int)

func ImageWidthHeight

func ImageWidthHeight(filename string) (width, height float64)

func ImgPath

func ImgPath() (apath string)

func In_array

func In_array(val string, array []string) (exists bool, index int)

func In_arrayint

func In_arrayint(val int, array []int) (exists bool, index int)

func In_arrayint64

func In_arrayint64(val int64, array []int64) (exists bool, index int)

func IncCounter

func IncCounter(itemkey string) (e error)

func InitSysLang

func InitSysLang()

func Instance2PropertyRetrieve

func Instance2PropertyRetrieve(tablename, property1, property2 string, instance_id int64) (thevalue1, thevalue2 string)

func Instance3PropertyRetrieve

func Instance3PropertyRetrieve(tablename, property1, property2, property3 string, instance_id int64) (thevalue1, thevalue2, thevalue3 string)

func Instance4PropertyRetrieve

func Instance4PropertyRetrieve(tablename, property1, property2, property3, property4 string, instance_id int64) (thevalue1, thevalue2, thevalue3, thevalue4 string)

func InstanceCount

func InstanceCount(asql string) (count int64)

func InstanceCountEx

func InstanceCountEx(tablename, property_name, property_value string) (count int64)

func InstanceCount_int

func InstanceCount_int(objectidentifier, property_name string, property_value int) (count int)

int property

func InstanceIDs

func InstanceIDs(tablename, property_name, property_value string) (iids []int64)

func InstanceIDsAnB

func InstanceIDsAnB(tablename, property_name, property_value, extra_aproperty, extra_bproperty string) (iids []int64, avals, bvals []string)

func InstanceIDsEx

func InstanceIDsEx(tablename, property_name, property_value, extra_property string, limit int) (iids []int64, vals []string)

func InstanceMultiPropertiesRetrieve

func InstanceMultiPropertiesRetrieve(tablename, properties string, instance_id int64) (values []string)

properties: abc,def,ghi

func InstancePropertyRetrieve

func InstancePropertyRetrieve(tablename, property string, instance_id int64) (thevalue string)

func InstancePropertyUpdate

func InstancePropertyUpdate(tablename, extra_property, extra_value string, instance_id int64) (e error)

func InstancePropertyUpdateEx

func InstancePropertyUpdateEx(tablename, unique_property, unique_value, extra_property, extra_value string) (e error)

func InstanceRetrieve

func InstanceRetrieve(tablename, unique_property, unique_value string) (instance_id int64)

func InstanceRetrieveEx

func InstanceRetrieveEx(tablename, unique_property, unique_value, extra_property string) (instance_id int64, extra_value string)

func Int2str

func Int2str(i int) (ss string)

func Int64ArrayJoin

func Int64ArrayJoin(ids []int64, separator string) (txt string)

func Int64str

func Int64str(i int64) (ss string)

func IntMapToJson

func IntMapToJson(param map[int]int) (txt string)

func IsAdministratorOpened

func IsAdministratorOpened() (opened bool)

func IsAtomChar

func IsAtomChar(ch rune) bool

func IsBlackIP

func IsBlackIP(r *http.Request) bool

func IsDigit

func IsDigit(ch byte) bool

func IsDigital

func IsDigital(str string) bool

func IsExists

func IsExists(path string) bool

func IsInServiceState

func IsInServiceState() (flag bool)

func IsNumber

func IsNumber(str string) bool

func IsParticularSpace

func IsParticularSpace(r rune) (flag bool)

func IsTime19

func IsTime19(ss string) (flag bool)

func IsWeakpassword

func IsWeakpassword(password string) bool

func IsZero

func IsZero(tm time.Time) (flag bool)

func Is_DB_in_Running

func Is_DB_in_Running() bool

func Is_DB_in_Troubleshooting

func Is_DB_in_Troubleshooting() bool

func Issuer

func Issuer() (i string)

func Issuerdomain

func Issuerdomain() (id string)

func Issueremail

func Issueremail() (ie string)

func KV2expression

func KV2expression(k, v, valtype, tblPrefix string) (expression string)

{"id": 100, "time_created": "[2025-01-01,2025-01-07)", "amount": "<100", "stock": ">200" } tblPrefix: "a."

func KeyGen

func KeyGen(mac_seed, salt int64) (keys []int)

func LanguageLabel

func LanguageLabel(data, language string) (str string)

func Language_Currency

func Language_Currency(id string) (curr string)

func Language_code

func Language_code(id string) (code string)

func Language_flag

func Language_flag(id string) (flag string)

func Language_id

func Language_id(lang string) string

func Language_label

func Language_label(data, language_id string) (str string)

func Language_tag

func Language_tag(id string) (tag string)

func LeadingCount

func LeadingCount(ss string, leading rune) (count int)

func LiveDBconnection

func LiveDBconnection(signature string) (err error)

func LoadConfigure

func LoadConfigure(filename string) map[string]string

func LoadEncodedConfigure

func LoadEncodedConfigure(filename string) map[string]string

func LoadMetadata

func LoadMetadata()

func LoadOrganfile

func LoadOrganfile() (orgId, orgCode, orgName, orgType, orgGateway, orgEnv, tenantCode string)

func Loadwidget

func Loadwidget() (err error)

func LoginRedirect

func LoginRedirect(w http.ResponseWriter, r *http.Request)

func MacKeyGen

func MacKeyGen(salt int64) (keys []int)

func MakeDir

func MakeDir(dir string)

func Manageremail

func Manageremail() (me string)

func MatchSignature

func MatchSignature() (flag bool, err error)

func Membership

func Membership() (ms string)

func MergeDependency

func MergeDependency(all *([]string), add []string)

func MergeStringArray

func MergeStringArray(all *([]string), add []string)

func Millisecond2str19

func Millisecond2str19(millisecond int64) string

func Millisecond2time

func Millisecond2time(millisecond int64) time.Time

time converion

func Min

func Min(x, y int) int

func MobileQueryExpression

func MobileQueryExpression(mobile string) (expression string)

func MobileSlice

func MobileSlice(mobile string) string

func MySQLEscape

func MySQLEscape(ss string) (rr string)

func NewCookieStore

func NewCookieStore(software string) (cs *sessions.CookieStore)

func NextDay

func NextDay(theday string) (next string)

func NoRowsError

func NoRowsError(e error) (flag bool)

func Now2MD5

func Now2MD5() string

func NowSeedMD5

func NowSeedMD5(seed string) string

func NullTime

func NullTime(v string) bool

func Padleft

func Padleft(num int64, width int, padchar byte) (ss string)

func Pages

func Pages(nrows, pagesize int) (pages int)

func Paging

func Paging(nrows, pagesize int, cur_page string) (ipage, pages int)

func Parentids

func Parentids(tablename string, iid int) (parents []string)

func Pixel2unit

func Pixel2unit(pixel int) (unit float64)

func PreferredLanguage

func PreferredLanguage(al []string) (lang string)

func PswdValid

func PswdValid(password string) bool

func QuotationMethod

func QuotationMethod(code string) (method string)

func QuoteSegment

func QuoteSegment(str, separator, quote string) string

func ReadAdminConfiguration

func ReadAdminConfiguration()

func ReadBaselanguageConfigurationFromFile

func ReadBaselanguageConfigurationFromFile() (base_language string)

func ReadConfiguration

func ReadConfiguration() (err error)

func ReadCurrency

func ReadCurrency() (err error)

func ReadDirBySuffix

func ReadDirBySuffix(path, suffix string) (files []string)

func ReadDualLogin

func ReadDualLogin(r *http.Request, cs *sessions.CookieStore) (signed bool, user_id, username string, user_type int)

func ReadFileVariables

func ReadFileVariables(filename, language string) (mapVar map[string]string)

func ReadIPblacklist

func ReadIPblacklist() (err error)

func ReadLang

func ReadLang() (err error)

func ReadLanguageConfigurationFromFile

func ReadLanguageConfigurationFromFile() (accept_languages, language_tags string)

func ReadLogin

func ReadLogin(r *http.Request, cs *sessions.CookieStore) (signed bool, user_name, email_address string, user_id, manager_id, superior_id int64, active, user_type int)

func ReadManagerLogin

func ReadManagerLogin(r *http.Request, cs *sessions.CookieStore) (signed bool, user_name string, user_type int)

func ReadNSQL

func ReadNSQL(filename string, ipos, needs int) (sqltxtt, commentt []string, nextpos int, err error)

func ReadOneRow

func ReadOneRow(asql, groupby string, nproperties int, instance_id int64) (vals []sql.NullString, err error, n int)

func ReadOneSQL

func ReadOneSQL(filename string, ipos int) (sqltxt, comment string, nextpos int, err error)

func ReadOrgchart

func ReadOrgchart(r *http.Request, cs *sessions.CookieStore) (signed bool, orgchart_id int, orgchart_dotids string)

func ReadUsertype

func ReadUsertype() (err error)

func RecordMAC

func RecordMAC() (mac string)

func RecordUserIP

func RecordUserIP(db *sql.DB, user_id, ipaddress int64)

func RectifyCurrency

func RectifyCurrency(num string) (ss string)

func RectifyCurrencyInText

func RectifyCurrencyInText(ss string) (tt string)

"1,256,850.00 元 *\n* 1.3245000 万元 (\n) 456.00 (万元)"

func RectifyFilename

func RectifyFilename(ss string) (filename string)

func RectifyQuantity

func RectifyQuantity(num string) (ss string)

func RectifyQuantityInText

func RectifyQuantityInText(ss string) (tt string)

"1,256,850.00 *\n* 1.3245000 (\n) 456.00 "

func RectifyWHInText

func RectifyWHInText(ss string) (tt string)

"a[2019] 123号 tty【2013】345 号"

func RectifyWenHao

func RectifyWenHao(ss string) (tt string)

func RemoveDBconnection

func RemoveDBconnection(signature string) (err error)

func ReplaceBLANK001C

func ReplaceBLANK001C(ss string) string

func ReplaceBLANK001D

func ReplaceBLANK001D(ss string) string

func ReplaceBLANK001E

func ReplaceBLANK001E(ss string) string

func ReplaceBLANK001F

func ReplaceBLANK001F(ss string) string

func ReplaceIdeographicSpace

func ReplaceIdeographicSpace(ss string) string

func ReplaceNBSP

func ReplaceNBSP(ss string) string

func ReplaceNEWLINE

func ReplaceNEWLINE(ss string) string

func ReplaceNEWPAGE

func ReplaceNEWPAGE(ss string) string

func ReplaceParticularSpace

func ReplaceParticularSpace(ss string) (rr string)

func ReplaceRETURN

func ReplaceRETURN(ss string) string

func ReplaceTAB

func ReplaceTAB(ss string) string

func ReplaceU00a0

func ReplaceU00a0(ss string) string

func ReplaceU000a

func ReplaceU000a(ss string) string

func ReplaceU000c

func ReplaceU000c(ss string) string

func ReplaceU000d

func ReplaceU000d(ss string) string

func ReplaceU0002

func ReplaceU0002(ss string) string

func ReplaceU0008

func ReplaceU0008(ss string) string

func ReplaceU200d

func ReplaceU200d(ss string) string

func ReplaceU200e

func ReplaceU200e(ss string) string

func ReplaceU200f

func ReplaceU200f(ss string) string

func ReplaceU2006

func ReplaceU2006(ss string) string

func ReplaceU2028

func ReplaceU2028(ss string) string

func ReplaceU2029

func ReplaceU2029(ss string) string

func ReplaceUfeff

func ReplaceUfeff(ss string) string

func ReplaceVTAB

func ReplaceVTAB(ss string) string

func RetrieveCounter

func RetrieveCounter(itemkey string) (val int)

func ReverseStr

func ReverseStr(s string) string

func RightInt

func RightInt(ss string) int

func RightSituation

func RightSituation(dir_run string) (err error)

func RmvInstanceRecursively

func RmvInstanceRecursively(object_identifier string, instance_id int64) (nn int)

func Round

func Round(val float64) int

func SQL_CRLF

func SQL_CRLF() (ss string)

func SQL_LF

func SQL_LF() (ss string)

func SQL_Ymd2date

func SQL_Ymd2date(strfield string) (ss string)

func SQL_beforenow

func SQL_beforenow(interval string) (ss string)

func SQL_concat

func SQL_concat(abc ...string) (ss string)

func SQL_concat_column

func SQL_concat_column(alias, column string) (ss string)

func SQL_dateadd

func SQL_dateadd(field, interval string) (ss string)

NNN day/hour/minute/second/month/year

func SQL_datediff

func SQL_datediff(fielda, fieldb string) (ss string)

fieldname: "time_created" or constant: "'2023-06-16 12:12:12'"

func SQL_dateformat19

func SQL_dateformat19(field string) (ss string)

func SQL_dateformatYmd

func SQL_dateformatYmd(field string) (ss string)

func SQL_datesub

func SQL_datesub(field, interval string) (ss string)

NNN day/hour/minute/second/month/year

func SQL_default

func SQL_default(valtype string) (str string)

func SQL_dropindex

func SQL_dropindex(idxname, tablename string) (err error)

func SQL_emptytable

func SQL_emptytable(tablename string) (err error)

func SQL_escape

func SQL_escape(ss string) (rr string)

func SQL_fromdual

func SQL_fromdual() (fd string)

func SQL_groupconcat

func SQL_groupconcat(field, separator, orderby string) (ss string)

func SQL_left

func SQL_left(field string, n int) (ss string)

func SQL_limitN

func SQL_limitN(n int) (ss string)

func SQL_now

func SQL_now() (now string)

func SQL_pagelimit

func SQL_pagelimit(ipage int) (ss string)

func SQL_pagelimitN

func SQL_pagelimitN(ipage, pagesize int) (ss string)

func SQL_timedefault

func SQL_timedefault() (ss string)

func SQL_timeformat19

func SQL_timeformat19(tm time.Time) (ss string)

func SQL_unixtimestamp

func SQL_unixtimestamp(field string) (ss string)

func SQL_value

func SQL_value(valtype, val string) (str string)

func SQLiteEscape

func SQLiteEscape(ss string) (rr string)

func SaveDBconnection

func SaveDBconnection(in_signature, online, db_connection, db_type, db_file, db_host, db_port, db_user, db_pswd, db_database string) (out_signature string)

func SendNotice

func SendNotice(subject, body string)

func Servicepreparation

func Servicepreparation()

func SessionValues

func SessionValues(r *http.Request, cs *sessions.CookieStore) (values string)

func SetAdministratorAuthority

func SetAdministratorAuthority(authority string)

func SetConfigurationSimple

func SetConfigurationSimple(key, value string)

func SetDB

func SetDB(d_b *sql.DB)

func SetDBtype

func SetDBtype(ss string) int

func SetDDSM2KeyPem

func SetDDSM2KeyPem(gy, sy string)

func SetHttpport

func SetHttpport(http_port string)

func SetLogger

func SetLogger() (accessLog, visitLog, errorLog *log.Logger, err error)

func SetOrgan2file

func SetOrgan2file(orgId, orgCode, orgName, orgType, orgGateway, orgEnv, tenantcode string)

func SetParam

func SetParam(sw_title string)

func SetPreferredMAC

func SetPreferredMAC() (mac string)

func SetRunDir

func SetRunDir(ss string)

func SetRunSubdir

func SetRunSubdir(sub string) (spath string)

func SetSysAcceptMultipleLanguage

func SetSysAcceptMultipleLanguage(multilanguage bool)

func SetUserShoppingcart

func SetUserShoppingcart(db *sql.DB, user_id int64) (shoppingcart_id int64, e error)

func SetV

func SetV(key, val string)

func SetVersion

func SetVersion(ss string)

func Setexpiration

func Setexpiration(expiration bool)

func Setissuer

func Setissuer(i string)

func Setissuerdomain

func Setissuerdomain(domain string)

func Setissueremail

func Setissueremail(email string)

func Setmanageremail

func Setmanageremail(email string)

func Setmembership

func Setmembership(member string)

func Setorgancode

func Setorgancode(code string)

func Setorganname

func Setorganname(name string)

func ShowPrice

func ShowPrice(currency_code string, cny_price int) string

func SigninRedirect

func SigninRedirect(w http.ResponseWriter, r *http.Request)

func Simfangttf

func Simfangttf() (fn string)

func Simheittf

func Simheittf() (fn string)

func SiteAddress

func SiteAddress(client_ipaddress string) (site_address string)

func SiteName

func SiteName() (site_name string)
func SiteUrlandLogo(client_ipaddress string) (protocol, site_address, logo_image string)

func Situation

func Situation() (str string)

func SituationMOK

func SituationMOK(w http.ResponseWriter, r *http.Request) (flag bool)

func SituationOK

func SituationOK(w http.ResponseWriter, r *http.Request) (flag bool)

func Software

func Software() (sw string)

func SoftwareTitle

func SoftwareTitle() (title string)

func SortMapKeys

func SortMapKeys(mp map[string]string) (n int, keys []string)

func SplitAddressTelephone

func SplitAddressTelephone(str string) (address, telephone string)

func SplitAddressTelephoneMobile

func SplitAddressTelephoneMobile(str string) (address, telephone, mobile string)

func SplitBanknameAccount

func SplitBanknameAccount(str string) (bankname, bankaccount string)

func SplitCND

func SplitCND(str, separator string) (code, name, desc string)

func SplitCodeName

func SplitCodeName(str string) (code, name string)

func SplitIDCodeName

func SplitIDCodeName(str string) (id int, code, name string)

func SplitIDTag

func SplitIDTag(str string) (id int, tag string)

func SplitKV

func SplitKV(str, separator string) (k, v string)

func SplitK_V

func SplitK_V(str, separator string) (k, v string)

func SplitParam

func SplitParam(param, seg_separator, kv_separator string) (mapKV map[string]string)

func SplitRoadmapid

func SplitRoadmapid(rmi string) (roadmapids []string)

func SplitSQL

func SplitSQL(line string) (sqltxt, comment string)

func SplitURL

func SplitURL(theurl string) (action string, mapKV map[string]string)

/cloneinstances?from=productcategory&scene=property&pid={{value}}&to=product&sub=property&rmi={{instance_id}}

func SplitV2map

func SplitV2map(key string, bs64 bool) (mapKV map[string]string)

key:"MP-mpid" val:"Appid,Appsecret"

func SplitXYZ

func SplitXYZ(str, separator string) (x, y, z string)

func Splitfield

func Splitfield(txt, init_seps, separator string) (sep string, fields []string, err error)

func Str2float64

func Str2float64(ss string) (ff float64)

func Str2int

func Str2int(ss string) int

func Str2int64

func Str2int64(ss string) int64

func Str2time

func Str2time(v string) (tm time.Time, err error)

func Str10Unixtime

func Str10Unixtime(v string) (unixtm string)

func Str10time

func Str10time(v string) (tm time.Time, err error)

func Str19millisecond

func Str19millisecond(v string) string

func Str19time

func Str19time(v string) (tm time.Time, err error)

func Str20time

func Str20time(v string) (tm time.Time, err error)

func StrMD5

func StrMD5(ss string) string

func StrNextWord

func StrNextWord(s []rune, i, n int) (j int, curword string)

func String2Map

func String2Map(str string) (mapResult map[string]string)

func String2MapOper

func String2MapOper(str, oper1, oper2 string) (mapResult map[string]string)

func StringJSONEscape

func StringJSONEscape(ss string) (rr string)

func StringObject2Map

func StringObject2Map(ss string) (mapKV map[string]string)

ss: {"id":1,"name":"abc"}

func Strtime2unix

func Strtime2unix(v string) (unixtime int64)

func Strval

func Strval(value interface{}) string

func Stsongttf

func Stsongttf() (fn string)

func SubMonth

func SubMonth(year, month, n int) (y, m int)

func Superior

func Superior() (superior_id int, superior_language, superior_email string)

func SysAcceptMultipleLanguage

func SysAcceptMultipleLanguage() (flag bool)

func TableExists

func TableExists(name string) (flag bool)

func Tablecount

func Tablecount(tablename string) (count int, err error)

func Tablecountex

func Tablecountex(tablename, where string) (count int, err error)

func Tableisempty

func Tableisempty(tablename string) (flag bool, err error)

func TempPath

func TempPath() (apath string)

func ThisUrl

func ThisUrl(r *http.Request) (theurl string)

func ThisUrl_escaped

func ThisUrl_escaped(r *http.Request) (theurl string)

func Time2Millisecondstr

func Time2Millisecondstr(tm time.Time) string

func ToJsonString

func ToJsonString(param map[string]string) (txt string)

func ToMap

func ToMap(in interface{}) (map[string]string, error)

ToMap convert the xml struct to map[string]string

func ToXmlString

func ToXmlString(param map[string]string) string

ToXmlString convert the map[string]string to xml string

func Today

func Today() (ss string)

func TodayUnixtime

func TodayUnixtime() (unixtm string)

func ToplevelDomain

func ToplevelDomain(domain string) (toplevel string)

func TotalASCII

func TotalASCII(ss string) (n int64)

func TrimBLANK

func TrimBLANK(ss string) string

func TrimBOM

func TrimBOM(ss string) string

func TrimCell

func TrimCell(str string) (ss string)

func TrimDate

func TrimDate(tm string) (ss string)

func TrimDoubleQuote

func TrimDoubleQuote(ss string) string

func TrimIdeographicSpace

func TrimIdeographicSpace(ss string) (rr string)

func TrimPAD

func TrimPAD(code, pad_formats string) (tcode string)

func TrimParticularSpace

func TrimParticularSpace(ss string) (rr string)

func TrimSquareBrackets

func TrimSquareBrackets(ss string) string

func TrimZero

func TrimZero(t string) (ss string)

func USCIdistrictcode

func USCIdistrictcode(usci string) (districtcode string)

func Undermaintenance

func Undermaintenance() (flag bool)

func Unit2pixel

func Unit2pixel(unit float64) (pixels int)

func UnixtimePreviousday10

func UnixtimePreviousday10(unixtime string) (tm string)

func UnixtimeStr10

func UnixtimeStr10(unixtime string) (tm string)

func Unzip

func Unzip(zipfile, dirOut string) (err error)

func UpdateUserInferiors

func UpdateUserInferiors(db *sql.DB, superior_id int64) (err error)

func Upload2AbsolutePath

func Upload2AbsolutePath(upath string) (apath string)

func UseMySQL

func UseMySQL() bool

func VisitLog

func VisitLog(vlog *log.Logger, r *http.Request, user_id int64)

func WS_DataexportHandler

func WS_DataexportHandler(w http.ResponseWriter, r *http.Request)

func WS_PicturetransferHandler

func WS_PicturetransferHandler(w http.ResponseWriter, r *http.Request)

func Weed_array

func Weed_array(array []string, weed string) (newarray []string)

sample: Weed_array(arr,"123,456")

func WhereByRoadmap

func WhereByRoadmap(roadmap []string, ids []string) (where string)

func WhereByRoadmapExcept

func WhereByRoadmapExcept(roadmap []string, ids []string, excepts []string) (where string)

func WhereeByRoadmap

func WhereeByRoadmap(roadmap []string, ids []int64) (wheree []string)

func WhetherExpired

func WhetherExpired(expiredate10 string) (flag bool)

func WordPageHeaderFooter

func WordPageHeaderFooter() (header, footer float64)

func WordPageMargin

func WordPageMargin() (left, top, right, bottom float64)

func WordSlice

func WordSlice(str string) (words []string)

func WriteBaselanguageConfigurationFile

func WriteBaselanguageConfigurationFile(base_language string) (err error)

func WriteEntityRecord

func WriteEntityRecord(object_identifier string, instance_id int64, nml_fields,
	ins_clauses, nml_clauses []string, nml_values []interface{},
	adaptive_fields map[string][]string, adaptive_values map[string][]interface{}) (ninstance_id int64, err error)

func WriteLanguageConfigurationFile

func WriteLanguageConfigurationFile(accept_language string) (err error)

func WriteMultiLanguageRecord

func WriteMultiLanguageRecord(object_identifier, language string, instance_id int64,
	normal_fields []string, normal_values []interface{}, adaptive_fields []string, adaptive_values []interface{}) (instance_languages_id int64, err error)
normal_fields := []string{"value"}
normal_values := make([]interface{}, 1)
normal_values[0] = interface{}("0")
adaptive_fields := []string{"title", "description"}
adaptive_values := []interface{}{}
adaptive_values = append(adaptive_values, interface{}("=1="))
adaptive_values = append(adaptive_values, interface{}("=2="))
base.WriteMultiLanguageRecord("configuration", "fr", 4, normal_fields, normal_values, adaptive_fields, adaptive_values)

one language record, now use for "configuration" need extend roadmap like 'WriteEntityRecord'

func WriteMySQLDBMS

func WriteMySQLDBMS(desPath, dbtitle, dbhost, dbport, dbuser, dbpswd, dbdatabase string) (err error)

func WriteSituation

func WriteSituation(dir_run, ss string) (err error)

func Xcopy

func Xcopy(src, des string) (e error)

func Xmergecopy

func Xmergecopy(src, des, merge string) (e error)

src/_xxx is the subdir to merge in des.

func Yesterday

func Yesterday() (ss string)

func ZeroDate

func ZeroDate(tm string) (flag bool)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) Notify

func (c *Client) Notify(msg string)

type CurrencyT

type CurrencyT struct {
	Currency_id               int
	Code, Title               string
	Exchange_rate             float64
	Symbol_left, Symbol_right string
}

type FieldinfoT

type FieldinfoT struct {
	// contains filtered or unexported fields
}

type JsonpickupT

type JsonpickupT struct {
	Identifier        string
	Scene             string
	Path              string
	Clientlanguage_id string
	User_id           string
}

type LanguageT

type LanguageT struct {
	Language_id   string
	Language_tag  string
	Language_flag string
	Selected      bool
}

func AcceptLanguages

func AcceptLanguages(multiple int) (languages []LanguageT)

type MakeLicenseT

type MakeLicenseT struct {
	User_id int64
	Sale_id int64
}

type Metadata

type Metadata struct {
	Filenames []string
	// contains filtered or unexported fields
}
var Meta_data Metadata

func (*Metadata) Filecomment

func (md *Metadata) Filecomment(fname string) (comment string)

func (*Metadata) Loadfromfile

func (md *Metadata) Loadfromfile() (e error)

func (*Metadata) Signature

func (md *Metadata) Signature() (signature string)

func (*Metadata) UpgradedMetas

func (md *Metadata) UpgradedMetas() (metas []string, err error)

func (*Metadata) Write2DB

func (md *Metadata) Write2DB() (err error)

func (*Metadata) Write2Database

func (md *Metadata) Write2Database(db *sql.DB) (err error)

func (*Metadata) WriteSignature2DeepData

func (md *Metadata) WriteSignature2DeepData() (err error)

type Sequence

type Sequence struct {
	Identifier string
	Number     int64
	Filename   string
}
var Salesequence Sequence

func (*Sequence) Getone

func (s *Sequence) Getone() (number int64, e error)

func (*Sequence) Open

func (s *Sequence) Open(dirstorage, identifier string) (e error)

func (*Sequence) Reset

func (s *Sequence) Reset() (e error)

type SocketHub

type SocketHub struct {
	// contains filtered or unexported fields
}
var WebsocketHub *SocketHub

func NewHub

func NewHub() *SocketHub

func (*SocketHub) NewToken

func (h *SocketHub) NewToken(token string, tm time.Time)

func (*SocketHub) NotifybyToken

func (h *SocketHub) NotifybyToken(token, msg string)

func (*SocketHub) Run

func (h *SocketHub) Run()

type SysNoticeT

type SysNoticeT struct {
	Subject string
	Body    string
}

type TableInfoT

type TableInfoT struct {
	MapField   map[string]FieldinfoT
	MapIndexON map[string]string
}

func (*TableInfoT) FieldExists

func (ti *TableInfoT) FieldExists(fieldname string) (flag bool)

func (*TableInfoT) IndexExists

func (ti *TableInfoT) IndexExists(index_on_fields string) (flag bool)

func (*TableInfoT) ReadFields

func (ti *TableInfoT) ReadFields(tablename string) (err error)

TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAME,ORDINAL_POSITION,COLUMN_DEFAULT IS_NULLABLE,DATA_TYPE,CHARACTER_MAXIMUM_LENGTH,CHARACTER_OCTET_LENGTH,NUMERIC_PRECISION NUMERIC_SCALE,DATETIME_PRECISION,CHARACTER_SET_NAME,COLLATION_NAME,COLUMN_TYPE,COLUMN_KEY EXTRA,PRIVILEGES,COLUMN_COMMENT mysql> select column_name,data_type,column_type,is_nullable,column_default,column_key from information_schema.columns

-> where table_schema='lsjc' and table_name='entity';

+-------------------+-----------+--------------+-------------+---------------------+------------+ | column_name | data_type | column_type | is_nullable | column_default | column_key | +-------------------+-----------+--------------+-------------+---------------------+------------+ | id | int | int(11) | NO | NULL | PRI | | time_created | datetime | datetime | YES | 0000-01-01 00:00:00 | | | time_updated | datetime | datetime | YES | 0000-01-01 00:00:00 | | | code | varchar | varchar(64) | YES | | MUL | | name | varchar | varchar(255) | YES | | | | description | text | text | YES | NULL | | | enableflag | int | int(11) | YES | 1 | MUL | | ordinalposition | int | int(11) | YES | 0 | MUL | | authority | varchar | varchar(64) | YES | system | | | creator | varchar | varchar(64) | YES | | | | thumbnail | varchar | varchar(96) | YES | | | | self_hierarchy | int | int(11) | YES | 0 | | | self_cite | int | int(11) | YES | 0 | | | multiple_language | int | int(11) | YES | 0 | | | metatype_id | int | int(11) | YES | 4 | MUL | | definition | text | text | YES | NULL | | | eventtrigger | text | text | YES | NULL | | | remark | text | text | YES | NULL | | +-------------------+-----------+--------------+-------------+---------------------+------------+ pragma table_info('entity') cid,name,type,notnull,dflt_value,pk 0|id|INTEGER|1||1 1|time_created|datetime|0|'0000-01-01 00:00:00'|0 2|time_updated|datetime|0|'0000-01-01 00:00:00'|0 3|code|varchar(64)|0|”|0 4|name|varchar(255)|0|”|0 5|description|text|0||0 6|enableflag|INTEGER|0|'1'|0 7|ordinalposition|INTEGER|0|'0'|0 8|authority|varchar(64)|0|'system'|0 9|creator|varchar(64)|0|”|0 10|thumbnail|varchar(96)|0|”|0 11|self_hierarchy|INTEGER|0|'0'|0 12|self_cite|INTEGER|0|'0'|0 13|multiple_language|INTEGER|0|'0'|0 14|metatype_id|INTEGER|0|'4'|0 15|definition|text|0||0 16|eventtrigger|text|0||0 17|remark|text|0||0 alter table tablename ADD COLUMN column-name column-type

func (*TableInfoT) ReadIndexes

func (ti *TableInfoT) ReadIndexes(tablename string) (err error)

func (*TableInfoT) SameProperty

func (ti *TableInfoT) SameProperty(fieldname, propertySQL string) (flag bool)

type TokenSet

type TokenSet struct {
	// contains filtered or unexported fields
}
var Tokens TokenSet

func (*TokenSet) Init

func (ts *TokenSet) Init()

func (*TokenSet) NewToken

func (ts *TokenSet) NewToken(r *http.Request, seconds int) (token string)

func (*TokenSet) RemoveToken

func (ts *TokenSet) RemoveToken(token string)

func (*TokenSet) ValidToken

func (ts *TokenSet) ValidToken(r *http.Request, token string) (flag bool)

func (*TokenSet) WeedExpires

func (ts *TokenSet) WeedExpires() (n int)

Jump to

Keyboard shortcuts

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