margo_pkg

package
v19.10.22+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: MIT Imports: 33 Imported by: 0

README

Documentation

Index

Constants

View Source
const SrcPkg = "src"

Variables

This section is empty.

Functions

func Main

func Main()

Types

type AutoInstOptions

type AutoInstOptions struct {
	// if ImportPaths is empty, Src is parsed in order to populate it
	ImportPaths []string
	Src         string

	// the environment variables as passed by the client - they should not be merged with os.Environ(...)
	// GOPATH is be valid
	Env map[string]string

	// the installsuffix to use for pkg paths
	InstallSuffix string
}

type Broker

type Broker struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewBroker

func NewBroker(r io.Reader, w io.Writer, tag string) *Broker

func (*Broker) Loop

func (b *Broker) Loop(decorate bool, wait bool)

func (*Broker) Send

func (b *Broker) Send(resp Response) error

func (*Broker) SendNoLog

func (b *Broker) SendNoLog(resp Response) error

type Caller

type Caller interface {
	Call() (res interface{}, err string)
}

type Doc

type Doc struct {
	Src  string `json:"src"`
	Pkg  string `json:"pkg"`
	Name string `json:"name"`
	Kind string `json:"kind"`
	Fn   string `json:"fn"`
	Row  int    `json:"row"`
	Col  int    `json:"col"`
}

type Job

type Job struct {
	Req *Request
	Cl  Caller
}

type M

type M map[string]interface{}

type Method

type Method func(*Broker) Caller

type Registry

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

func (*Registry) Lookup

func (r *Registry) Lookup(name string) Method

func (*Registry) Register

func (r *Registry) Register(name string, method Method)

type Request

type Request struct {
	Method string
	Token  string
}

type Res

type Res struct {
	FileDecls []*mDeclarationsDecl `json:"file_decls"`
	PkgDecls  []*mDeclarationsDecl `json:"pkg_decls"`
}

type Response

type Response struct {
	Token string      `json:"token"`
	Error string      `json:"error"`
	Tag   string      `json:"tag"`
	Data  interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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