command

package
v0.0.0-...-7f1ae70 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 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 Commander

type Commander interface {
	Add(cmd string, handler domain.ActionFunc) error
	GetAction(command string) (domain.ActionFunc, error)
}

type HTTPHandler

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

func NewHTTPHandler

func NewHTTPHandler(c Commander, l Logger) *HTTPHandler

func (*HTTPHandler) ServeHTTP

func (h *HTTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type IFTTTTime

type IFTTTTime struct {
	time.Time
}

func (IFTTTTime) MarshalJSON

func (t IFTTTTime) MarshalJSON() ([]byte, error)

func (IFTTTTime) String

func (t IFTTTTime) String() string

func (*IFTTTTime) UnmarshalJSON

func (t *IFTTTTime) UnmarshalJSON(b []byte) error

type Logger

type Logger interface {
	Info(msg string, keysAndValues ...interface{})
	Error(err error, msg string, keysAndValues ...interface{})
}

type SudoContent

type SudoContent struct {
	Command string    `json:"command"`
	Created IFTTTTime `json:"created"`
}

Jump to

Keyboard shortcuts

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