Documentation ¶
Index ¶
- Constants
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type GMHandler
- type GMRequest
- type GMServer
- type GoogleTokenInfo
- type OAuthCreds
- type WebSocketMux
- type WebSocketRequest
- type WebSocketResponse
Constants ¶
const ( QSArgBkmGetArgTagID = "tag_id" QSArgBkmGetArgURL = "url" )
const ( QSArgTagsShape = "shape" QSArgTagsShapeTree = "tree" QSArgTagsShapeFlat = "flat" QSArgTagsShapeSingle = "single" QSArgTagsPattern = "pattern" QSArgTagsAllowNew = "allow_new" QSArgNewLeafPolicy = "new_leaf_policy" QSArgNewLeafPolicyKeep = "keep" QSArgNewLeafPolicyDel = "del" )
const (
BookmarkID = "bkmid"
)
Variables ¶
var (
ErrTagSuggestionFailed = errors.New("tag suggestion failed")
)
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type GMRequest ¶
type GoogleTokenInfo ¶
type GoogleTokenInfo struct { // Audience: Who is the intended audience for this token. In general the // same as issued_to. Audience string `json:"audience,omitempty"` // Email: The email address of the user. Present only if the email scope // is present in the request. Email string `json:"email,omitempty"` // ExpiresIn: The expiry time of the token, as number of seconds left // until expiry. ExpiresIn int64 `json:"expires_in,omitempty"` // IssuedTo: To whom was the token issued to. In general the same as // audience. IssuedTo string `json:"issued_to,omitempty"` // UserID: The obfuscated user id. UserID string `json:"user_id,omitempty"` // VerifiedEmail: Boolean flag which is true if the email address is // verified. Present only if the email scope is present in the request. VerifiedEmail bool `json:"verified_email,omitempty"` // Returned in case of error. Error string `json:"error,omitempty"` ErrorDescription string `json:"error_description,omitempty"` }
type OAuthCreds ¶
type OAuthCreds struct { ClientID string `yaml:"client_id"` ClientSecret string `yaml:"client_secret"` }
func ReadOAuthCredsFile ¶
func ReadOAuthCredsFile(credsFile string) (*OAuthCreds, error)
type WebSocketMux ¶
type WebSocketMux struct {
// contains filtered or unexported fields
}
func (*WebSocketMux) Handle ¶
func (m *WebSocketMux) Handle(gmr *GMRequest) (resp interface{}, err error)