exposure-notifications-server: github.com/google/exposure-notifications-server/testing/enclient Index | Files

package enclient

import "github.com/google/exposure-notifications-server/testing/enclient"

Package enclient is a client for making requests against the exposure notification server.


Package Files


func ExposureKey Uses

func ExposureKey(key string, intervalNumber Interval, intervalCount int32, transmissionRisk int) verifyapi.ExposureKey

ExposureKey creates an exposure key.

func JSONRequest Uses

func JSONRequest(data interface{}) []byte

JSONRequest serializes the given argument to json.

func PostRequest Uses

func PostRequest(url string, data interface{}) (*http.Response, error)

PostRequest requests to the specified url. This methods attempts to serialize data argument as a json.

type Interval Uses

type Interval int32

func NewInterval Uses

func NewInterval(time int64) Interval

NewInterval creates a new interval for the UNIX epoch given.

func NowInterval Uses

func NowInterval() Interval

NowInterval returns the Interval for the current moment of tme.

Package enclient imports 8 packages (graph) and is imported by 1 packages. Updated 2020-07-05. Refresh now. Tools for package owners.