mockupserver

package
v0.0.0-...-145d54f Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(srv *http.Server, name string) error

func NewIssuer

func NewIssuer(t *testing.T, idenPubOnChain idenpubonchain.IdenPubOnChainer,
	idenPubOffChainWrite idenpuboffchain.IdenPubOffChainWriter,
	zkFilesIdenState *zkutils.ZkFiles,
) *issuer.Issuer

func Serve

func Serve(t *testing.T, cfg *Conf, idenPubOnChain idenpubonchain.IdenPubOnChainer,
	zkFilesIdenState *zkutils.ZkFiles,
	zkFilesCredential *zkutils.ZkFiles,
) *http.Server

func ShouldBindJSONValidate

func ShouldBindJSONValidate(c *gin.Context, v interface{}) error

Types

type Conf

type Conf struct {
	IP                string
	Port              string
	TimeToAproveClaim time.Duration
	TimeToPublish     time.Duration
}

type Requests

type Requests struct {
	// contains filtered or unexported fields
}

func NewRequests

func NewRequests() *Requests

func (*Requests) Add

func (r *Requests) Add(value, index string) int

func (*Requests) Approve

func (r *Requests) Approve(id int, claim merkletree.Entrier) error

func (*Requests) Get

func (r *Requests) Get(id int) (*messages.Request, error)

Jump to

Keyboard shortcuts

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