Documentation
¶
Overview ¶
*
- Copyright 2018 The AMP HTML Authors. All Rights Reserved. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS-IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Index ¶
Constants ¶
View Source
const ( COMPONENTS_URL = "https://api.github.com/repos/ampproject/amphtml/git/trees/master?recursive=1" COMPONENTS_MEMCACHE_KEY = "amp-components-list" COMPONENTS_UPDATE_FREQ_SECONDS = 86400 // one day PLAYGROUND_PATH_PREFIX = "/playground" )
Variables ¶
This section is empty.
Functions ¶
func InitPlayground ¶
func InitPlayground()
func InitializeComponents ¶
Types ¶
type AmpComponentsList ¶
type ComponentsReqError ¶
type GitHubApiResponse ¶
type GitHubApiResponse struct { Sha string `json:"sha"` Url string `json:"url"` Tree []GitHubBlob `json:"tree"` Truncated bool `json:"truncated"` }
type GitHubApiToken ¶
type GitHubApiToken struct {
AuthKey string
}
An Auth key for using GitHub API should be generated and placed in Datastore on App Engine, with the Datastore key of "GitHubApiTokenKey". This ensures that requests to the GitHub API are not subject to the severe rate limiting imposed on unauthenticated requests, stopping the components map being built.
Click to show internal directories.
Click to hide internal directories.