requests

package
v0.0.0-...-e95280a Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	Create() Builder
	WithContent(content Content) Builder
	WithSignature(sig signature.Signature) Builder
	Now() (Request, error)
}

Builder represents a request builder

func NewBuilder

func NewBuilder() Builder

NewBuilder creates a new builder instance

type Content

type Content interface {
	Hash() hash.Hash
	Requestor() hash.Hash
	PublicKey() public.Key
	Server() servers.Server
	CreatedOn() time.Time
}

Content represents a content request

type ContentBuilder

type ContentBuilder interface {
	Create() ContentBuilder
	WithRequestor(requestor hash.Hash) ContentBuilder
	WithPublicKey(pubKey public.Key) ContentBuilder
	WithServer(server servers.Server) ContentBuilder
	CreatedOn(createdOn time.Time) ContentBuilder
	Now() (Content, error)
}

ContentBuilder represents a content builder

func NewContentBuilder

func NewContentBuilder() ContentBuilder

NewContentBuilder creates a new content builder

type Request

type Request interface {
	Hash() hash.Hash
	Content() Content
	Signature() signature.Signature
}

Request represents a connection request

Jump to

Keyboard shortcuts

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