api

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	GetState(ctx context.Context) (*asm.AuthResponse, *http.Response, error)
	GetScanByID(ctx context.Context, scanID string) (*asm.ScanResponse, *http.Response, error)
	GetScanSeedsById(ctx context.Context, scanID string) ([]asm.SeedsResponseInner, *http.Response, error)
	AddScanSeedById(ctx context.Context, scanID string, request asm.CreateScanSeedRequest) (*asm.NodeResponse, *http.Response, error)
	RemoveScanSeedById(ctx context.Context, scanID string, seedID string) (*http.Response, error)
}

func NewAPI

func NewAPI(cfg *config.Config, userAgent string, apiKey string) (API, error)

func NewMockAPI

func NewMockAPI(t *testing.T) API

type MockAPI

type MockAPI struct {
	mock.Mock
}

func (*MockAPI) AddScanSeedById

func (m *MockAPI) AddScanSeedById(ctx context.Context, scanID string, request asm.CreateScanSeedRequest) (*asm.NodeResponse, *http.Response, error)

func (*MockAPI) GetScanByID

func (m *MockAPI) GetScanByID(ctx context.Context, scanID string) (*asm.ScanResponse, *http.Response, error)

func (*MockAPI) GetScanSeedsById

func (m *MockAPI) GetScanSeedsById(ctx context.Context, scanID string) ([]asm.SeedsResponseInner, *http.Response, error)

func (*MockAPI) GetState

func (m *MockAPI) GetState(ctx context.Context) (*asm.AuthResponse, *http.Response, error)

func (*MockAPI) RemoveScanSeedById

func (m *MockAPI) RemoveScanSeedById(ctx context.Context, scanID string, seedID string) (*http.Response, error)

Jump to

Keyboard shortcuts

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