server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is a http server on the local loopback device that shows it's secret once

func New

func New(secret []byte, description string) (*Server, error)

New initializes the server over a given secret and optional description

func (*Server) Close

func (s *Server) Close()

Close closes the server

func (*Server) Serve

func (s *Server) Serve(ctx context.Context) error

Serve starts serving the secret - it blocks until the context is cancelled

func (*Server) URL

func (s *Server) URL() string

URL return the url under which the secret will be available

Jump to

Keyboard shortcuts

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