hkp

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Protocol

type Protocol int

Protocol is kind of HKP protocols

const (
	HKP  Protocol = iota + 1 //HTTP Keyserver Protocol
	HKPS                     //HKP over HTTPS
)

func (Protocol) String

func (p Protocol) String() string

type Server

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

Server is information of OpenPGP key server

func New

func New(host string, opts ...ServerOptFunc) *Server

New returns a new Server instance

func (*Server) Fetch

func (s *Server) Fetch(ctx context.Context, cli fetch.Client, userID string) (io.ReadCloser, error)

func (*Server) String

func (s *Server) String() string

func (*Server) URL

func (s *Server) URL() *url.URL

URL returns url.URL instance

type ServerOptFunc

type ServerOptFunc func(*Server)

ServerOptFunc is self-referential function for functional options pattern

func WithPort

func WithPort(port int) ServerOptFunc

WithPort returns function for setting Reader

func WithProtocol

func WithProtocol(p Protocol) ServerOptFunc

WithProtocol returns function for setting Reader

Jump to

Keyboard shortcuts

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