Documentation ¶
Index ¶
- Constants
- func AskChrome(c Config, req *http.Request) (response interface{}, err error)
- func ByteArrayToInt32(arr [4]byte) int32
- func Int32ToByteArray(i int32) [4]byte
- func ReadAllOrDieTrying(r io.Reader, b []byte) (n int, err error)
- func ReadFromChrome(m interface{}) (n int64, err error)
- func ReadInt32(r io.Reader, i *int32) (n int64, err error)
- func ResponseFromReader(httpRequestReader io.Reader, conn net.Conn) (resp *http.Response, err error)
- func ServeHTTP(w http.ResponseWriter, req *http.Request)
- func StateDirectory() (v string, err error)
- func Symlink(oldPath, newPath string) (err error)
- func WriteAllOrDieTrying(w io.Writer, b []byte) (n int, err error)
- func WriteToChrome(m interface{}) (n int64, err error)
- type Config
- type InstallJSON
- type JsonAnything
- type JsonObject
- type Request
- type ServerSocket
Constants ¶
View Source
const StatusBadBoy = http.StatusBadRequest
Variables ¶
This section is empty.
Functions ¶
func AskChrome ¶
TODO figure out which method retunrs err == io.EOF and set err to nil
func ResponseFromReader ¶
func ServeHTTP ¶
func ServeHTTP(w http.ResponseWriter, req *http.Request)
Types ¶
type Config ¶
type InstallJSON ¶
type InstallJSON struct { Name string `json:"name"` Description string `json:"description"` Path string `json:"path"` Type string `json:"type"` AllowedOrigins []string `json:"allowed_origins"` }
func MakeInstallJSON ¶
func MakeInstallJSON(p string, ids ...string) (ij InstallJSON, err error)
type JsonAnything ¶
type JsonAnything = interface{}
type JsonObject ¶
type JsonObject = map[string]JsonAnything
type Request ¶
type Request JsonObject
func NewRequest ¶
func NewRequest(in *http.Request, body JsonAnything) (out Request)
type ServerSocket ¶
type ServerSocket struct { SockPath string Address *net.UnixAddr Listener *net.UnixListener }
func (*ServerSocket) Listen ¶
func (s *ServerSocket) Listen() (err error)
Click to show internal directories.
Click to hide internal directories.