message

package
v0.0.0-...-cd8c0a5 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	API_LIFE_TIME_ACCESS_TOKEN = 30 * 24 * 60 * 60
	//API_LIFE_TIME_ACCESS_TOKEN        = 30
	REGEX_CHARACTER_NO_SPECIAL  = "^([一-龠ぁ-ゔァ-ヴーa-zA-Z0-9a-zA-Z0-9々〆〤\\s\\/ ]+)$"
	REGEX_IGNORE_JAPANESS       = "^([^一-龠ぁ-ゔァ-ヴ]+)$"
	REGEX_HAS_CHARACTER_SPECIAL = "^([一-龠ぁ-ゔァ-ヴーa-zA-Z0-9a-zA-Z0-9々〆〤\\\\s\\\\/ .,-。、/ー・]+)$"
	REGEX_EMAIL                 = "^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$"
	DATE_FORMAT                 = "2006-01-02"
	DATE_FORMAT2                = "2006-01-02T15:04:05Z07:00"

	DATE_TIME_FORMAT                  = "2006-01-02 15:04:05"
	DATE_TIME_FORMAT_YYYYMMDD_HHMM    = "2006-01-02 15:04"
	DATE_TIME_FORMAT_MILLI_SEC_FORMAT = "2006-01-02 15:04:05.000"
	TIME_FORMAT_HHMM                  = "15:04"
	REGEX_VALID_USER_ID               = `^[A-Za-z0-9\+\-\._!$#]+$`
	NOTIFY_MEDIA_ALL                  = "all"
	NOTIFY_MEDIA_ADMIN                = "admin"
	NOTIFY_MEDIA_MAIL                 = "mail"
	CONTRACT_NOTICES_BOTH             = "both"
	CONTRACT_NOTICES_MAIL             = "mail"
	CONTRACT_NOTICES_INFO             = "info"
	X_USER_NAME                       = "x-user-name"
	X_PASSWORD                        = "x-password"

	DATABASE_DATA_NOT_FOUND = "database data not found"
)
View Source
const (
	STS000 = "STS000"
	STS001 = "STS001"
	STS002 = "STS002"

	ERR000 = "ERR000"
	ERR001 = "ERR001"
	ERR002 = "ERR002"
	ERR003 = "ERR003"
	ERR004 = "ERR004"
	ERR005 = "ERR005"
	ERR006 = "ERR006"
	ERR007 = "ERR007"
	ERR008 = "ERR008"
	ERR009 = "ERR009"
	ERR010 = "ERR010"
	ERR011 = "ERR011"
	ERR012 = "ERR012"
	ERR013 = "ERR013"
	ERR014 = "ERR014"
	ERR015 = "ERR015"
	ERR016 = "ERR016"
	ERR017 = "ERR017"
	ERR018 = "ERR018"
	ERR019 = "ERR019"
	ERR020 = "ERR020"
	ERR021 = "ERR021"
	ERR022 = "ERR022"
	ERR023 = "ERR023"
	ERR024 = "ERR024"
	ERR026 = "ERR026"
	ERR027 = "ERR027"
	ERR028 = "ERR028"
	ERR029 = "ERR029"
	ERR030 = "ERR030"
	ERR031 = "ERR031"
	ERR032 = "ERR032"
	ERR033 = "ERR033"
	ERR034 = "ERR034"
	ERR035 = "ERR035"
	ERR036 = "ERR036"
	ERR037 = "ERR037"
	ERR038 = "ERR038"
	ERR039 = "ERR039"
	ERR040 = "ERR040"
	ERR041 = "ERR041"
	ERR042 = "ERR042"
	ERR043 = "ERR043"
	ERR044 = "ERR044"
	ERR045 = "ERR045"
	ERR046 = "ERR046"
	ERR047 = "ERR047"
	ERR048 = "ERR048"
	ERR049 = "ERR049"
	ERR050 = "ERR050"
	ERR051 = "ERR051"
	ERR052 = "ERR052"
	ERR053 = "ERR053"
	ERR054 = "ERR054"
	ERR055 = "ERR055"
	ERR056 = "ERR056"
	ERR057 = "ERR057"
	ERR999 = "ERR999"

	USER_ID  = "ユーザID"
	PASSWORD = "パスワード"
)

Variables

View Source
var MsgFlags = map[string]string{

	STS000: "正常終了",
	STS001: "データが取得出来ませんでした",
	STS002: "データが存在しません",

	ERR000: "ログインエラー。",
	ERR001: "必須項目です",
	ERR002: "%sは%d文字以下で入力してください",
	ERR003: "%sは8文字以上256文字以内で入力してください",
	ERR004: "アクセストークンがありません",
	ERR005: "アクセストークンが違います",
	ERR006: "APIが見つかりません",
	ERR007: "数字のみです",
	ERR008: "ユーザーに権限がありません",
	ERR009: "パスワードがちがいます",
	ERR010: "年を入れてください",
	ERR011: "月は、1〜12内で入力してください",
	ERR012: "日は、1〜31内で入力してください",
	ERR013: "名前がおかしいです",
	ERR014: "1(公休日),2(指定休日)を入れてください",
	ERR015: "アクセストークンが有効期限が過ぎています。",
	ERR016: "削除できません。",
}

Functions

func GetApiNameAndTime

func GetApiNameAndTime(c *gin.Context, msg string) string

func GetMsg

func GetMsg(code string, params ...interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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