amp

package
v0.0.0-...-957339b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Copyright 2020 Center for Digital Matter HGK FHNW, Basel. Copyright 2020 info-age GmbH, Basel.

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

This section is empty.

Variables

This section is empty.

Functions

func GetCaches

func GetCaches() (map[string]*Cache, error)

Types

type Cache

type Cache struct {
	Id                          string `json:"id"`
	Name                        string `json:"name"`
	Docs                        string `json:"docs"`
	CacheDomain                 string `json:"cacheDomain"`
	UpdateCacheApiDomainSuffix  string `json:"updateCacheApiDomainSuffix"`
	ThirdPartyFrameDomainSuffix string `json:"thirdPartyFrameDomainSuffix"`
	// contains filtered or unexported fields
}

func (*Cache) BuildRefreshRSA

func (c *Cache) BuildRefreshRSA(host string) (string, error)

func (*Cache) BuildUpdateUrl

func (c *Cache) BuildUpdateUrl(u string, ampApiKey *rsa.PrivateKey) (string, error)

func (*Cache) BuildUrl

func (c *Cache) BuildUrl(u string, urltype URLType) (string, error)

func (*Cache) Init

func (c *Cache) Init()

type URLType

type URLType rune
const (
	PAGE   URLType = 'c'
	IMAGE  URLType = 'i'
	UPDATE URLType = 'u'
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL