meta

package
v0.0.0-...-9a7bc8d Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// === gate/sola ===
	CtxService      = "open.service"
	CtxTokenPayload = "open.token.payload"

	// === redis ===
	KeyRedisPhoneCode   = "verifycode.phone-"
	KeyRedisEmailCode   = "verifycode.email-"
	KeyRedisGhostIMCode = "verifycode.ghostim-"
)

string key

View Source
const (
	SystemName = "GhostOpenPlatform"

	// Version = "1.0.0"
	Version = "latest"

	// === Client ===
	ClientGateway = "open.gateway"

	// === Platform Services ===
	SrvCore = "open.srv.core"
	// SrvManage = "open.srv.manage"
	SrvSelf   = "open.srv.self"
	SrvNotify = "open.srv.notify"

	// === Apps ===
	AppMrms = "open.app.mrms"
)

meta

View Source
const (
	TopicNotifyPostCode = "notify.post.code"
)

topic(s)

Variables

View Source
var (
	ErrRepoError          = errors.New("Repo Error")
	ErrRepoRecordNotFound = errors.New("Record Not Found")

	ErrInvalidCode = errors.New("code invalid")

	ErrInvalidJWT = errors.New("jwt invalid")
	ErrSignJWT    = errors.New("jwt sign error")

	ErrWrongUsername = errors.New("Wrong Username/Phone/Email")
	ErrUserHasExist  = errors.New("Username/Phone/Email Has Exist")
	ErrCredential    = errors.New("Credential Error")

	ErrUnsupportedAuthType   = errors.New("Unsupported authorization method")
	ErrUnsupportedVerifyType = errors.New("Unsupported verify method")
	ErrUnsupportedActionType = errors.New("Unsupported action type")

	ErrAuthenticationFailed = errors.New("Authentication Failed")
	ErrAccessDenied         = errors.New("Access Denied")

	ErrAppHasExist   = errors.New("AppName Has Exist")
	ErrOrgHasExist   = errors.New("Org Has Exist")
	ErrOrgNotExist   = errors.New("Org Not Exist")
	ErrGroupHasExist = errors.New("Group Has Exist")
)

error(s)

View Source
var (
	// === gate ===
	KeyService      = key{CtxService}
	KeyTokenPayload = key{CtxTokenPayload}

	// === services/repo ===
	KeyRepo      = key{"key.repo.mysql"} // MySQL
	KeyRepoRedis = key{"key.repo.redis"}

	// === client ===
	KeyClientNotifyVerify = key{"client.notify.verify"}
)

key of context

Functions

This section is empty.

Types

type Model

type Model struct {
	ID string `gorm:"primary_key"`

	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt *time.Time `sql:"index"`
}

Model without ID

func (*Model) BeforeCreate

func (*Model) BeforeCreate(scope *gorm.Scope) error

BeforeCreate for meta.Model

Jump to

Keyboard shortcuts

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