server

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command() *cobra.Command

Command returns the server cobra command.

func RunServer

func RunServer(flags *Flags)

RunServer starts the mock Scanii server. This function blocks.

func Setup

func Setup(mux *http.ServeMux, eng *engine.Engine, key, secret, data, baseURL string)

Types

type FakeHandler

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

func (FakeHandler) Account

func (h FakeHandler) Account(w http.ResponseWriter, r *http.Request)

func (FakeHandler) CreateToken

func (h FakeHandler) CreateToken(w http.ResponseWriter, r *http.Request)

func (FakeHandler) DeleteToken

func (h FakeHandler) DeleteToken(w http.ResponseWriter, _ *http.Request, id string)

func (FakeHandler) Ping

func (h FakeHandler) Ping(w http.ResponseWriter, r *http.Request)

func (FakeHandler) ProcessFile

func (h FakeHandler) ProcessFile(w http.ResponseWriter, r *http.Request)

func (FakeHandler) ProcessFileAsync

func (h FakeHandler) ProcessFileAsync(w http.ResponseWriter, r *http.Request)

func (FakeHandler) ProcessFileFetch

func (h FakeHandler) ProcessFileFetch(w http.ResponseWriter, r *http.Request)

func (FakeHandler) RetrieveFile

func (h FakeHandler) RetrieveFile(w http.ResponseWriter, _ *http.Request, id string)

func (FakeHandler) RetrieveToken

func (h FakeHandler) RetrieveToken(w http.ResponseWriter, _ *http.Request, id string)

type Flags

type Flags struct {
	Address      string
	Engine       string
	Key          string
	Secret       string
	Data         string
	ReadyChan    chan bool
	CallBackWait time.Duration
}

Flags holds configuration for the mock server.

Jump to

Keyboard shortcuts

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