enum

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Success                       = 0
	ErrParam                      = 10000
	ErrData                       = 10001
	ErrOp                         = 10002
	ErrTwoPasswordNotMatch        = 10003
	ErrUserAuth                   = 10100
	ErrUserRegister               = 10101
	ErrUserGetData                = 10102
	ErrUserUpdateData             = 10103
	ErrUserNotFound               = 10104
	ErrUserEmailFormat            = 10105
	ErrUserEmailOrPasswordError   = 10106
	ErrUserEmailOrPasswordIsEmpty = 10107
	ErrUserDisabled               = 10108
	ErrUserNotActivated           = 10109
)
View Source
const (
	ContentTypeHtml     = "html"
	ContentTypeJson     = "json"
	ContentTypeText     = "text"
	ContentTypeMarkdown = "markdown"
	ContentTypeImage    = "image"
	ContentTypeVideo    = "video"
	ContentTypeAudio    = "audio"
	ContentTypeFile     = "file"
)
View Source
const (
	DefaultCategoryUUIDSize = 12
	DefaultPageIDSize       = 14
)
View Source
const CORS_ALLOW_ALL = "*"

Cors

View Source
const CORS_ALLOW_CREDENTIALS = "true"
View Source
const CORS_ALLOW_HEADERS = "" /* 137-byte string literal not displayed */
View Source
const CORS_ALLOW_METHODS = "POST, OPTIONS, GET, PUT, PATCH, DELETE"
View Source
const ENV_AUTH_PREFIX = "AUTH_PREFIX"
View Source
const ENV_CMS_API_PREFIX = "CMS_API_PREFIX"
View Source
const ENV_CONFIG_CACHE_EXPIRED = "CONFIG_CACHE_EXPIRED"

Default Value: 10s

View Source
const ENV_CONFIG_CACHE_SIZE = "CONFIG_CACHE_SIZE"

Default Value: 1024

View Source
const ENV_DB_ACTIVE = "DB_ACTIVE"
View Source
const ENV_DB_DRIVER = "DB_DRIVER"

DB

View Source
const ENV_DB_IDLE = "DB_IDLE"
View Source
const ENV_DB_TIMEOUT = "DB_TIMEOUT"
View Source
const ENV_DEBUG = "DEBUG"
View Source
const ENV_DSN = "DSN"
View Source
const ENV_HTML_DIR = "HTML_DIR"
View Source
const ENV_LANG = "LANG"
View Source
const ENV_LOG_FILE = "LOG_FILE"
View Source
const ENV_SALT = "PASSWORD_SALT"

User Password salt

View Source
const ENV_SESSION_SECRET = "SESSION_SECRET"
View Source
const ENV_STATIC_DIR = "STATIC_DIR"
View Source
const ENV_STATIC_ROOT = "STATIC_ROOT"
View Source
const ENV_ZONE_OFFSET = "ZONE_OFFSET"
View Source
const KEY_ADMIN_DASHBOARD = "ADMIN_DASHBOARD"
View Source
const KEY_AUTH_TOKEN_EXPIRED = "AUTH_TOKEN_EXPIRED"
View Source
const KEY_CMS_API_HOST = "CMS_API_HOST"
View Source
const KEY_CMS_EXTERNAL_UPLOADER = "CMS_EXTERNAL_UPLOADER"
View Source
const KEY_CMS_GUEST_ACCESS_API = "CMS_GUEST_ACCESS_API"
View Source
const KEY_CMS_MEDIA_HOST = "CMS_MEDIA_HOST"
View Source
const KEY_CMS_MEDIA_PREFIX = "CMS_MEDIA_PREFIX"
View Source
const KEY_CMS_RELATION_COUNT = "CMS_RELATION_COUNT"
View Source
const KEY_CMS_SUGGESTION_COUNT = "CMS_SUGGESTION_COUNT"
View Source
const KEY_CMS_UPLOAD_DIR = "CMS_UPLOAD_DIR"
View Source
const KEY_RESET_PASSWD_EXPIRED = "RESET_PASSWD_EXPIRED"
View Source
const KEY_SITE_ADMIN = "SITE_ADMIN"
View Source
const KEY_SITE_COPYRIGHT = "SITE_COPYRIGHT"
View Source
const KEY_SITE_DESCRIPTION = "SITE_DESCRIPTION"
View Source
const KEY_SITE_FAVICON_URL = "SITE_FAVICON_URL"
View Source
const KEY_SITE_GA = "SITE_GA"
View Source
const KEY_SITE_KEYWORDS = "SITE_KEYWORDS"
View Source
const KEY_SITE_LOGIN_NEXT = "SITE_LOGIN_NEXT"
View Source
const KEY_SITE_LOGOUT_URL = "SITE_LOGOUT_URL"
View Source
const KEY_SITE_LOGO_URL = "SITE_LOGO_URL"
View Source
const KEY_SITE_NAME = "SITE_NAME"
View Source
const KEY_SITE_PRIVACY_URL = "SITE_PRIVACY_URL"
View Source
const KEY_SITE_RESET_PASSWORD_URL = "SITE_RESET_PASSWORD_URL"
View Source
const KEY_SITE_SIGNIN_URL = "SITE_SIGNIN_URL"
View Source
const KEY_SITE_SIGNUP_URL = "SITE_SIGNUP_URL"
View Source
const KEY_SITE_SLOGAN = "SITE_SLOGAN"
View Source
const KEY_SITE_TERMS_URL = "SITE_TERMS_URL"
View Source
const KEY_SITE_URL = "SITE_URL"
View Source
const KEY_SITE_USER_ID_TYPE = "SITE_USER_ID_TYPE"
View Source
const KEY_USER_ACTIVATED = "USER_ACTIVATED"
View Source
const KEY_VERIFY_EMAIL_EXPIRED = "VERIFY_EMAIL_EXPIRED"
View Source
const SessionField = "weapi"

session field name

Variables

View Source
var ErrDraftIsInvalid = errors.New("draft is invalid")
View Source
var ErrInvalidPathAndName = errors.New("invalid path and name")
View Source
var ErrPageIsNotPublish = errors.New("page is not publish")
View Source
var ErrPostIsNotPublish = errors.New("post is not publish")
View Source
var ErrUnauthorized = errors.New("unauthorized")
View Source
var ErrUploadsDirNotConfigured = errors.New("uploads dir not configured")

Functions

func CodeText

func CodeText(code int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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