Documentation ¶
Index ¶
- Constants
- Variables
- func DigInvoke(function interface{}, opts ...dig.InvokeOption) error
- func DigProvide(constructor interface{}, opts ...dig.ProvideOption) error
- func ExtractBearerToken(ctx *gear.Context) (token string)
- func ExtractToken(ctx *gear.Context) (token string)
- func GetStaticFilePath() string
- func GetUid(ctx context.Context) string
- func GetVersion() []byte
- func PathExists(path string) bool
- func PrintVersion()
- func ReadConfig(v interface{}, path ...string)
- func StringSliceHas(list []string, a string) bool
- func XAuthExtractor(ctx *gear.Context) (token string)
- type HID
- type UidKey
Constants ¶
View Source
const ( // HeaderXAuth ... HeaderXAuth = "X-Auth" // HeaderAuthorize ... HeaderAuthorize = "Authorization" // HeaderAuthorizeBearer ... HeaderAuthorizeBearer = "Bearer " // HeaderAuthorizeOAuth2 ... HeaderAuthorizeOAuth2 = "OAuth2 " )
Variables ¶
View Source
var ( // Name ... Name = "urbs-console" // Version ... Version = "unknown" // BuildTime ... BuildTime = "unknown" // GitSHA1 ... GitSHA1 = "unknown" )
View Source
var ( // UserAgent ... UserAgent string )
Functions ¶
func DigProvide ¶
func DigProvide(constructor interface{}, opts ...dig.ProvideOption) error
DigProvide ...
func ExtractBearerToken ¶ added in v1.0.0
ExtractBearerToken ...
func ExtractToken ¶ added in v1.0.0
ExtractToken ...
func GetStaticFilePath ¶ added in v0.4.0
func GetStaticFilePath() string
GetStaticFilePath the default path is `./static`
func PathExists ¶ added in v0.4.0
PathExists returns whether the given file or directory exists
func ReadConfig ¶
func ReadConfig(v interface{}, path ...string)
ReadConfig 指定配置文件并解析; 未指定配置文件则通过环境变量获取
func StringSliceHas ¶ added in v0.4.0
StringSliceHas ...
func XAuthExtractor ¶ added in v0.4.0
XAuthExtractor ...
Types ¶
Click to show internal directories.
Click to hide internal directories.