外观
skyarc
原文: https://finproducts.atlassian.net/wiki/spaces/JIDD3/pages/34793717862/FIN+5.3.1+skyarc 中文整理基于 FIN 5.3.1
导读: SkySpark 框架 API
以下为 API 参考,保留英文以便对照源码;目录已列出(英文标题便于检索);概述已尽量中译。
目录(导读)
- mixins
- classes
- Slot Details
- dis
- meta
- name
- attestKey
- key
- user
- username
- proj
- has
- id
- isAdmin
- isProjAccessible
- isSu
- make
- missing
- toStr
- tz
- doc
- kind
- text
- validate
概述(中译)
@Js const 混入 ProjDef
SysNamespace 中的项目特定定义
方法
插槽详情
API 正文(英文)
dis
abstract Str dis()
Project display name
meta
abstract Dict meta()
Project meta stored in projMeta
name
abstract Str name()
Project name
Session
@Js abstract const class Session : Obj, HxSession
Session models an authenticated client-to-server session
Methods
| attestKey | Attestation session key used as secondary verification of cookie key |
| key | Unique identifier for session |
| user | User account |
| username | Authenticated username associated with the session |
Slot Details
attestKey
abstract override Str attestKey()
Attestation session key used as secondary verification of cookie key
key
abstract override Str key()
Unique identifier for session
user
abstract override User user()
User account
username
Str username()
Authenticated username associated with the session
SysNamespace
@Js const mixin SysNamespace : Namespace
SysNamespace is the system's symbolic namespace of definitions.
Methods
| proj | Project definitions if namespace is associated with a project |
Slot Details
proj
abstract ProjDef? proj(Bool checked := true)
Project definitions if namespace is associated with a project
User
@Js const class User : Obj, HxUser
User models a user account
Constructors
| make | Construct from user tags |
Fields
| dis | Display string for user |
| Email address if configured | |
| id | User id in user database |
| isAdmin | Does the account have admin permissions |
| isSu | Does the account have superuser permissions |
| meta | User record and tags |
| tz | Timezone for user account |
| username | Username |
Methods
| has | Convenience for meta.has(tag) |
| isProjAccessible | Return if given Proj instance is accessible by this user's configured projAccessFilter. |
| missing | Convenience for meta.missing(tag) |
| toStr | Return disply name for user tags |
Slot Details
dis
virtual const override Str dis
Display string for user
email
virtual const override Str? email
Email address if configured
has
Bool has(Str tag)
Convenience for meta.has(tag)
id
virtual const override Ref id
User id in user database
isAdmin
virtual const override Bool isAdmin
Does the account have admin permissions
isProjAccessible
Bool isProjAccessible(Obj proj)
Return if given Proj instance is accessible by this user's configured projAccessFilter.
isSu
virtual const override Bool isSu
Does the account have superuser permissions
make
new make(Dict meta)
Construct from user tags
meta
virtual const override Dict meta
User record and tags
missing
Bool missing(Str tag)
Convenience for meta.missing(tag)
toStr
virtual override Str toStr()
Return disply name for user tags
tz
const TimeZone tz
Timezone for user account
username
virtual const override Str username
Username
ValDef
@Js const class ValDef : Obj
ValDef defines the type of a value and its attributes for display and editing. It is used to model tags, function parameters, and grid col cells. See docFresco
NOTE: this class is deprecated and should not be used anymore. Starting in 2019 we are moving to the new Haystack def model
Fields
| kind | Kind for the type |
| meta | Metadata tags |
| name | Value name (tag or param name) |
Methods
| dis | Display label for name |
| doc | Documentation in fandoc for this tag or empty string |
| text | Get formatted text for given value |
| toStr | Debug string |
| validate | Validate the given value for this definition. |
Slot Details
dis
Str dis()
Display label for name
doc
Str doc()
Documentation in fandoc for this tag or empty string
kind
const Kind kind
Kind for the type
meta
const Dict meta
Metadata tags
name
const Str name
Value name (tag or param name)
text
Str text(Obj? val)
Get formatted text for given value
toStr
virtual override Str toStr()
Debug string
validate
Err? validate(Obj? val, Bool checked := true)
Validate the given value for this definition. If value is ok return null. Otherwise return the error or raise it based on the checked flag. This method must be run within an axon context.