mocks

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API added in v0.0.10

type API struct {
	MockInitiateRun            func(api.InitiateRunConfig) (*api.InitiateRunResult, error)
	MockGetDebugConnectionInfo func(runID string) (api.DebugConnectionInfo, error)
	MockObtainAuthCode         func(api.ObtainAuthCodeConfig) (*api.ObtainAuthCodeResult, error)
	MockAcquireToken           func(tokenUrl string) (*api.AcquireTokenResult, error)
	MockWhoami                 func() (*api.WhoamiResult, error)
	MockSetSecretsInVault      func(api.SetSecretsInVaultConfig) (*api.SetSecretsInVaultResult, error)
	MockGetLeafVersions        func() (*api.LeafVersionsResult, error)
}

func (*API) AcquireToken added in v0.0.10

func (c *API) AcquireToken(tokenUrl string) (*api.AcquireTokenResult, error)

func (*API) GetDebugConnectionInfo added in v0.0.10

func (c *API) GetDebugConnectionInfo(runID string) (api.DebugConnectionInfo, error)

func (*API) GetLeafVersions added in v0.2.0

func (c *API) GetLeafVersions() (*api.LeafVersionsResult, error)

func (*API) InitiateRun added in v0.0.10

func (c *API) InitiateRun(cfg api.InitiateRunConfig) (*api.InitiateRunResult, error)

func (*API) ObtainAuthCode added in v0.0.10

func (c *API) ObtainAuthCode(cfg api.ObtainAuthCodeConfig) (*api.ObtainAuthCodeResult, error)

func (*API) SetSecretsInVault added in v0.0.12

func (c *API) SetSecretsInVault(cfg api.SetSecretsInVaultConfig) (*api.SetSecretsInVaultResult, error)

func (*API) Whoami added in v0.0.10

func (c *API) Whoami() (*api.WhoamiResult, error)

type DirEntry

type DirEntry struct {
	FileName    string
	IsDirectory bool
}

func (DirEntry) IsDir

func (d DirEntry) IsDir() bool

func (DirEntry) Name

func (d DirEntry) Name() string

type File added in v0.0.9

type File struct {
	*bytes.Buffer
}

func NewFile added in v0.0.9

func NewFile(content string) *File

func (*File) Close added in v0.0.9

func (f *File) Close() error

type FileSystem

type FileSystem struct {
	MockCreate   func(name string) (fs.File, error)
	MockOpen     func(name string) (fs.File, error)
	MockReadDir  func(name string) ([]fs.DirEntry, error)
	MockMkdirAll func(path string) error
	MockGetwd    func() (string, error)
	MockExists   func(name string) (bool, error)
}

func (*FileSystem) Create added in v0.0.9

func (f *FileSystem) Create(name string) (fs.File, error)

func (*FileSystem) Exists added in v0.1.0

func (f *FileSystem) Exists(name string) (bool, error)

func (*FileSystem) Getwd added in v0.1.0

func (f *FileSystem) Getwd() (string, error)

func (*FileSystem) MkdirAll added in v0.0.9

func (f *FileSystem) MkdirAll(path string) error

func (*FileSystem) Open

func (f *FileSystem) Open(name string) (fs.File, error)

func (*FileSystem) ReadDir

func (f *FileSystem) ReadDir(name string) ([]fs.DirEntry, error)

type SSH added in v0.0.9

type SSH struct {
	MockConnect            func(addr string, cfg ssh.ClientConfig) error
	MockInteractiveSession func() error
}

func (*SSH) Close added in v0.0.9

func (s *SSH) Close() error

func (*SSH) Connect added in v0.0.9

func (s *SSH) Connect(addr string, cfg ssh.ClientConfig) error

func (*SSH) InteractiveSession added in v0.0.9

func (s *SSH) InteractiveSession() error

Jump to

Keyboard shortcuts

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