testutils

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBool

func NewBool(b bool) *bool

func NewInt64

func NewInt64(v int64) *int64

func NewNatsObjectStore

func NewNatsObjectStore(t *testing.T, nc *nats.Conn) jetstream.ObjectStore

func NewNatsServer

func NewNatsServer() *server.Server

func NewNatsServerAndConnection

func NewNatsServerAndConnection(t *testing.T) (*server.Server, *nats.Conn)

func NewString

func NewString(s string) *string

Types

type CreateResult

type CreateResult struct {
	Name string
}

type FS

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

func NewFS

func NewFS(resultCh chan<- any) *FS

func (*FS) Create

func (fs *FS) Create(name string) (risoros.File, error)

func (*FS) Mkdir

func (fs *FS) Mkdir(name string, perm risoros.FileMode) error

func (*FS) MkdirAll

func (fs *FS) MkdirAll(path string, perm risoros.FileMode) error

func (*FS) Open

func (fs *FS) Open(name string) (risoros.File, error)

func (*FS) OpenFile

func (fs *FS) OpenFile(name string, flag int, perm risoros.FileMode) (risoros.File, error)

func (*FS) ReadDir

func (fs *FS) ReadDir(name string) ([]risoros.DirEntry, error)

func (*FS) ReadFile

func (fs *FS) ReadFile(name string) ([]byte, error)

func (*FS) Remove

func (fs *FS) Remove(name string) error

func (*FS) RemoveAll

func (fs *FS) RemoveAll(path string) error

func (*FS) Rename

func (fs *FS) Rename(oldpath, newpath string) error

func (*FS) Stat

func (fs *FS) Stat(name string) (risoros.FileInfo, error)
func (fs *FS) Symlink(oldname, newname string) error

func (*FS) WalkDir

func (fs *FS) WalkDir(root string, fn risoros.WalkDirFunc) error

func (*FS) WriteFile

func (fs *FS) WriteFile(name string, data []byte, perm risoros.FileMode) error

type MkdirAllResult

type MkdirAllResult struct {
	Path string
	Perm risoros.FileMode
}

type MkdirResult

type MkdirResult struct {
	Name string
	Perm risoros.FileMode
}

type OpenFileResult

type OpenFileResult struct {
	Name string
	Flag int
	Perm risoros.FileMode
}

type OpenResult

type OpenResult struct {
	Name string
}

type ReadDirResult

type ReadDirResult struct {
	Name string
}

type ReadFileResult

type ReadFileResult struct {
	Name string
}

type RemoveAllResult

type RemoveAllResult struct {
	Path string
}

type RemoveResult

type RemoveResult struct {
	Name string
}

type RenameResult

type RenameResult struct {
	OldPath string
	NewPath string
}

type Request

type Request struct {
	FSubject      string
	FReplySubject string
	FData         []byte
	ResponseCh    chan []byte
}

func (Request) Data

func (r Request) Data() []byte

func (Request) Error

func (r Request) Error(code, description string, data []byte, opts ...micro.RespondOpt) error

func (Request) Headers

func (r Request) Headers() micro.Headers

func (Request) Reply

func (r Request) Reply() string

func (Request) Respond

func (r Request) Respond(bytes []byte, opt ...micro.RespondOpt) error

func (Request) RespondJSON

func (r Request) RespondJSON(a any, opt ...micro.RespondOpt) error

func (Request) Subject

func (r Request) Subject() string

type StatResult

type StatResult struct {
	Name string
}

type SymlinkResult

type SymlinkResult struct {
	OldName string
	NewName string
}

type WalkDirResult

type WalkDirResult struct {
	Root string
	Fn   risoros.WalkDirFunc
}

type WriteFileResult

type WriteFileResult struct {
	Name string
	Data []byte
	Perm risoros.FileMode
}

Jump to

Keyboard shortcuts

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