Documentation
¶
Index ¶
- Constants
- Variables
- func CreateValidator()
- func GetAssetDir() string
- func GetConfigFile() string
- func GetProjectFilePath(projectID int64) string
- func GetProjectPath(projectID int64) string
- func GetRepositoryPath() string
- func Log(lv LogLevel, content string)
- type Goploy
- type LogLevel
- type Response
- type Route
- type RouteApi
- type Router
Constants ¶
View Source
const ( RoleAdmin = "admin" RoleManager = "manager" RoleGroupManager = "group-manager" RoleMember = "member" )
role
View Source
const NamespaceHeaderName = "G-N-ID"
NamespaceHeaderName namespace cookie name
Variables ¶
View Source
var ( AssetDir string Gwg sync.WaitGroup )
View Source
var Roles = [...]string{RoleAdmin, RoleManager, RoleGroupManager, RoleMember}
Roles all role
View Source
var Trans ut.Translator
Trans Translator
View Source
var Validate *validator.Validate
Validate use a single instance of Validate, it caches struct info
Functions ¶
func GetAssetDir ¶ added in v1.1.4
func GetAssetDir() string
GetAssetDir if env = 'production' return absolute else return relative
func GetConfigFile ¶ added in v1.4.2
func GetConfigFile() string
func GetProjectFilePath ¶ added in v1.1.3
func GetProjectPath ¶ added in v1.0.3
func GetRepositoryPath ¶ added in v1.0.3
func GetRepositoryPath() string
Types ¶
type Goploy ¶
type Goploy struct { UserInfo model.User Namespace model.Namespace Request *http.Request ResponseWriter http.ResponseWriter URLQuery url.Values Body []byte }
Goploy callback param
type Response ¶
type Response interface {
Write(http.ResponseWriter) error
}
type Route ¶ added in v1.4.3
type Route struct {
// contains filtered or unexported fields
}
func (Route) Middleware ¶ added in v1.4.3
Middleware global Middleware handle function
Click to show internal directories.
Click to hide internal directories.