budtest

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

func (*App) Execute

func (a *App) Execute(ctx context.Context, args ...string) (stdout Stdio, stderr Stdio, err error)

func (*App) Exists

func (a *App) Exists(paths ...string) error

func (*App) NotExists

func (a *App) NotExists(paths ...string) error

func (*App) Start

func (a *App) Start(ctx context.Context) (*Server, error)

type Compiler

type Compiler struct {
	Flag        runtime_bud.Flag
	Files       map[string]string // String files (convenient)
	BFiles      map[string][]byte // Byte files (for images and binaries)
	Modules     modcache.Modules  // name@version[path[data]]
	NodeModules map[string]string // name[version]
	Env         bud.Env
	CacheDir    string
	// contains filtered or unexported fields
}

func New

func New(dir string) *Compiler

func (*Compiler) Compile

func (c *Compiler) Compile(ctx context.Context) (p *Project, err error)

type Project

type Project struct {

	// Used to adjust files over time
	Files       map[string]string // String files (convenient)
	BFiles      map[string][]byte // Byte files (for images and binaries)
	Modules     modcache.Modules  // name@version[path[data]]
	NodeModules map[string]string // name[version]
	// contains filtered or unexported fields
}

func (*Project) Build

func (p *Project) Build(ctx context.Context) (*App, error)

func (*Project) Directory

func (p *Project) Directory(paths ...string) string

func (*Project) Execute

func (p *Project) Execute(ctx context.Context, args ...string) (stdout Stdio, stderr Stdio, err error)

func (*Project) Exists

func (p *Project) Exists(paths ...string) error

func (*Project) Rewrite

func (p *Project) Rewrite() error

Rewrite files

func (*Project) Run

func (p *Project) Run(ctx context.Context) (*Server, error)

type Response

type Response struct {
	*http.Response
}

func (*Response) ContainsBody

func (r *Response) ContainsBody(expect string) error

func (*Response) Expect

func (r *Response) Expect(expect string) error

func (*Response) ExpectHeaders

func (r *Response) ExpectHeaders(expect string) error

func (*Response) Query

func (r *Response) Query(selector string) (*goquery.Selection, error)

type Server

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

func (*Server) Close

func (s *Server) Close() error

func (*Server) Delete

func (s *Server) Delete(path string, body io.Reader) (*Response, error)

func (*Server) DeleteJSON

func (s *Server) DeleteJSON(path string, body io.Reader) (*Response, error)

func (*Server) Get

func (s *Server) Get(path string) (*Response, error)

func (*Server) GetJSON

func (s *Server) GetJSON(path string) (*Response, error)

func (*Server) Patch

func (s *Server) Patch(path string, body io.Reader) (*Response, error)

func (*Server) PatchJSON

func (s *Server) PatchJSON(path string, body io.Reader) (*Response, error)

func (*Server) Post

func (s *Server) Post(path string, body io.Reader) (*Response, error)

func (*Server) PostJSON

func (s *Server) PostJSON(path string, body io.Reader) (*Response, error)

func (*Server) Request

func (s *Server) Request(req *http.Request) (*Response, error)

func (*Server) Restart

func (s *Server) Restart(ctx context.Context) error

type Stdio

type Stdio string

func (Stdio) Contains

func (s Stdio) Contains(c string) error

func (Stdio) Expect

func (s Stdio) Expect(a string) error

func (Stdio) String

func (s Stdio) String() string

Jump to

Keyboard shortcuts

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