Versions in this module Expand all Collapse all v0 v0.1.0 Aug 25, 2020 Changes in this version + var ErrGONOSUMDB = errors.New("skipped (listed in GONOSUMDB)") + var ErrSecurity = errors.New("security error: misbehaving server") + var ErrWriteConflict = errors.New("write conflict") + var ServerPaths = []string + type Client struct + func NewClient(ops ClientOps) *Client + func (c *Client) Lookup(path, vers string) (lines []string, err error) + func (c *Client) SetGONOSUMDB(list string) + func (c *Client) SetTileHeight(height int) + type ClientOps interface + Log func(msg string) + ReadCache func(file string) ([]byte, error) + ReadConfig func(file string) ([]byte, error) + ReadRemote func(path string) ([]byte, error) + SecurityError func(msg string) + WriteCache func(file string, data []byte) + WriteConfig func(file string, old, new []byte) error + type Server struct + func NewServer(ops ServerOps) *Server + func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) + type ServerOps interface + Lookup func(ctx context.Context, m module.Version) (int64, error) + ReadRecords func(ctx context.Context, id, n int64) ([][]byte, error) + ReadTileData func(ctx context.Context, t tlog.Tile) ([]byte, error) + Signed func(ctx context.Context) ([]byte, error) + type TestServer struct + func NewTestServer(signer string, gosum func(path, vers string) ([]byte, error)) *TestServer + func (s *TestServer) Lookup(ctx context.Context, m module.Version) (int64, error) + func (s *TestServer) ReadRecords(ctx context.Context, id, n int64) ([][]byte, error) + func (s *TestServer) ReadTileData(ctx context.Context, t tlog.Tile) ([]byte, error) + func (s *TestServer) Signed(ctx context.Context) ([]byte, error)