strawcligo

package module
v0.0.0-...-f363c60 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: MIT Imports: 9 Imported by: 0

README

straw-cli-go

Go Straw client in GO

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Router

func Router() *mux.Router

func Serve

func Serve(o *Opts) error

Types

type ConnMsg

type ConnMsg struct {
	Id string `json:"id"`
}

type MemoryResponseWriter

type MemoryResponseWriter struct {
	Data    []byte      `json:"data"`
	Status  int         `json:"status"`
	Headers http.Header `json:"header"`
	// contains filtered or unexported fields
}

func NewMemoryResponseWriter

func NewMemoryResponseWriter() *MemoryResponseWriter

func (*MemoryResponseWriter) Bytes

func (m *MemoryResponseWriter) Bytes() []byte

func (*MemoryResponseWriter) Close

func (m *MemoryResponseWriter) Close()

func (*MemoryResponseWriter) FromJsonBytes

func (m *MemoryResponseWriter) FromJsonBytes(bs []byte) error

func (*MemoryResponseWriter) Fwd

func (*MemoryResponseWriter) Header

func (m *MemoryResponseWriter) Header() http.Header

func (*MemoryResponseWriter) JsonBytes

func (m *MemoryResponseWriter) JsonBytes() ([]byte, error)

func (*MemoryResponseWriter) Write

func (m *MemoryResponseWriter) Write(b []byte) (int, error)

func (*MemoryResponseWriter) WriteHeader

func (m *MemoryResponseWriter) WriteHeader(statusCode int)

type Opts

type Opts struct {
	Url string
	Ep  string
	To  string
}

type ReqMsg

type ReqMsg struct {
	Id   string `json:"id"`
	Data []byte `json:"data"`
	Err  string `json:"err"`
}

Jump to

Keyboard shortcuts

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