cli

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 54 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagBenchSize         = "size"
	FlagBenchFiles        = "files"
	FlagBenchDepth        = "depth"
	FlagBenchIterations   = "iterations"
	FlagBenchNoCleanup    = "no-cleanup"
	FlagBenchPollInterval = "poll-interval"
)

Bench flag constants

View Source
const (
	// DocumentationURL is the URL for the Pinner CLI documentation.
	DocumentationURL = "https://docs.pinner.xyz"

	// TutorialCID is a sample v1 CID for use in tutorial examples.
	TutorialCID = "bafybeie7m2fsbt6sjtn7tymyb6sim7iiyz6szl4ethtn7anzx4frzfzipu"
)
View Source
const (
	FlagJSON    = "json"
	FlagVerbose = "verbose"
	FlagQuiet   = "quiet"
	FlagUnmask  = "unmask"
)

Global/Output flags

View Source
const (
	FlagAuthToken   = "auth-token"
	FlagEmail       = "email"
	FlagPassword    = "password"
	FlagFirstName   = "first-name"
	FlagLastName    = "last-name"
	FlagOTPCode     = "otp-code"
	FlagKeyName     = "key-name"
	FlagKey         = "key"
	FlagNoCreateKey = "no-create-key"
	FlagForce       = "force"
	FlagToken       = "token"
	FlagOTP         = "otp"
)

Authentication flags

View Source
const (
	FlagName        = "name"
	FlagWait        = "wait"
	FlagNoWait      = "no-wait"
	FlagConfirm     = "confirm"
	FlagLimit       = "limit"
	FlagMemoryLimit = "memory-limit"
	FlagStatus      = "status"
	FlagWatch       = "watch"
	FlagFile        = "file"
	FlagParallel    = "parallel"
	FlagContinue    = "continue"
	FlagDryRun      = "dry-run"
	FlagSet         = "set"
	FlagClear       = "clear"
	FlagYes         = "yes"
	FlagAll         = "all"
	FlagOperation   = "operation"
	FlagSearch      = "search"
	FlagProtocol    = "protocol"
)

Operation flags

View Source
const (
	FlagChunkSize = "chunk-size"
	FlagChunker   = "chunker"
	FlagMaxLinks  = "max-links"
)

Upload CAR builder flags

View Source
const (
	FlagDomain       = "domain"
	FlagCID          = "cid"
	FlagTargetHash   = "target-hash"
	FlagTargetType   = "target-type"
	FlagDNSHosting   = "dns-hosting"
	FlagNoDNSHosting = "no-dns-hosting"
)

Websites flags

View Source
const (
	FlagNameservers = "nameservers"
	FlagContent     = "content"
	FlagType        = "type"
	FlagTTL         = "ttl"
	FlagDisabled    = "disabled"
)

DNS flags

View Source
const (
	FlagMeta      = "meta"
	FlagClearMeta = "clear-meta"
)

Metadata flags

View Source
const (
	FlagPlanID            = "plan-id"
	FlagUserID            = "user-id"
	FlagDescription       = "description"
	FlagUploadLimit       = "upload-limit"
	FlagDownloadLimit     = "download-limit"
	FlagStorageLimit      = "storage-limit"
	FlagAmount            = "amount"
	FlagCurrency          = "currency"
	FlagGatewayID         = "gateway-id"
	FlagPosition          = "position"
	FlagRetentionDays     = "retention-days"
	FlagSource            = "source"
	FlagQuotaType         = "quota-type"
	FlagIsActive          = "is-active"
	FlagIsDefault         = "is-default"
	FlagIsPublic          = "is-public"
	FlagPrice             = "price"
	FlagCadence           = "cadence"
	FlagQuotaPlanID       = "quota-plan-id"
	FlagRollingDays       = "rolling-days"
	FlagAllowFree         = "allow-free"
	FlagPricelineID       = "priceline-id"
	FlagMode              = "mode"
	FlagDirection         = "direction"
	FlagOlderThan         = "older-than"
	FlagForceDelete       = "force-delete"
	FlagWindowType        = "window-type"
	FlagExpiry            = "expiry"
	FlagFeatures          = "features"
	FlagEnforcementPolicy = "enforcement-policy"
	FlagUploadThreshold   = "upload-threshold"
	FlagDownloadThreshold = "download-threshold"
	FlagStorageThreshold  = "storage-threshold"
	FlagWindowDuration    = "window-duration"
	FlagWindowStartHour   = "window-start-hour"
	FlagWindowTimezone    = "window-timezone"
)

Admin command flags

View Source
const (
	CmdPriceLines         = "price-lines"
	CmdPricingPlans       = "pricing-plans"
	CmdPricingPlanPeriods = "pricing-plan-periods"
	CmdSubscribers        = "subscribers"
	CmdCredits            = "credits"
	CmdOverview           = "overview"
	CmdQuota              = "quota"
	CmdBilling            = "billing"
	CmdList               = "list"
	CmdGet                = "get"
	CmdCreate             = "create"
	CmdUpdate             = "update"
	CmdDelete             = "delete"
	CmdAddPlan            = "add-plan"
	CmdDeletePlan         = "delete-plan"
	CmdUpdatePlanPosition = "update-plan-position"
	CmdCancel             = "cancel"
	CmdAbortCancel        = "abort-cancel"
	CmdChangePlan         = "change-plan"
	CmdPause              = "pause"
	CmdResume             = "resume"
	CmdListGateway        = "list-gateway"
	CmdListUser           = "list-user"
	CmdRestore            = "restore"
	CmdPurge              = "purge"
	CmdUserBalance        = "user-balance"
	CmdUserDeletedCredits = "user-deleted-credits"
	CmdSetDefault         = "set-default"
	CmdReconcile          = "reconcile"
	CmdCleanup            = "cleanup"
	CmdPlans              = "plans"
	CmdAllowances         = "allowances"
	CmdUserConfigs        = "user-configs"
	CmdStats              = "stats"
	CmdReset              = "reset"
	CmdSync               = "sync"
	CmdSyncAll            = "sync-all"
	CmdBlock              = "block"
	CmdUnblock            = "unblock"
	CmdWebsites           = "websites"
	CmdAdmin              = "admin"
	CmdPprof              = "pprof"
	CmdSetBlockRate       = "set-block-rate"
	CmdSetMutexFraction   = "set-mutex-fraction"
	CmdIndex              = "index"
	CmdCmdline            = "cmdline"
	CmdGoroutine          = "goroutine"
	CmdHeap               = "heap"
	CmdMutex              = "mutex"
	CmdCPU                = "cpu"
	CmdSymbol             = "symbol"
	CmdThreadcreate       = "threadcreate"
	CmdTrace              = "trace"
	CmdStatus             = "status"
)

Admin command name constants

View Source
const (
	DryRunOptionName            = "Name"
	DryRunOptionWait            = "Wait for completion"
	DryRunOptionNoWait          = "No wait (fire and forget)"
	DryRunOptionParallel        = "Parallel operations"
	DryRunOptionContinueOnError = "Continue on error"
	DryRunOptionConfirm         = "Confirmation required"
	DryRunOptionInputType       = "Input type"
	DryRunOptionPath            = "Path"
	DryRunOptionMemoryLimit     = "Memory limit"
	DryRunOptionChunkSize       = "Chunk size"
	DryRunOptionChunker         = "Chunker strategy"
	DryRunOptionMaxLinks        = "Max links"
	DryRunOptionCID             = "CID"
	DryRunOptionAction          = "Action"
	DryRunOptionKey             = "Key"
	DryRunOptionCurrentValue    = "Current value"
	DryRunOptionNewValue        = "New value"
	DryRunOptionDescription     = "Description"
)

Dry run option key constants

View Source
const ConfigEnvPrefix = "PINNER_"

ConfigEnvPrefix is the environment variable prefix for configuration keys.

View Source
const ConfigValueNotSet = "(not set)"

Sentinel constant for unset configuration values

View Source
const (
	FlagOutput = "output"
)
View Source
const (
	FlagSecure = "secure"
)

Connection/Config flags

Variables

View Source
var (
	// Authentication errors
	ErrNotAuthenticated = errors.New("not authenticated")

	// Input validation errors
	ErrPathRequired   = errors.New("path is required")
	ErrCIDRequired    = errors.New("CID is required")
	ErrInvalidCID     = errors.New("invalid CID")
	ErrNoCIDsProvided = errors.New("no CIDs provided")

	// File system errors
	ErrFileNotFound      = errors.New("file not found")
	ErrDirectoryNotFound = errors.New("directory not found")
	ErrPermissionDenied  = errors.New("permission denied")

	// Pinning errors
	ErrPinNotFound     = errors.New("pin not found")
	ErrPinningFailed   = errors.New("pinning failed")
	ErrStatusCheck     = errors.New("failed to check pin status")
	ErrUnpinAllAborted = errors.New("unpin-all aborted")

	// Upload errors
	ErrUploadFailed      = errors.New("upload failed")
	ErrUploadInterrupted = errors.New("upload interrupted")

	// Download errors
	ErrDownloadFailed = errors.New("download failed")

	// Network errors
	ErrNetworkTimeout   = errors.New("network timeout")
	ErrConnectionFailed = errors.New("connection failed")

	// Configuration errors
	ErrConfigNotFound = errors.New("configuration not found")
	ErrConfigInvalid  = errors.New("configuration invalid")

	// Operation errors
	ErrOperationFailed    = errors.New("operation failed")
	ErrOperationNotFound  = errors.New("operation not found")
	ErrServiceUnavailable = errors.New("service unavailable")

	// Benchmark errors
	ErrBenchmarkFailed = errors.New("benchmark failed")
)

Predefined error types for consistent error handling across the CLI. Use errors.Is() to check for these errors instead of string matching.

Functions

func ApplySecureConfig

func ApplySecureConfig(cmd *cli.Command, cfgMgr config.Manager) bool

ApplySecureConfig applies secure flag configuration to the config manager and persists it. This should only be used for explicit configuration changes (e.g., setup wizard, config set). For runtime CLI flag overrides, use GetSecureSetting() instead. Deprecated: Use GetSecureSetting() for runtime overrides, or explicit SetSecure() with validation.

func BenchDepthFlag

func BenchDepthFlag() *cli.IntFlag

BenchDepthFlag returns a flag for setting the directory nesting depth.

func BenchFilesFlag

func BenchFilesFlag() *cli.IntFlag

BenchFilesFlag returns a flag for setting the number of random files.

func BenchIterationsFlag

func BenchIterationsFlag() *cli.IntFlag

BenchIterationsFlag returns a flag for setting the number of iterations.

func BenchNoCleanupFlag

func BenchNoCleanupFlag() *cli.BoolFlag

BenchNoCleanupFlag returns a flag to skip cleanup after benchmark.

func BenchPollIntervalFlag

func BenchPollIntervalFlag() *cli.DurationFlag

BenchPollIntervalFlag returns a flag for setting the stage polling interval.

func BenchSizeFlag

func BenchSizeFlag() *cli.StringFlag

BenchSizeFlag returns a flag for setting the random data size.

func BuildTutorialCommandsTable

func BuildTutorialCommandsTable(rootCmd *cli.Command) ([]string, [][]string)

BuildTutorialCommandsTable returns headers and rows for displaying tutorial commands.

func BuildTutorialExamplesTable

func BuildTutorialExamplesTable(rootCmd *cli.Command) ([]string, [][]string)

BuildTutorialExamplesTable returns headers and rows for displaying tutorial examples.

func CIDFlag

func CIDFlag() *cli.StringFlag

CIDFlag returns a flag for the target CID.

func ChunkSizeFlag

func ChunkSizeFlag() *cli.Int64Flag

ChunkSizeFlag returns a flag for setting the UnixFS chunk size in bytes.

func ChunkerFlag

func ChunkerFlag() *cli.StringFlag

ChunkerFlag returns a flag for setting the DAG layout strategy.

func ClearMetaFlag added in v0.2.0

func ClearMetaFlag() *cli.BoolFlag

ClearMetaFlag returns a flag for clearing all metadata.

func ConfirmFlag

func ConfirmFlag() *cli.BoolFlag

func ContentFlag

func ContentFlag() *cli.StringFlag

ContentFlag returns a flag for DNS record content.

func ContinueFlag

func ContinueFlag() *cli.BoolFlag

ContinueFlag returns a flag to continue on error.

func DNSHostingFlag

func DNSHostingFlag() *cli.BoolFlag

DNSHostingFlag returns a flag for enabling DNS hosting.

func DisabledFlag

func DisabledFlag() *cli.BoolFlag

DisabledFlag returns a flag for disabling DNS records.

func DomainFlag

func DomainFlag() *cli.StringFlag

DomainFlag returns a flag for the website domain.

func DryRunFlag

func DryRunFlag() *cli.BoolFlag

DryRunFlag returns a flag for dry-run mode.

func DryRunOption

func DryRunOption(key, value string) map[string]string

DryRunOption creates an option entry map for dry-run previews.

func FileFlag

func FileFlag() *cli.StringFlag

FileFlag returns a flag for reading CIDs from a file.

func ForceFlag

func ForceFlag() *cli.BoolFlag

ForceFlag returns a flag for forcing operations.

func FormatCurrency

func FormatCurrency(amount float64, code CurrencyCode) string

FormatCurrency formats an amount with the given currency code.

func FormatError

func FormatError(err error, verbose bool) string

FormatError converts an error into a user-friendly message. It checks the error chain for known error types using errors.Is(). In verbose mode, the full error chain is included.

func FormatUSD

func FormatUSD(amount float32) string

FormatUSD formats a USD amount.

func GetAuthToken

func GetAuthToken(cmd *cli.Command, cfgMgr config.Manager) string

GetAuthToken returns the auth token from command flag, environment variable, or config (in that order).

func GetJWTPurpose

func GetJWTPurpose(token string) (string, error)

GetJWTPurpose extracts the purpose from a JWT token's audience claim. Returns the audience value or empty string if decoding fails. API keys have audience="api", login tokens have audience="login".

func GetSecureSetting

func GetSecureSetting(cmd *cli.Command, cfgMgr config.Manager) bool

GetSecureSetting returns the secure setting from CLI flag or config. CLI flag takes precedence over config, but does NOT persist to disk. Returns the secure setting (true for HTTPS, false for HTTP).

func GlobalFlags

func GlobalFlags() []cli.Flag

GlobalFlags returns flags that are available to all commands.

func LimitFlag

func LimitFlag() *cli.IntFlag

LimitFlag returns a flag for limiting results.

func MaxLinksFlag

func MaxLinksFlag() *cli.IntFlag

MaxLinksFlag returns a flag for setting the max links per DAG node.

func MemoryLimitFlag

func MemoryLimitFlag() *cli.Uint64Flag

MemoryLimitFlag returns a flag for setting the memory limit for CAR generation.

func MetaFlag added in v0.2.0

func MetaFlag() *cli.StringSliceFlag

MetaFlag returns a flag for setting metadata as key=value pairs.

func NameFlag

func NameFlag(usage string) *cli.StringFlag

NameFlag returns a flag for setting a custom name.

func NameserversFlag

func NameserversFlag() *cli.StringFlag

NameserversFlag returns a flag for custom nameservers.

func NewRootCommand

func NewRootCommand() *cli.Command

NewRootCommand creates and returns the root CLI command.

func NoDNSHostingFlag

func NoDNSHostingFlag() *cli.BoolFlag

NoDNSHostingFlag returns a flag for disabling DNS hosting.

func NoWaitFlag added in v0.2.0

func NoWaitFlag() *cli.BoolFlag

NoWaitFlag returns a flag for skipping the wait for operation completion. By default, upload and pin commands wait for pinning to complete. Use --no-wait to return immediately after submitting the request.

func OutputFlag

func OutputFlag() *cli.StringFlag

func ParallelFlag

func ParallelFlag() *cli.IntFlag

ParallelFlag returns a flag for setting parallel operation count.

func RenderDryRun

func RenderDryRun(output Output, preview DryRunPreview)

RenderDryRun renders a dry-run preview in a consistent format.

func RequiredCIDFlag

func RequiredCIDFlag() *cli.StringFlag

RequiredCIDFlag returns a required flag for the target CID.

func RequiredContentFlag

func RequiredContentFlag() *cli.StringFlag

RequiredContentFlag returns a required flag for DNS record content.

func RequiredDomainFlag

func RequiredDomainFlag() *cli.StringFlag

RequiredDomainFlag returns a required flag for the website domain.

func RequiredNameFlag

func RequiredNameFlag(usage string) *cli.StringFlag

RequiredNameFlag returns a required flag for setting a name.

func RequiredTargetHashFlag

func RequiredTargetHashFlag() *cli.StringFlag

RequiredTargetHashFlag returns a required flag for the target CID. Deprecated: Use RequiredCIDFlag instead.

func RequiredTypeFlag

func RequiredTypeFlag() *cli.StringFlag

RequiredTypeFlag returns a required flag for DNS record type.

func Run

func Run(ctx context.Context, args []string) error

Run executes the CLI application with the given context and arguments.

func SecureFlag

func SecureFlag() *cli.BoolFlag

SecureFlag returns a flag for setting the secure flag for HTTPS connections.

func StatusFlag

func StatusFlag() *cli.StringFlag

StatusFlag returns a flag for filtering by pin status.

func TTLFlag

func TTLFlag() *cli.UintFlag

TTLFlag returns a flag for DNS record TTL.

func TargetHashFlag

func TargetHashFlag() *cli.StringFlag

TargetHashFlag returns a flag for the target CID. Deprecated: Use CIDFlag instead.

func TargetTypeFlag

func TargetTypeFlag() *cli.StringFlag

TargetTypeFlag returns a flag for the target type.

func TypeFlag

func TypeFlag() *cli.StringFlag

TypeFlag returns a flag for DNS record type.

func WaitFlag

func WaitFlag() *cli.BoolFlag

WaitFlag returns a flag for waiting for operation completion. Deprecated: Use NoWaitFlag for upload/pin commands. WaitFlag is kept for IPNS publish which uses opt-in wait semantics.

func WaitFlagHidden added in v0.2.0

func WaitFlagHidden() *cli.BoolFlag

WaitFlagHidden returns a hidden --wait flag for backward compatibility. Waiting is now the default behavior, so this flag is a no-op.

func WatchFlag

func WatchFlag() *cli.BoolFlag

WatchFlag returns a flag for continuous monitoring of pins.

func WithTutorial

func WithTutorial(priority int, description, example string) map[string]interface{}

WithTutorial returns a metadata map with tutorial information for a command. This helper simplifies adding tutorial metadata to cli.Command definitions.

Example usage:

Metadata: WithTutorial(1, "Upload and pin a file", "pinner upload myfile.txt")

func WrapAuthError

func WrapAuthError(operation string, err error) error

WrapAuthError wraps an error with authentication context if it's an auth-related error. This provides consistent error messages across all services. Returns an error that includes both a human-readable message and the predefined error type for programmatic checking with errors.Is().

func WrapFileError

func WrapFileError(operation, path string, err error) error

WrapFileError wraps file-related errors with context about what operation failed.

func WrapNetworkError

func WrapNetworkError(operation string, err error) error

WrapNetworkError wraps errors with network troubleshooting hints.

Types

type APIKeyService added in v0.2.0

type APIKeyService interface {
	ListAPIKeys(ctx context.Context, search string) ([]*portalsdk.APIKey, int, error)
	CreateAPIKey(ctx context.Context, name string) (*portalsdk.APIKey, error)

	// DeleteAPIKey deletes an API key by UUID or name.
	// Blocked if the key is the one currently used for authentication, unless force is true.
	DeleteAPIKey(ctx context.Context, idOrName string, force bool) error

	// GetCurrentAPIKeyUUID returns the UUID from the auth token's JWT subject claim,
	// or empty string if not an API key JWT.
	GetCurrentAPIKeyUUID() string
	RequireAuthenticated() error
}

APIKeyService provides API key management operations.

func NewAPIKeyService added in v0.2.0

func NewAPIKeyService(authService AuthService, authToken string) APIKeyService

type APIKeyServiceFactory added in v0.2.0

type APIKeyServiceFactory func(authService AuthService, authToken string) APIKeyService

type AdminTokenProvider

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

AdminTokenProvider handles token exchange for admin services. It detects API-purpose tokens and exchanges them for login-purpose tokens as needed.

func NewAdminTokenProvider

func NewAdminTokenProvider(cfgMgr config.Manager) *AdminTokenProvider

NewAdminTokenProvider creates a new AdminTokenProvider.

func (*AdminTokenProvider) GetLoginToken

func (p *AdminTokenProvider) GetLoginToken(ctx context.Context) (string, error)

GetLoginToken returns a login-purpose JWT token, exchanging an API token if necessary. The exchanged token is cached for subsequent calls.

func (*AdminTokenProvider) Invalidate

func (p *AdminTokenProvider) Invalidate()

Invalidate clears the cached login token, forcing re-exchange on next access.

type AuthInfo

type AuthInfo struct {
	Authenticated bool `json:"authenticated"`
}

AuthInfo contains authentication status information

type AuthPrompter

type AuthPrompter interface {
	// PromptEmail prompts for and validates an email address.
	PromptEmail() (string, error)

	// PromptPassword prompts for and validates a password (with masking).
	PromptPassword() (string, error)

	// Password prompts for a password with masking (no validation).
	Password(label string) (string, error)

	// PromptString prompts for a string value with a label.
	PromptString(label string) (string, error)

	// PromptOTP prompts for a 6-digit OTP code.
	PromptOTP() (string, error)
}

AuthPrompter defines the interface for interactive user input.

type AuthService

type AuthService interface {
	// LoginCheck validates credentials and returns login result (including intermediate JWT for 2FA).
	LoginCheck(ctx context.Context, email, password string) (*portalsdk.LoginResult, error)

	// CompleteLogin completes authentication with a final JWT token.
	CompleteLogin(ctx context.Context, token, keyName string, noCreateKey bool) error

	// LoginWithOTP completes 2FA authentication using an intermediate JWT and OTP code.
	LoginWithOTP(ctx context.Context, intermediateJWT, otp, keyName string, noCreateKey bool) error

	// Register creates a new user account.
	Register(ctx context.Context, email, firstName, lastName, password string) error

	// SaveToken saves a JWT token to the config.
	SaveToken(token string) error

	// GetAPIEndpoint returns the configured API endpoint.
	GetAPIEndpoint() string

	// EnableOTP enables two-factor authentication for the account.
	EnableOTP(ctx context.Context, otpCode string) error

	// DisableOTP disables two-factor authentication for the account.
	DisableOTP(ctx context.Context, password string) error

	// Status checks if the current auth token is valid.
	Status(ctx context.Context) error

	// GetAuthenticatedClient returns an authenticated account client.
	// If the stored token is an API key JWT, it exchanges it for a login JWT.
	GetAuthenticatedClient(ctx context.Context) (portalsdk.AccountAPI, error)

	// GetLoginToken returns a login JWT token, exchanging an API key if needed.
	GetLoginToken(ctx context.Context) (string, error)
}

AuthService provides authentication operations. This interface allows mocking in tests.

func NewAuthService

func NewAuthService(configMgr config.Manager, output Output, apiEndpoint string, opts ...AuthServiceOption) AuthService

NewAuthService creates a new AuthService with the given dependencies. An account client will be created if not provided via WithAuthAccountClient option.

type AuthServiceDefault

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

AuthServiceDefault handles authentication business logic. It separates CLI concerns from authentication operations.

func (*AuthServiceDefault) CompleteLogin

func (s *AuthServiceDefault) CompleteLogin(ctx context.Context, token, keyName string, noCreateKey bool) error

CompleteLogin completes authentication with a final JWT token.

func (*AuthServiceDefault) DisableOTP

func (s *AuthServiceDefault) DisableOTP(ctx context.Context, password string) error

DisableOTP disables two-factor authentication for the account.

func (*AuthServiceDefault) EnableOTP

func (s *AuthServiceDefault) EnableOTP(ctx context.Context, otpCode string) error

EnableOTP enables two-factor authentication for the account.

func (*AuthServiceDefault) GetAPIEndpoint

func (s *AuthServiceDefault) GetAPIEndpoint() string

GetAPIEndpoint returns the configured API endpoint.

func (*AuthServiceDefault) GetAuthenticatedClient

func (s *AuthServiceDefault) GetAuthenticatedClient(ctx context.Context) (portalsdk.AccountAPI, error)

GetAuthenticatedClient returns an authenticated account client. If the stored token is an API key JWT, it uses LoginWithAPIKey to exchange it for a login JWT. If the stored token is a login JWT, it uses it directly.

func (*AuthServiceDefault) GetLoginToken

func (s *AuthServiceDefault) GetLoginToken(ctx context.Context) (string, error)

GetLoginToken returns a login JWT token, exchanging an API key JWT if needed.

func (*AuthServiceDefault) LoginCheck

func (s *AuthServiceDefault) LoginCheck(ctx context.Context, email, password string) (*portalsdk.LoginResult, error)

LoginCheck validates credentials and returns login result. This separates credential validation from authentication completion.

func (*AuthServiceDefault) LoginWithOTP

func (s *AuthServiceDefault) LoginWithOTP(ctx context.Context, intermediateJWT, otp, keyName string, noCreateKey bool) error

LoginWithOTP completes 2FA authentication using an intermediate JWT and OTP code.

func (*AuthServiceDefault) Register

func (s *AuthServiceDefault) Register(ctx context.Context, email, firstName, lastName, password string) error

Register creates a new user account.

func (*AuthServiceDefault) SaveToken

func (s *AuthServiceDefault) SaveToken(token string) error

SaveToken saves a JWT token to the config.

func (*AuthServiceDefault) Status

func (s *AuthServiceDefault) Status(ctx context.Context) error

Status checks if the current auth token is valid.

type AuthServiceFactory

type AuthServiceFactory func(cfgMgr config.Manager, output Output, apiEndpoint string) AuthService

AuthServiceFactory creates an auth service for testing.

type AuthServiceOption

type AuthServiceOption func(*AuthServiceDefault)

AuthServiceOption configures an AuthService.

func WithAuthAccountClient

func WithAuthAccountClient(client portalsdk.AccountAPI) AuthServiceOption

WithAuthAccountClient sets a custom account client for the auth service (useful for testing).

func WithClientFactory

func WithClientFactory(factory ClientFactory) AuthServiceOption

WithClientFactory sets a custom client factory for creating authenticated clients.

func WithPrompter

func WithPrompter(prompter AuthPrompter) AuthServiceOption

WithPrompter sets a custom auth prompter (useful for testing).

type AuthStepChoice

type AuthStepChoice int

AuthStepChoice represents user's choice for authentication step.

const (
	AuthChoiceCreateAccount AuthStepChoice = iota
	AuthChoiceSignIn
	AuthChoiceSkip
)

type BashCompletionDetector

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

BashCompletionDetector checks for bash completion configuration.

func (*BashCompletionDetector) ConfigPath

func (d *BashCompletionDetector) ConfigPath() string

func (*BashCompletionDetector) InstallCommand

func (d *BashCompletionDetector) InstallCommand() string

func (*BashCompletionDetector) IsConfigured

func (d *BashCompletionDetector) IsConfigured() (bool, error)

func (*BashCompletionDetector) Name

func (d *BashCompletionDetector) Name() string

type BatchOptions

type BatchOptions struct {
	Parallel   int
	ContinueOn bool
	Wait       bool
	Progress   bool
}

BatchOptions configures batch operations

type BatchProgressTracker

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

BatchProgressTracker tracks progress for batch operations.

func NewBatchProgressTracker

func NewBatchProgressTracker(total int, enabled bool, title string) *BatchProgressTracker

NewBatchProgressTracker creates a new batch progress tracker.

func (*BatchProgressTracker) Increment

func (bt *BatchProgressTracker) Increment()

Increment increments the completed count and updates progress.

func (*BatchProgressTracker) Start

func (bt *BatchProgressTracker) Start() error

Start begins displaying the progress bar.

func (*BatchProgressTracker) Stop

func (bt *BatchProgressTracker) Stop() error

Stop ensures the progress bar is stopped.

type BatchResult

type BatchResult struct {
	Total     int
	Succeeded []OperationResult
	Failed    []OperationError
	Skipped   []string
	Duration  time.Duration
}

BatchResult represents the result of a batch operation

type BenchCleanup

type BenchCleanup struct {
	Unpinned []BenchCleanupFailure `json:"unpinned"`
	Failed   []BenchCleanupFailure `json:"failed"`
	Duration time.Duration         `json:"duration"`
}

BenchCleanup tracks the cleanup (unpin) phase.

type BenchCleanupFailure

type BenchCleanupFailure struct {
	CID   string `json:"cid"`
	Error string `json:"error"`
}

BenchCleanupFailure records a CID that failed to unpin.

type BenchError

type BenchError struct {
	Message string         `json:"message"`
	Detail  map[string]any `json:"detail,omitempty"`
}

BenchError represents a structured error for JSON serialization.

func (*BenchError) String

func (e *BenchError) String() string

String returns the message for human-readable output.

type BenchInput

type BenchInput struct {
	Type    string `json:"type"` // "random" or "path"
	Size    int64  `json:"size"` // total bytes
	Files   int    `json:"files"`
	Depth   int    `json:"depth"`
	Path    string `json:"path,omitempty"`
	Storage string `json:"storage,omitempty"` // "memory" or "disk" (only for random type)
}

BenchInput describes the benchmark input configuration.

type BenchIteration

type BenchIteration struct {
	Number int           `json:"iteration"`
	CID    string        `json:"cid,omitempty"`
	Size   int64         `json:"size"`
	Stages []BenchStage  `json:"stages"`
	Error  *BenchError   `json:"error,omitempty"`
	Total  time.Duration `json:"total"`
	// contains filtered or unexported fields
}

BenchIteration tracks all stages for a single upload iteration.

type BenchOptions

type BenchOptions struct {
	SizeBytes       int64
	Files           int
	Depth           int
	Iterations      int
	Parallel        int
	NoCleanup       bool
	PollInterval    time.Duration
	MemoryLimit     uint64
	DryRun          bool
	Path            string
	ChunkSize       int64
	ChunkerStrategy string
	MaxLinks        int
}

BenchOptions configures the benchmark run.

type BenchResult

type BenchResult struct {
	Input      BenchInput       `json:"input"`
	Iterations []BenchIteration `json:"iterations"`
	Cleanup    BenchCleanup     `json:"cleanup"`
	Summary    BenchSummary     `json:"summary"`
}

BenchResult is the top-level result of a benchmark run.

type BenchService

type BenchService interface {
	Run(ctx context.Context, opts BenchOptions) (*BenchResult, error)
	RequireAuthenticated() error
}

BenchService defines the interface for running benchmarks.

func NewBenchService

func NewBenchService(cfgMgr config.Manager, output Output, uploadService UploadService, pinningService PinningService, accountClient portalsdk.AccountAPI) BenchService

NewBenchService creates a new BenchService with the given dependencies.

type BenchServiceDefault

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

BenchServiceDefault provides benchmark operations.

func (*BenchServiceDefault) RequireAuthenticated

func (s *BenchServiceDefault) RequireAuthenticated() error

RequireAuthenticated checks if the upload and pinning services are authenticated.

func (*BenchServiceDefault) Run

Run executes the benchmark with the given options.

type BenchServiceFactory

type BenchServiceFactory func(cfgMgr config.Manager, output Output, uploadService UploadService, pinningService PinningService, accountClient portalsdk.AccountAPI) BenchService

BenchServiceFactory creates a BenchService with dependencies.

type BenchStage

type BenchStage struct {
	Name      string        `json:"name"`
	Duration  time.Duration `json:"duration"`
	StartedAt time.Time     `json:"started_at"`
	EndedAt   time.Time     `json:"ended_at"`
}

BenchStage represents a single stage in the benchmark pipeline.

type BenchSummary

type BenchSummary struct {
	TotalDuration   time.Duration         `json:"total_duration"`
	UploadDuration  time.Duration         `json:"upload_duration"`
	CleanupDuration time.Duration         `json:"cleanup_duration"`
	Stages          map[string]StageStats `json:"stages"`
}

BenchSummary contains aggregated statistics across iterations.

type BillingAdminService

type BillingAdminService interface {
	RequireAuthenticated() error

	// Credit operations
	ListCredits(ctx context.Context, params *admin.GetApiBillingCreditsParams) ([]*admin.CreditItem, int, error)
	CreateCredit(ctx context.Context, req *admin.CreditCreateRequest) (*admin.Credit, error)
	GetCredit(ctx context.Context, creditID string) (*admin.Credit, error)
	DeleteCredit(ctx context.Context, creditID string) error
	RestoreCredit(ctx context.Context, creditID string) (*admin.Credit, error)
	PurgeCredits(ctx context.Context, req *admin.CreditPurgeRequest) (int, error)

	// User balance operations
	GetUserBalance(ctx context.Context, userID string) (*admin.UserBalance, error)
	GetUserDeletedCredits(ctx context.Context, userID string, params *admin.GetApiBillingUsersUserIdDeletedCreditsParams) ([]*admin.CreditItem, int, error)

	// Price line operations
	ListPriceLines(ctx context.Context) ([]*admin.PriceLine, int, error)
	CreatePriceLine(ctx context.Context, req *admin.PriceLineCreateRequest) (*admin.PriceLine, error)
	GetPriceLine(ctx context.Context, priceLineID string) (*admin.PriceLineDetailResponse, error)
	UpdatePriceLine(ctx context.Context, priceLineID string, req *admin.PriceLineUpdateRequest) (*admin.PriceLine, error)
	DeletePriceLine(ctx context.Context, priceLineID string) error

	// Pricing plan operations
	ListPricingPlans(ctx context.Context) ([]*admin.PricingPlanItem, int, error)
	GetPricingPlan(ctx context.Context, planID string) (*admin.PricingPlan, error)
	CreatePricingPlan(ctx context.Context, req *admin.PricingPlanCreateRequest) (*admin.PricingPlan, error)
	UpdatePricingPlan(ctx context.Context, planID string, req *admin.PricingPlanUpdateRequest) (*admin.PricingPlan, error)
	DeletePricingPlan(ctx context.Context, planID string) error

	// Pricing plan period operations
	ListPricingPlanPeriods(ctx context.Context) ([]*admin.PricingPlanPeriod, int, error)
	CreatePricingPlanPeriod(ctx context.Context, req *admin.PricingPlanPeriodCreateRequest) (*admin.PricingPlanPeriod, error)
	GetPricingPlanPeriod(ctx context.Context, periodID string) (*admin.PricingPlanPeriod, error)
	UpdatePricingPlanPeriod(ctx context.Context, periodID string, req *admin.PricingPlanPeriodUpdateRequest) (*admin.PricingPlanPeriod, error)
	DeletePricingPlanPeriod(ctx context.Context, periodID string) error

	// Subscriber operations
	ListSubscribers(ctx context.Context) ([]*admin.Subscriber, int, error)
	GetSubscriber(ctx context.Context, subscriberID string) (*admin.Subscriber, error)
	ListGatewaySubscribers(ctx context.Context, gatewayID string) ([]*admin.Subscriber, int, error)
	GetUserSubscribers(ctx context.Context, userID string) ([]*admin.Subscriber, int, error)

	// Subscription management operations
	CancelUserSubscription(ctx context.Context, userID string, req *admin.CancelSubscriptionRequest) (*admin.ManagementResult, error)
	AbortUserSubscriptionCancellation(ctx context.Context, userID string) (*admin.ManagementResult, error)
	ChangeUserPlan(ctx context.Context, userID string, req *admin.ChangePlanRequest) (*admin.PlanChangeResult, error)
	PauseUserSubscription(ctx context.Context, userID string) (*admin.ManagementResult, error)
	ResumeUserSubscription(ctx context.Context, userID string) (*admin.ManagementResult, error)

	// Price line plan operations
	AddPlanToPriceLine(ctx context.Context, priceLineID string, req *admin.AddPlanToPriceLineRequest) (*admin.PriceLineDetailResponse, error)
	DeletePlanFromPriceLine(ctx context.Context, priceLineID, planID string) error
	UpdatePlanPosition(ctx context.Context, priceLineID, planID string, req *admin.UpdatePlanPositionRequest) (*admin.PriceLineDetailResponse, error)

	// Sync operations
	SyncPricingPlan(ctx context.Context, planID string) error
	SyncAllPricingPlans(ctx context.Context) error
}

BillingAdminService defines the interface for billing admin operations.

func NewBillingAdminService

func NewBillingAdminService(cfgMgr config.Manager, output Output, apiEndpoint string) BillingAdminService

NewBillingAdminService creates a new BillingAdminService instance.

type BillingAdminServiceFactory

type BillingAdminServiceFactory func(cfgMgr config.Manager, output Output) BillingAdminService

BillingAdminServiceFactory creates a BillingAdminService with dependencies.

type ClientFactory

type ClientFactory func(endpoint, jwt string) portalsdk.AccountAPI

ClientFactory creates an account client with the given endpoint and JWT token.

type CompletionDetector

type CompletionDetector interface {
	// Name returns the shell name.
	Name() string

	// IsConfigured returns true if completion is configured for this shell.
	IsConfigured() (bool, error)

	// InstallCommand returns the command to install completion.
	InstallCommand() string

	// ConfigPath returns the path to the shell config file.
	ConfigPath() string
}

CompletionDetector defines the interface for checking shell completion configuration.

type CompletionDetectorFactory

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

CompletionDetectorFactory creates detectors for available shells.

func NewCompletionDetectorFactory

func NewCompletionDetectorFactory() (*CompletionDetectorFactory, error)

NewCompletionDetectorFactory creates a new detector factory.

func (*CompletionDetectorFactory) GetDetectors

func (f *CompletionDetectorFactory) GetDetectors() []CompletionDetector

GetDetectors returns all available completion detectors for the current OS.

type CompletionInfo

type CompletionInfo struct {
	Enabled    bool     `json:"enabled"`
	Shells     []string `json:"shells"`
	Configured []string `json:"configured"`
}

CompletionInfo contains shell completion status information

type ConfigInfo

type ConfigInfo struct {
	Path     string `json:"path"`
	Exists   bool   `json:"exists"`
	Secure   bool   `json:"secure"`
	Endpoint string `json:"endpoint"`
}

ConfigInfo contains configuration-related diagnostic information

type ConfigManagerFactory

type ConfigManagerFactory func() (config.Manager, error)

ConfigManagerFactory creates a config manager for testing.

type ConfigStepChoice

type ConfigStepChoice int

ConfigStepChoice represents user's choice for configuration step.

const (
	ConfigChoiceUseDefaults ConfigStepChoice = iota
	ConfigChoiceCustomEndpoint
	ConfigChoiceSkip
)

type ConfirmPrompter added in v0.2.0

type ConfirmPrompter interface {
	// Confirm displays a prompt requiring the user to type the expected value.
	// Returns the user's input.
	Confirm(label string, expected string) (string, error)
}

ConfirmPrompter prompts the user to confirm by typing an expected value.

type ContentSourceChoice

type ContentSourceChoice int

ContentSourceChoice represents user's choice for the content source step.

const (
	ContentChoiceCID  ContentSourceChoice = iota // User has a CID
	ContentChoiceExit                            // User needs to upload first
)

type ContinuePrompter added in v0.2.0

type ContinuePrompter interface {
	// Continue displays a "press enter to continue" prompt.
	Continue() error
}

ContinuePrompter prompts the user to continue.

type Currency

type Currency struct {
	Amount float64
	Code   CurrencyCode // "USD", "EUR", etc.
}

Currency represents a monetary amount with a currency code.

func NewCurrency

func NewCurrency(amount float64, code CurrencyCode) Currency

NewCurrency creates a new Currency with the given amount and code.

func (Currency) String

func (c Currency) String() string

String formats the currency as "Amount Code" (e.g., "19.99 USD").

type CurrencyCode

type CurrencyCode string

CurrencyCode represents an ISO 4217 currency code.

const (
	USD CurrencyCode = "USD"
)

Currency constants for ISO 4217 codes.

type CustomConfig

type CustomConfig struct {
	Endpoint string
	Secure   bool
}

CustomConfig represents custom configuration values.

type DNSModeChoice

type DNSModeChoice int

DNSModeChoice represents user's choice for the DNS mode step.

const (
	DNSModeSelfManaged   DNSModeChoice = iota // User manages DNS themselves
	DNSModePinnerManaged                      // Pinner manages DNS
)

type DNSService

type DNSService interface {
	RequireAuthenticated() error

	// Zone operations
	CreateZone(ctx context.Context, domain string, nameservers []string) (*ipfs.ZoneResponse, error)
	ListZones(ctx context.Context) ([]ipfs.ZoneListResponse, error)
	GetZone(ctx context.Context, id string) (*ipfs.ZoneResponse, error)
	DeleteZone(ctx context.Context, id string) error
	ValidateZone(ctx context.Context, id string) (*ipfs.ValidationResponse, error)

	// Record operations
	CreateRecord(ctx context.Context, id string, record ipfs.RecordRequest) (*ipfs.RecordResponse, error)
	ListRecords(ctx context.Context, id string) ([]ipfs.RecordResponse, error)
	GetRecord(ctx context.Context, id string, name string, recordType string) (*ipfs.RecordResponse, error)
	UpdateRecord(ctx context.Context, id string, name string, recordType string, record ipfs.RecordRequest) (*ipfs.RecordResponse, error)
	DeleteRecord(ctx context.Context, id string, name string, recordType string) error
}

DNSService defines the interface for DNS operations in the CLI.

func NewDNSService

func NewDNSService(cfgMgr config.Manager, output Output, apiEndpoint string, opts ...DNSServiceOption) DNSService

NewDNSService creates a new DNSService instance with the provided configuration.

type DNSServiceOption added in v0.2.0

type DNSServiceOption func(*dnsServiceCLI)

DNSServiceOption is a function that configures a dnsServiceCLI.

func WithDNSAuthToken added in v0.2.0

func WithDNSAuthToken(token string) DNSServiceOption

WithDNSAuthToken sets an auth token override that takes precedence over config.

func WithDNSClient added in v0.2.0

func WithDNSClient(client *ipfs.Client) DNSServiceOption

WithDNSClient sets a pre-configured ipfs.Client, bypassing the default ipfs.NewClient() call.

type DirEntry

type DirEntry struct {
	Name string `json:"name"`
	Size int64  `json:"size"`
	Type string `json:"type"`
}

type DoctorReport

type DoctorReport struct {
	Version        string         `json:"version"`
	OS             string         `json:"os"`
	Arch           string         `json:"arch"`
	Config         ConfigInfo     `json:"config"`
	Limits         LimitsInfo     `json:"limits"`
	Authentication AuthInfo       `json:"authentication"`
	Completion     CompletionInfo `json:"completion"`
}

DoctorReport contains diagnostic information about the pinner CLI environment

type DownloadResult

type DownloadResult struct {
	CID      string        `json:"cid"`
	Path     string        `json:"path"`
	Size     int64         `json:"size"`
	Duration time.Duration `json:"duration"`
}

type DownloadService

type DownloadService interface {
	Cat(ctx context.Context, ipfsPath string) (io.ReadCloser, error)
	Download(ctx context.Context, ipfsPath string, outputPath string, force bool) (*DownloadResult, error)
	ListDirectory(ctx context.Context, ipfsPath string) ([]DirEntry, error)
	FileSize(ctx context.Context, ipfsPath string) (int64, error)
	RequireAuthenticated() error
}

func NewDownloadService

func NewDownloadService(cfgMgr config.Manager, output Output, opts ...DownloadServiceOption) DownloadService

type DownloadServiceDefault

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

func (*DownloadServiceDefault) Cat

func (s *DownloadServiceDefault) Cat(ctx context.Context, ipfsPathStr string) (io.ReadCloser, error)

func (*DownloadServiceDefault) Download

func (s *DownloadServiceDefault) Download(ctx context.Context, ipfsPathStr string, outputPath string, force bool) (*DownloadResult, error)

func (*DownloadServiceDefault) FileSize

func (s *DownloadServiceDefault) FileSize(ctx context.Context, ipfsPathStr string) (int64, error)

func (*DownloadServiceDefault) ListDirectory

func (s *DownloadServiceDefault) ListDirectory(ctx context.Context, ipfsPathStr string) ([]DirEntry, error)

func (*DownloadServiceDefault) RequireAuthenticated

func (s *DownloadServiceDefault) RequireAuthenticated() error

type DownloadServiceFactory

type DownloadServiceFactory func(cfgMgr config.Manager, output Output, opts ...DownloadServiceOption) DownloadService

type DownloadServiceOption

type DownloadServiceOption func(*DownloadServiceDefault)

func WithDownloadAuthService

func WithDownloadAuthService(authSvc AuthService) DownloadServiceOption

func WithDownloadAuthToken

func WithDownloadAuthToken(token string) DownloadServiceOption

func WithDownloadIPFSEndpoint added in v0.2.0

func WithDownloadIPFSEndpoint(endpoint string) DownloadServiceOption

type DryRunPreview

type DryRunPreview struct {
	Operation string
	Endpoint  string
	Items     []string
	ItemLabel string
	MaxItems  int
	Options   map[string]string
}

DryRunPreview represents a dry-run preview configuration.

type Field

type Field struct {
	Label string
	Value string
}

Field represents a labeled key-value pair for display.

type FieldGroup

type FieldGroup struct {
	Title  string
	Fields []Field
	PadTop int
}

FieldGroup represents a titled collection of fields for structured display.

type FishCompletionDetector

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

FishCompletionDetector checks for fish completion configuration.

func (*FishCompletionDetector) ConfigPath

func (d *FishCompletionDetector) ConfigPath() string

func (*FishCompletionDetector) InstallCommand

func (d *FishCompletionDetector) InstallCommand() string

func (*FishCompletionDetector) IsConfigured

func (d *FishCompletionDetector) IsConfigured() (bool, error)

func (*FishCompletionDetector) Name

func (d *FishCompletionDetector) Name() string

type HTTPError

type HTTPError struct {
	StatusCode int
	Body       string
}

HTTPError represents an HTTP error response with structured detail.

func NewHTTPError

func NewHTTPError(statusCode int, body string) *HTTPError

NewHTTPError creates an HTTPError with the response body trimmed and JSON error fields extracted into a readable message.

func (*HTTPError) Error

func (e *HTTPError) Error() string

type IPNSService

type IPNSService interface {
	ListKeys(ctx context.Context) ([]ipfs.IPNSKeyResponse, error)
	CreateKey(ctx context.Context, name string, key *string) (*ipfs.IPNSKeyResponse, error)
	GetKey(ctx context.Context, id string) (*ipfs.IPNSKeyResponse, error)
	DeleteKey(ctx context.Context, id string) error
	Publish(ctx context.Context, cid string, keyName string, ttl *string) (*ipfs.IPNSPublishResponse, error)
	Republish(ctx context.Context, keyName string) (*ipfs.IPNSRepublishResponse, error)
	Resolve(ctx context.Context, name string) (*ipfs.IPNSResolveResponse, error)
	RequireAuthenticated() error
}

func NewIPNSService

func NewIPNSService(cfgMgr config.Manager, output Output, apiEndpoint string, opts ...IPNSServiceOption) IPNSService

type IPNSServiceFactory

type IPNSServiceFactory func(cfgMgr config.Manager, output Output, opts ...IPNSServiceOption) IPNSService

type IPNSServiceOption added in v0.2.0

type IPNSServiceOption func(*ipnsService)

IPNSServiceOption is a function that configures an ipnsService.

func WithIPNSAuthToken added in v0.2.0

func WithIPNSAuthToken(token string) IPNSServiceOption

WithIPNSAuthToken sets an auth token override that takes precedence over config.

func WithIPNSClient added in v0.2.0

func WithIPNSClient(client *ipfs.Client) IPNSServiceOption

WithIPNSClient sets a pre-configured ipfs.Client, bypassing the default ipfs.NewClient() call.

type LimitsInfo

type LimitsInfo struct {
	Memory     string `json:"memory"`
	MaxRetries int    `json:"maxRetries"`
}

LimitsInfo contains resource limits information

type ListGroup

type ListGroup struct {
	Title     string
	Fields    []Field
	Items     []string
	ItemLabel string
	MaxItems  int
	Footer    string
	PadTop    int
}

ListGroup represents a titled collection with fields and an optional item list.

type LsResult

type LsResult struct {
	CID     string     `json:"cid"`
	Count   int        `json:"entries"`
	Entries []DirEntry `json:"items"`
}

type MockAPIKeyService added in v0.2.0

type MockAPIKeyService struct {
	mock.Mock
}

MockAPIKeyService is an autogenerated mock type for the APIKeyService type

func NewMockAPIKeyService added in v0.2.0

func NewMockAPIKeyService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAPIKeyService

NewMockAPIKeyService creates a new instance of MockAPIKeyService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockAPIKeyService) CreateAPIKey added in v0.2.0

func (_mock *MockAPIKeyService) CreateAPIKey(ctx context.Context, name string) (*account.APIKey, error)

CreateAPIKey provides a mock function for the type MockAPIKeyService

func (*MockAPIKeyService) DeleteAPIKey added in v0.2.0

func (_mock *MockAPIKeyService) DeleteAPIKey(ctx context.Context, idOrName string, force bool) error

DeleteAPIKey provides a mock function for the type MockAPIKeyService

func (*MockAPIKeyService) EXPECT added in v0.2.0

func (*MockAPIKeyService) GetCurrentAPIKeyUUID added in v0.2.0

func (_mock *MockAPIKeyService) GetCurrentAPIKeyUUID() string

GetCurrentAPIKeyUUID provides a mock function for the type MockAPIKeyService

func (*MockAPIKeyService) ListAPIKeys added in v0.2.0

func (_mock *MockAPIKeyService) ListAPIKeys(ctx context.Context, search string) ([]*account.APIKey, int, error)

ListAPIKeys provides a mock function for the type MockAPIKeyService

func (*MockAPIKeyService) RequireAuthenticated added in v0.2.0

func (_mock *MockAPIKeyService) RequireAuthenticated() error

RequireAuthenticated provides a mock function for the type MockAPIKeyService

type MockAPIKeyService_CreateAPIKey_Call added in v0.2.0

type MockAPIKeyService_CreateAPIKey_Call struct {
	*mock.Call
}

MockAPIKeyService_CreateAPIKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAPIKey'

func (*MockAPIKeyService_CreateAPIKey_Call) Return added in v0.2.0

func (_c *MockAPIKeyService_CreateAPIKey_Call) Return(aPIKey *account.APIKey, err error) *MockAPIKeyService_CreateAPIKey_Call

func (*MockAPIKeyService_CreateAPIKey_Call) Run added in v0.2.0

func (*MockAPIKeyService_CreateAPIKey_Call) RunAndReturn added in v0.2.0

func (_c *MockAPIKeyService_CreateAPIKey_Call) RunAndReturn(run func(ctx context.Context, name string) (*account.APIKey, error)) *MockAPIKeyService_CreateAPIKey_Call

type MockAPIKeyService_DeleteAPIKey_Call added in v0.2.0

type MockAPIKeyService_DeleteAPIKey_Call struct {
	*mock.Call
}

MockAPIKeyService_DeleteAPIKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAPIKey'

func (*MockAPIKeyService_DeleteAPIKey_Call) Return added in v0.2.0

func (*MockAPIKeyService_DeleteAPIKey_Call) Run added in v0.2.0

func (*MockAPIKeyService_DeleteAPIKey_Call) RunAndReturn added in v0.2.0

type MockAPIKeyService_Expecter added in v0.2.0

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

func (*MockAPIKeyService_Expecter) CreateAPIKey added in v0.2.0

func (_e *MockAPIKeyService_Expecter) CreateAPIKey(ctx interface{}, name interface{}) *MockAPIKeyService_CreateAPIKey_Call

CreateAPIKey is a helper method to define mock.On call

  • ctx context.Context
  • name string

func (*MockAPIKeyService_Expecter) DeleteAPIKey added in v0.2.0

func (_e *MockAPIKeyService_Expecter) DeleteAPIKey(ctx interface{}, idOrName interface{}, force interface{}) *MockAPIKeyService_DeleteAPIKey_Call

DeleteAPIKey is a helper method to define mock.On call

  • ctx context.Context
  • idOrName string
  • force bool

func (*MockAPIKeyService_Expecter) GetCurrentAPIKeyUUID added in v0.2.0

GetCurrentAPIKeyUUID is a helper method to define mock.On call

func (*MockAPIKeyService_Expecter) ListAPIKeys added in v0.2.0

func (_e *MockAPIKeyService_Expecter) ListAPIKeys(ctx interface{}, search interface{}) *MockAPIKeyService_ListAPIKeys_Call

ListAPIKeys is a helper method to define mock.On call

  • ctx context.Context
  • search string

func (*MockAPIKeyService_Expecter) RequireAuthenticated added in v0.2.0

RequireAuthenticated is a helper method to define mock.On call

type MockAPIKeyService_GetCurrentAPIKeyUUID_Call added in v0.2.0

type MockAPIKeyService_GetCurrentAPIKeyUUID_Call struct {
	*mock.Call
}

MockAPIKeyService_GetCurrentAPIKeyUUID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCurrentAPIKeyUUID'

func (*MockAPIKeyService_GetCurrentAPIKeyUUID_Call) Return added in v0.2.0

func (*MockAPIKeyService_GetCurrentAPIKeyUUID_Call) Run added in v0.2.0

func (*MockAPIKeyService_GetCurrentAPIKeyUUID_Call) RunAndReturn added in v0.2.0

type MockAPIKeyService_ListAPIKeys_Call added in v0.2.0

type MockAPIKeyService_ListAPIKeys_Call struct {
	*mock.Call
}

MockAPIKeyService_ListAPIKeys_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAPIKeys'

func (*MockAPIKeyService_ListAPIKeys_Call) Return added in v0.2.0

func (_c *MockAPIKeyService_ListAPIKeys_Call) Return(aPIKeys []*account.APIKey, n int, err error) *MockAPIKeyService_ListAPIKeys_Call

func (*MockAPIKeyService_ListAPIKeys_Call) Run added in v0.2.0

func (*MockAPIKeyService_ListAPIKeys_Call) RunAndReturn added in v0.2.0

func (_c *MockAPIKeyService_ListAPIKeys_Call) RunAndReturn(run func(ctx context.Context, search string) ([]*account.APIKey, int, error)) *MockAPIKeyService_ListAPIKeys_Call

type MockAPIKeyService_RequireAuthenticated_Call added in v0.2.0

type MockAPIKeyService_RequireAuthenticated_Call struct {
	*mock.Call
}

MockAPIKeyService_RequireAuthenticated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequireAuthenticated'

func (*MockAPIKeyService_RequireAuthenticated_Call) Return added in v0.2.0

func (*MockAPIKeyService_RequireAuthenticated_Call) Run added in v0.2.0

func (*MockAPIKeyService_RequireAuthenticated_Call) RunAndReturn added in v0.2.0

type MockAuthPrompter

type MockAuthPrompter struct {
	mock.Mock
}

MockAuthPrompter is an autogenerated mock type for the AuthPrompter type

func NewMockAuthPrompter

func NewMockAuthPrompter(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAuthPrompter

NewMockAuthPrompter creates a new instance of MockAuthPrompter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockAuthPrompter) EXPECT

func (*MockAuthPrompter) Password

func (_mock *MockAuthPrompter) Password(label string) (string, error)

Password provides a mock function for the type MockAuthPrompter

func (*MockAuthPrompter) PromptEmail

func (_mock *MockAuthPrompter) PromptEmail() (string, error)

PromptEmail provides a mock function for the type MockAuthPrompter

func (*MockAuthPrompter) PromptOTP

func (_mock *MockAuthPrompter) PromptOTP() (string, error)

PromptOTP provides a mock function for the type MockAuthPrompter

func (*MockAuthPrompter) PromptPassword

func (_mock *MockAuthPrompter) PromptPassword() (string, error)

PromptPassword provides a mock function for the type MockAuthPrompter

func (*MockAuthPrompter) PromptString

func (_mock *MockAuthPrompter) PromptString(label string) (string, error)

PromptString provides a mock function for the type MockAuthPrompter

type MockAuthPrompter_Expecter

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

func (*MockAuthPrompter_Expecter) Password

func (_e *MockAuthPrompter_Expecter) Password(label interface{}) *MockAuthPrompter_Password_Call

Password is a helper method to define mock.On call

  • label string

func (*MockAuthPrompter_Expecter) PromptEmail

PromptEmail is a helper method to define mock.On call

func (*MockAuthPrompter_Expecter) PromptOTP

PromptOTP is a helper method to define mock.On call

func (*MockAuthPrompter_Expecter) PromptPassword

PromptPassword is a helper method to define mock.On call

func (*MockAuthPrompter_Expecter) PromptString

func (_e *MockAuthPrompter_Expecter) PromptString(label interface{}) *MockAuthPrompter_PromptString_Call

PromptString is a helper method to define mock.On call

  • label string

type MockAuthPrompter_Password_Call

type MockAuthPrompter_Password_Call struct {
	*mock.Call
}

MockAuthPrompter_Password_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Password'

func (*MockAuthPrompter_Password_Call) Return

func (*MockAuthPrompter_Password_Call) Run

func (*MockAuthPrompter_Password_Call) RunAndReturn

type MockAuthPrompter_PromptEmail_Call

type MockAuthPrompter_PromptEmail_Call struct {
	*mock.Call
}

MockAuthPrompter_PromptEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PromptEmail'

func (*MockAuthPrompter_PromptEmail_Call) Return

func (*MockAuthPrompter_PromptEmail_Call) Run

func (*MockAuthPrompter_PromptEmail_Call) RunAndReturn

type MockAuthPrompter_PromptOTP_Call

type MockAuthPrompter_PromptOTP_Call struct {
	*mock.Call
}

MockAuthPrompter_PromptOTP_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PromptOTP'

func (*MockAuthPrompter_PromptOTP_Call) Return

func (*MockAuthPrompter_PromptOTP_Call) Run

func (*MockAuthPrompter_PromptOTP_Call) RunAndReturn

type MockAuthPrompter_PromptPassword_Call

type MockAuthPrompter_PromptPassword_Call struct {
	*mock.Call
}

MockAuthPrompter_PromptPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PromptPassword'

func (*MockAuthPrompter_PromptPassword_Call) Return

func (*MockAuthPrompter_PromptPassword_Call) Run

func (*MockAuthPrompter_PromptPassword_Call) RunAndReturn

type MockAuthPrompter_PromptString_Call

type MockAuthPrompter_PromptString_Call struct {
	*mock.Call
}

MockAuthPrompter_PromptString_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PromptString'

func (*MockAuthPrompter_PromptString_Call) Return

func (*MockAuthPrompter_PromptString_Call) Run

func (*MockAuthPrompter_PromptString_Call) RunAndReturn

type MockAuthService

type MockAuthService struct {
	mock.Mock
}

MockAuthService is an autogenerated mock type for the AuthService type

func NewMockAuthService

func NewMockAuthService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAuthService

NewMockAuthService creates a new instance of MockAuthService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockAuthService) CompleteLogin

func (_mock *MockAuthService) CompleteLogin(ctx context.Context, token string, keyName string, noCreateKey bool) error

CompleteLogin provides a mock function for the type MockAuthService

func (*MockAuthService) DisableOTP

func (_mock *MockAuthService) DisableOTP(ctx context.Context, password string) error

DisableOTP provides a mock function for the type MockAuthService

func (*MockAuthService) EXPECT

func (*MockAuthService) EnableOTP

func (_mock *MockAuthService) EnableOTP(ctx context.Context, otpCode string) error

EnableOTP provides a mock function for the type MockAuthService

func (*MockAuthService) GetAPIEndpoint

func (_mock *MockAuthService) GetAPIEndpoint() string

GetAPIEndpoint provides a mock function for the type MockAuthService

func (*MockAuthService) GetAuthenticatedClient

func (_mock *MockAuthService) GetAuthenticatedClient(ctx context.Context) (account.AccountAPI, error)

GetAuthenticatedClient provides a mock function for the type MockAuthService

func (*MockAuthService) GetLoginToken

func (_mock *MockAuthService) GetLoginToken(ctx context.Context) (string, error)

GetLoginToken provides a mock function for the type MockAuthService

func (*MockAuthService) LoginCheck

func (_mock *MockAuthService) LoginCheck(ctx context.Context, email string, password string) (*account.LoginResult, error)

LoginCheck provides a mock function for the type MockAuthService

func (*MockAuthService) LoginWithOTP

func (_mock *MockAuthService) LoginWithOTP(ctx context.Context, intermediateJWT string, otp string, keyName string, noCreateKey bool) error

LoginWithOTP provides a mock function for the type MockAuthService

func (*MockAuthService) Register

func (_mock *MockAuthService) Register(ctx context.Context, email string, firstName string, lastName string, password string) error

Register provides a mock function for the type MockAuthService

func (*MockAuthService) SaveToken

func (_mock *MockAuthService) SaveToken(token string) error

SaveToken provides a mock function for the type MockAuthService

func (*MockAuthService) Status

func (_mock *MockAuthService) Status(ctx context.Context) error

Status provides a mock function for the type MockAuthService

type MockAuthService_CompleteLogin_Call

type MockAuthService_CompleteLogin_Call struct {
	*mock.Call
}

MockAuthService_CompleteLogin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CompleteLogin'

func (*MockAuthService_CompleteLogin_Call) Return

func (*MockAuthService_CompleteLogin_Call) Run

func (_c *MockAuthService_CompleteLogin_Call) Run(run func(ctx context.Context, token string, keyName string, noCreateKey bool)) *MockAuthService_CompleteLogin_Call

func (*MockAuthService_CompleteLogin_Call) RunAndReturn

func (_c *MockAuthService_CompleteLogin_Call) RunAndReturn(run func(ctx context.Context, token string, keyName string, noCreateKey bool) error) *MockAuthService_CompleteLogin_Call

type MockAuthService_DisableOTP_Call

type MockAuthService_DisableOTP_Call struct {
	*mock.Call
}

MockAuthService_DisableOTP_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisableOTP'

func (*MockAuthService_DisableOTP_Call) Return

func (*MockAuthService_DisableOTP_Call) Run

func (*MockAuthService_DisableOTP_Call) RunAndReturn

type MockAuthService_EnableOTP_Call

type MockAuthService_EnableOTP_Call struct {
	*mock.Call
}

MockAuthService_EnableOTP_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnableOTP'

func (*MockAuthService_EnableOTP_Call) Return

func (*MockAuthService_EnableOTP_Call) Run

func (*MockAuthService_EnableOTP_Call) RunAndReturn

type MockAuthService_Expecter

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

func (*MockAuthService_Expecter) CompleteLogin

func (_e *MockAuthService_Expecter) CompleteLogin(ctx interface{}, token interface{}, keyName interface{}, noCreateKey interface{}) *MockAuthService_CompleteLogin_Call

CompleteLogin is a helper method to define mock.On call

  • ctx context.Context
  • token string
  • keyName string
  • noCreateKey bool

func (*MockAuthService_Expecter) DisableOTP

func (_e *MockAuthService_Expecter) DisableOTP(ctx interface{}, password interface{}) *MockAuthService_DisableOTP_Call

DisableOTP is a helper method to define mock.On call

  • ctx context.Context
  • password string

func (*MockAuthService_Expecter) EnableOTP

func (_e *MockAuthService_Expecter) EnableOTP(ctx interface{}, otpCode interface{}) *MockAuthService_EnableOTP_Call

EnableOTP is a helper method to define mock.On call

  • ctx context.Context
  • otpCode string

func (*MockAuthService_Expecter) GetAPIEndpoint

GetAPIEndpoint is a helper method to define mock.On call

func (*MockAuthService_Expecter) GetAuthenticatedClient

func (_e *MockAuthService_Expecter) GetAuthenticatedClient(ctx interface{}) *MockAuthService_GetAuthenticatedClient_Call

GetAuthenticatedClient is a helper method to define mock.On call

  • ctx context.Context

func (*MockAuthService_Expecter) GetLoginToken

func (_e *MockAuthService_Expecter) GetLoginToken(ctx interface{}) *MockAuthService_GetLoginToken_Call

GetLoginToken is a helper method to define mock.On call

  • ctx context.Context

func (*MockAuthService_Expecter) LoginCheck

func (_e *MockAuthService_Expecter) LoginCheck(ctx interface{}, email interface{}, password interface{}) *MockAuthService_LoginCheck_Call

LoginCheck is a helper method to define mock.On call

  • ctx context.Context
  • email string
  • password string

func (*MockAuthService_Expecter) LoginWithOTP

func (_e *MockAuthService_Expecter) LoginWithOTP(ctx interface{}, intermediateJWT interface{}, otp interface{}, keyName interface{}, noCreateKey interface{}) *MockAuthService_LoginWithOTP_Call

LoginWithOTP is a helper method to define mock.On call

  • ctx context.Context
  • intermediateJWT string
  • otp string
  • keyName string
  • noCreateKey bool

func (*MockAuthService_Expecter) Register

func (_e *MockAuthService_Expecter) Register(ctx interface{}, email interface{}, firstName interface{}, lastName interface{}, password interface{}) *MockAuthService_Register_Call

Register is a helper method to define mock.On call

  • ctx context.Context
  • email string
  • firstName string
  • lastName string
  • password string

func (*MockAuthService_Expecter) SaveToken

func (_e *MockAuthService_Expecter) SaveToken(token interface{}) *MockAuthService_SaveToken_Call

SaveToken is a helper method to define mock.On call

  • token string

func (*MockAuthService_Expecter) Status

func (_e *MockAuthService_Expecter) Status(ctx interface{}) *MockAuthService_Status_Call

Status is a helper method to define mock.On call

  • ctx context.Context

type MockAuthService_GetAPIEndpoint_Call

type MockAuthService_GetAPIEndpoint_Call struct {
	*mock.Call
}

MockAuthService_GetAPIEndpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAPIEndpoint'

func (*MockAuthService_GetAPIEndpoint_Call) Return

func (*MockAuthService_GetAPIEndpoint_Call) Run

func (*MockAuthService_GetAPIEndpoint_Call) RunAndReturn

type MockAuthService_GetAuthenticatedClient_Call

type MockAuthService_GetAuthenticatedClient_Call struct {
	*mock.Call
}

MockAuthService_GetAuthenticatedClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAuthenticatedClient'

func (*MockAuthService_GetAuthenticatedClient_Call) Return

func (*MockAuthService_GetAuthenticatedClient_Call) Run

func (*MockAuthService_GetAuthenticatedClient_Call) RunAndReturn

type MockAuthService_GetLoginToken_Call

type MockAuthService_GetLoginToken_Call struct {
	*mock.Call
}

MockAuthService_GetLoginToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLoginToken'

func (*MockAuthService_GetLoginToken_Call) Return

func (*MockAuthService_GetLoginToken_Call) Run

func (*MockAuthService_GetLoginToken_Call) RunAndReturn

type MockAuthService_LoginCheck_Call

type MockAuthService_LoginCheck_Call struct {
	*mock.Call
}

MockAuthService_LoginCheck_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoginCheck'

func (*MockAuthService_LoginCheck_Call) Return

func (_c *MockAuthService_LoginCheck_Call) Return(loginResult *account.LoginResult, err error) *MockAuthService_LoginCheck_Call

func (*MockAuthService_LoginCheck_Call) Run

func (*MockAuthService_LoginCheck_Call) RunAndReturn

func (_c *MockAuthService_LoginCheck_Call) RunAndReturn(run func(ctx context.Context, email string, password string) (*account.LoginResult, error)) *MockAuthService_LoginCheck_Call

type MockAuthService_LoginWithOTP_Call

type MockAuthService_LoginWithOTP_Call struct {
	*mock.Call
}

MockAuthService_LoginWithOTP_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoginWithOTP'

func (*MockAuthService_LoginWithOTP_Call) Return

func (*MockAuthService_LoginWithOTP_Call) Run

func (_c *MockAuthService_LoginWithOTP_Call) Run(run func(ctx context.Context, intermediateJWT string, otp string, keyName string, noCreateKey bool)) *MockAuthService_LoginWithOTP_Call

func (*MockAuthService_LoginWithOTP_Call) RunAndReturn

func (_c *MockAuthService_LoginWithOTP_Call) RunAndReturn(run func(ctx context.Context, intermediateJWT string, otp string, keyName string, noCreateKey bool) error) *MockAuthService_LoginWithOTP_Call

type MockAuthService_Register_Call

type MockAuthService_Register_Call struct {
	*mock.Call
}

MockAuthService_Register_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Register'

func (*MockAuthService_Register_Call) Return

func (*MockAuthService_Register_Call) Run

func (_c *MockAuthService_Register_Call) Run(run func(ctx context.Context, email string, firstName string, lastName string, password string)) *MockAuthService_Register_Call

func (*MockAuthService_Register_Call) RunAndReturn

func (_c *MockAuthService_Register_Call) RunAndReturn(run func(ctx context.Context, email string, firstName string, lastName string, password string) error) *MockAuthService_Register_Call

type MockAuthService_SaveToken_Call

type MockAuthService_SaveToken_Call struct {
	*mock.Call
}

MockAuthService_SaveToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveToken'

func (*MockAuthService_SaveToken_Call) Return

func (*MockAuthService_SaveToken_Call) Run

func (*MockAuthService_SaveToken_Call) RunAndReturn

type MockAuthService_Status_Call

type MockAuthService_Status_Call struct {
	*mock.Call
}

MockAuthService_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status'

func (*MockAuthService_Status_Call) Return

func (*MockAuthService_Status_Call) Run

func (*MockAuthService_Status_Call) RunAndReturn

type MockBillingAdminService

type MockBillingAdminService struct {
	mock.Mock
}

MockBillingAdminService is an autogenerated mock type for the BillingAdminService type

func NewMockBillingAdminService

func NewMockBillingAdminService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBillingAdminService

NewMockBillingAdminService creates a new instance of MockBillingAdminService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockBillingAdminService) AbortUserSubscriptionCancellation

func (_mock *MockBillingAdminService) AbortUserSubscriptionCancellation(ctx context.Context, userID string) (*admin.ManagementResult, error)

AbortUserSubscriptionCancellation provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) AddPlanToPriceLine

func (_mock *MockBillingAdminService) AddPlanToPriceLine(ctx context.Context, priceLineID string, req *admin.AddPlanToPriceLineRequest) (*admin.PriceLineDetailResponse, error)

AddPlanToPriceLine provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) CancelUserSubscription

func (_mock *MockBillingAdminService) CancelUserSubscription(ctx context.Context, userID string, req *admin.CancelSubscriptionRequest) (*admin.ManagementResult, error)

CancelUserSubscription provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) ChangeUserPlan

func (_mock *MockBillingAdminService) ChangeUserPlan(ctx context.Context, userID string, req *admin.ChangePlanRequest) (*admin.PlanChangeResult, error)

ChangeUserPlan provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) CreateCredit

CreateCredit provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) CreatePriceLine

CreatePriceLine provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) CreatePricingPlan

CreatePricingPlan provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) CreatePricingPlanPeriod

CreatePricingPlanPeriod provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) DeleteCredit

func (_mock *MockBillingAdminService) DeleteCredit(ctx context.Context, creditID string) error

DeleteCredit provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) DeletePlanFromPriceLine

func (_mock *MockBillingAdminService) DeletePlanFromPriceLine(ctx context.Context, priceLineID string, planID string) error

DeletePlanFromPriceLine provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) DeletePriceLine

func (_mock *MockBillingAdminService) DeletePriceLine(ctx context.Context, priceLineID string) error

DeletePriceLine provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) DeletePricingPlan

func (_mock *MockBillingAdminService) DeletePricingPlan(ctx context.Context, planID string) error

DeletePricingPlan provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) DeletePricingPlanPeriod

func (_mock *MockBillingAdminService) DeletePricingPlanPeriod(ctx context.Context, periodID string) error

DeletePricingPlanPeriod provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) EXPECT

func (*MockBillingAdminService) GetCredit

func (_mock *MockBillingAdminService) GetCredit(ctx context.Context, creditID string) (*admin.Credit, error)

GetCredit provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) GetPriceLine

func (_mock *MockBillingAdminService) GetPriceLine(ctx context.Context, priceLineID string) (*admin.PriceLineDetailResponse, error)

GetPriceLine provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) GetPricingPlan

func (_mock *MockBillingAdminService) GetPricingPlan(ctx context.Context, planID string) (*admin.PricingPlan, error)

GetPricingPlan provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) GetPricingPlanPeriod

func (_mock *MockBillingAdminService) GetPricingPlanPeriod(ctx context.Context, periodID string) (*admin.PricingPlanPeriod, error)

GetPricingPlanPeriod provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) GetSubscriber

func (_mock *MockBillingAdminService) GetSubscriber(ctx context.Context, subscriberID string) (*admin.Subscriber, error)

GetSubscriber provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) GetUserBalance

func (_mock *MockBillingAdminService) GetUserBalance(ctx context.Context, userID string) (*admin.UserBalance, error)

GetUserBalance provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) GetUserDeletedCredits

GetUserDeletedCredits provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) GetUserSubscribers

func (_mock *MockBillingAdminService) GetUserSubscribers(ctx context.Context, userID string) ([]*admin.Subscriber, int, error)

GetUserSubscribers provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) ListCredits

ListCredits provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) ListGatewaySubscribers

func (_mock *MockBillingAdminService) ListGatewaySubscribers(ctx context.Context, gatewayID string) ([]*admin.Subscriber, int, error)

ListGatewaySubscribers provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) ListPriceLines

func (_mock *MockBillingAdminService) ListPriceLines(ctx context.Context) ([]*admin.PriceLine, int, error)

ListPriceLines provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) ListPricingPlanPeriods

func (_mock *MockBillingAdminService) ListPricingPlanPeriods(ctx context.Context) ([]*admin.PricingPlanPeriod, int, error)

ListPricingPlanPeriods provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) ListPricingPlans

func (_mock *MockBillingAdminService) ListPricingPlans(ctx context.Context) ([]*admin.PricingPlanItem, int, error)

ListPricingPlans provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) ListSubscribers

func (_mock *MockBillingAdminService) ListSubscribers(ctx context.Context) ([]*admin.Subscriber, int, error)

ListSubscribers provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) PauseUserSubscription

func (_mock *MockBillingAdminService) PauseUserSubscription(ctx context.Context, userID string) (*admin.ManagementResult, error)

PauseUserSubscription provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) PurgeCredits

func (_mock *MockBillingAdminService) PurgeCredits(ctx context.Context, req *admin.CreditPurgeRequest) (int, error)

PurgeCredits provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) RequireAuthenticated

func (_mock *MockBillingAdminService) RequireAuthenticated() error

RequireAuthenticated provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) RestoreCredit

func (_mock *MockBillingAdminService) RestoreCredit(ctx context.Context, creditID string) (*admin.Credit, error)

RestoreCredit provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) ResumeUserSubscription

func (_mock *MockBillingAdminService) ResumeUserSubscription(ctx context.Context, userID string) (*admin.ManagementResult, error)

ResumeUserSubscription provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) SyncAllPricingPlans

func (_mock *MockBillingAdminService) SyncAllPricingPlans(ctx context.Context) error

SyncAllPricingPlans provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) SyncPricingPlan

func (_mock *MockBillingAdminService) SyncPricingPlan(ctx context.Context, planID string) error

SyncPricingPlan provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) UpdatePlanPosition

func (_mock *MockBillingAdminService) UpdatePlanPosition(ctx context.Context, priceLineID string, planID string, req *admin.UpdatePlanPositionRequest) (*admin.PriceLineDetailResponse, error)

UpdatePlanPosition provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) UpdatePriceLine

func (_mock *MockBillingAdminService) UpdatePriceLine(ctx context.Context, priceLineID string, req *admin.PriceLineUpdateRequest) (*admin.PriceLine, error)

UpdatePriceLine provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) UpdatePricingPlan

func (_mock *MockBillingAdminService) UpdatePricingPlan(ctx context.Context, planID string, req *admin.PricingPlanUpdateRequest) (*admin.PricingPlan, error)

UpdatePricingPlan provides a mock function for the type MockBillingAdminService

func (*MockBillingAdminService) UpdatePricingPlanPeriod

func (_mock *MockBillingAdminService) UpdatePricingPlanPeriod(ctx context.Context, periodID string, req *admin.PricingPlanPeriodUpdateRequest) (*admin.PricingPlanPeriod, error)

UpdatePricingPlanPeriod provides a mock function for the type MockBillingAdminService

type MockBillingAdminService_AbortUserSubscriptionCancellation_Call

type MockBillingAdminService_AbortUserSubscriptionCancellation_Call struct {
	*mock.Call
}

MockBillingAdminService_AbortUserSubscriptionCancellation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortUserSubscriptionCancellation'

func (*MockBillingAdminService_AbortUserSubscriptionCancellation_Call) Return

func (*MockBillingAdminService_AbortUserSubscriptionCancellation_Call) Run

func (*MockBillingAdminService_AbortUserSubscriptionCancellation_Call) RunAndReturn

type MockBillingAdminService_AddPlanToPriceLine_Call

type MockBillingAdminService_AddPlanToPriceLine_Call struct {
	*mock.Call
}

MockBillingAdminService_AddPlanToPriceLine_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddPlanToPriceLine'

func (*MockBillingAdminService_AddPlanToPriceLine_Call) Return

func (*MockBillingAdminService_AddPlanToPriceLine_Call) Run

func (*MockBillingAdminService_AddPlanToPriceLine_Call) RunAndReturn

type MockBillingAdminService_CancelUserSubscription_Call

type MockBillingAdminService_CancelUserSubscription_Call struct {
	*mock.Call
}

MockBillingAdminService_CancelUserSubscription_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelUserSubscription'

func (*MockBillingAdminService_CancelUserSubscription_Call) Return

func (*MockBillingAdminService_CancelUserSubscription_Call) Run

func (*MockBillingAdminService_CancelUserSubscription_Call) RunAndReturn

type MockBillingAdminService_ChangeUserPlan_Call

type MockBillingAdminService_ChangeUserPlan_Call struct {
	*mock.Call
}

MockBillingAdminService_ChangeUserPlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangeUserPlan'

func (*MockBillingAdminService_ChangeUserPlan_Call) Return

func (*MockBillingAdminService_ChangeUserPlan_Call) Run

func (*MockBillingAdminService_ChangeUserPlan_Call) RunAndReturn

type MockBillingAdminService_CreateCredit_Call

type MockBillingAdminService_CreateCredit_Call struct {
	*mock.Call
}

MockBillingAdminService_CreateCredit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateCredit'

func (*MockBillingAdminService_CreateCredit_Call) Return

func (*MockBillingAdminService_CreateCredit_Call) Run

func (*MockBillingAdminService_CreateCredit_Call) RunAndReturn

type MockBillingAdminService_CreatePriceLine_Call

type MockBillingAdminService_CreatePriceLine_Call struct {
	*mock.Call
}

MockBillingAdminService_CreatePriceLine_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePriceLine'

func (*MockBillingAdminService_CreatePriceLine_Call) Return

func (*MockBillingAdminService_CreatePriceLine_Call) Run

func (*MockBillingAdminService_CreatePriceLine_Call) RunAndReturn

type MockBillingAdminService_CreatePricingPlanPeriod_Call

type MockBillingAdminService_CreatePricingPlanPeriod_Call struct {
	*mock.Call
}

MockBillingAdminService_CreatePricingPlanPeriod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePricingPlanPeriod'

func (*MockBillingAdminService_CreatePricingPlanPeriod_Call) Return

func (*MockBillingAdminService_CreatePricingPlanPeriod_Call) Run

type MockBillingAdminService_CreatePricingPlan_Call

type MockBillingAdminService_CreatePricingPlan_Call struct {
	*mock.Call
}

MockBillingAdminService_CreatePricingPlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePricingPlan'

func (*MockBillingAdminService_CreatePricingPlan_Call) Return

func (*MockBillingAdminService_CreatePricingPlan_Call) Run

func (*MockBillingAdminService_CreatePricingPlan_Call) RunAndReturn

type MockBillingAdminService_DeleteCredit_Call

type MockBillingAdminService_DeleteCredit_Call struct {
	*mock.Call
}

MockBillingAdminService_DeleteCredit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCredit'

func (*MockBillingAdminService_DeleteCredit_Call) Return

func (*MockBillingAdminService_DeleteCredit_Call) Run

func (*MockBillingAdminService_DeleteCredit_Call) RunAndReturn

type MockBillingAdminService_DeletePlanFromPriceLine_Call

type MockBillingAdminService_DeletePlanFromPriceLine_Call struct {
	*mock.Call
}

MockBillingAdminService_DeletePlanFromPriceLine_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePlanFromPriceLine'

func (*MockBillingAdminService_DeletePlanFromPriceLine_Call) Return

func (*MockBillingAdminService_DeletePlanFromPriceLine_Call) Run

func (*MockBillingAdminService_DeletePlanFromPriceLine_Call) RunAndReturn

type MockBillingAdminService_DeletePriceLine_Call

type MockBillingAdminService_DeletePriceLine_Call struct {
	*mock.Call
}

MockBillingAdminService_DeletePriceLine_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePriceLine'

func (*MockBillingAdminService_DeletePriceLine_Call) Return

func (*MockBillingAdminService_DeletePriceLine_Call) Run

func (*MockBillingAdminService_DeletePriceLine_Call) RunAndReturn

type MockBillingAdminService_DeletePricingPlanPeriod_Call

type MockBillingAdminService_DeletePricingPlanPeriod_Call struct {
	*mock.Call
}

MockBillingAdminService_DeletePricingPlanPeriod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePricingPlanPeriod'

func (*MockBillingAdminService_DeletePricingPlanPeriod_Call) Return

func (*MockBillingAdminService_DeletePricingPlanPeriod_Call) Run

func (*MockBillingAdminService_DeletePricingPlanPeriod_Call) RunAndReturn

type MockBillingAdminService_DeletePricingPlan_Call

type MockBillingAdminService_DeletePricingPlan_Call struct {
	*mock.Call
}

MockBillingAdminService_DeletePricingPlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePricingPlan'

func (*MockBillingAdminService_DeletePricingPlan_Call) Return

func (*MockBillingAdminService_DeletePricingPlan_Call) Run

func (*MockBillingAdminService_DeletePricingPlan_Call) RunAndReturn

type MockBillingAdminService_Expecter

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

func (*MockBillingAdminService_Expecter) AbortUserSubscriptionCancellation

func (_e *MockBillingAdminService_Expecter) AbortUserSubscriptionCancellation(ctx interface{}, userID interface{}) *MockBillingAdminService_AbortUserSubscriptionCancellation_Call

AbortUserSubscriptionCancellation is a helper method to define mock.On call

  • ctx context.Context
  • userID string

func (*MockBillingAdminService_Expecter) AddPlanToPriceLine

func (_e *MockBillingAdminService_Expecter) AddPlanToPriceLine(ctx interface{}, priceLineID interface{}, req interface{}) *MockBillingAdminService_AddPlanToPriceLine_Call

AddPlanToPriceLine is a helper method to define mock.On call

  • ctx context.Context
  • priceLineID string
  • req *admin.AddPlanToPriceLineRequest

func (*MockBillingAdminService_Expecter) CancelUserSubscription

func (_e *MockBillingAdminService_Expecter) CancelUserSubscription(ctx interface{}, userID interface{}, req interface{}) *MockBillingAdminService_CancelUserSubscription_Call

CancelUserSubscription is a helper method to define mock.On call

  • ctx context.Context
  • userID string
  • req *admin.CancelSubscriptionRequest

func (*MockBillingAdminService_Expecter) ChangeUserPlan

func (_e *MockBillingAdminService_Expecter) ChangeUserPlan(ctx interface{}, userID interface{}, req interface{}) *MockBillingAdminService_ChangeUserPlan_Call

ChangeUserPlan is a helper method to define mock.On call

  • ctx context.Context
  • userID string
  • req *admin.ChangePlanRequest

func (*MockBillingAdminService_Expecter) CreateCredit

func (_e *MockBillingAdminService_Expecter) CreateCredit(ctx interface{}, req interface{}) *MockBillingAdminService_CreateCredit_Call

CreateCredit is a helper method to define mock.On call

  • ctx context.Context
  • req *admin.CreditCreateRequest

func (*MockBillingAdminService_Expecter) CreatePriceLine

func (_e *MockBillingAdminService_Expecter) CreatePriceLine(ctx interface{}, req interface{}) *MockBillingAdminService_CreatePriceLine_Call

CreatePriceLine is a helper method to define mock.On call

  • ctx context.Context
  • req *admin.PriceLineCreateRequest

func (*MockBillingAdminService_Expecter) CreatePricingPlan

func (_e *MockBillingAdminService_Expecter) CreatePricingPlan(ctx interface{}, req interface{}) *MockBillingAdminService_CreatePricingPlan_Call

CreatePricingPlan is a helper method to define mock.On call

  • ctx context.Context
  • req *admin.PricingPlanCreateRequest

func (*MockBillingAdminService_Expecter) CreatePricingPlanPeriod

func (_e *MockBillingAdminService_Expecter) CreatePricingPlanPeriod(ctx interface{}, req interface{}) *MockBillingAdminService_CreatePricingPlanPeriod_Call

CreatePricingPlanPeriod is a helper method to define mock.On call

  • ctx context.Context
  • req *admin.PricingPlanPeriodCreateRequest

func (*MockBillingAdminService_Expecter) DeleteCredit

func (_e *MockBillingAdminService_Expecter) DeleteCredit(ctx interface{}, creditID interface{}) *MockBillingAdminService_DeleteCredit_Call

DeleteCredit is a helper method to define mock.On call

  • ctx context.Context
  • creditID string

func (*MockBillingAdminService_Expecter) DeletePlanFromPriceLine

func (_e *MockBillingAdminService_Expecter) DeletePlanFromPriceLine(ctx interface{}, priceLineID interface{}, planID interface{}) *MockBillingAdminService_DeletePlanFromPriceLine_Call

DeletePlanFromPriceLine is a helper method to define mock.On call

  • ctx context.Context
  • priceLineID string
  • planID string

func (*MockBillingAdminService_Expecter) DeletePriceLine

func (_e *MockBillingAdminService_Expecter) DeletePriceLine(ctx interface{}, priceLineID interface{}) *MockBillingAdminService_DeletePriceLine_Call

DeletePriceLine is a helper method to define mock.On call

  • ctx context.Context
  • priceLineID string

func (*MockBillingAdminService_Expecter) DeletePricingPlan

func (_e *MockBillingAdminService_Expecter) DeletePricingPlan(ctx interface{}, planID interface{}) *MockBillingAdminService_DeletePricingPlan_Call

DeletePricingPlan is a helper method to define mock.On call

  • ctx context.Context
  • planID string

func (*MockBillingAdminService_Expecter) DeletePricingPlanPeriod

func (_e *MockBillingAdminService_Expecter) DeletePricingPlanPeriod(ctx interface{}, periodID interface{}) *MockBillingAdminService_DeletePricingPlanPeriod_Call

DeletePricingPlanPeriod is a helper method to define mock.On call

  • ctx context.Context
  • periodID string

func (*MockBillingAdminService_Expecter) GetCredit

func (_e *MockBillingAdminService_Expecter) GetCredit(ctx interface{}, creditID interface{}) *MockBillingAdminService_GetCredit_Call

GetCredit is a helper method to define mock.On call

  • ctx context.Context
  • creditID string

func (*MockBillingAdminService_Expecter) GetPriceLine

func (_e *MockBillingAdminService_Expecter) GetPriceLine(ctx interface{}, priceLineID interface{}) *MockBillingAdminService_GetPriceLine_Call

GetPriceLine is a helper method to define mock.On call

  • ctx context.Context
  • priceLineID string

func (*MockBillingAdminService_Expecter) GetPricingPlan

func (_e *MockBillingAdminService_Expecter) GetPricingPlan(ctx interface{}, planID interface{}) *MockBillingAdminService_GetPricingPlan_Call

GetPricingPlan is a helper method to define mock.On call

  • ctx context.Context
  • planID string

func (*MockBillingAdminService_Expecter) GetPricingPlanPeriod

func (_e *MockBillingAdminService_Expecter) GetPricingPlanPeriod(ctx interface{}, periodID interface{}) *MockBillingAdminService_GetPricingPlanPeriod_Call

GetPricingPlanPeriod is a helper method to define mock.On call

  • ctx context.Context
  • periodID string

func (*MockBillingAdminService_Expecter) GetSubscriber

func (_e *MockBillingAdminService_Expecter) GetSubscriber(ctx interface{}, subscriberID interface{}) *MockBillingAdminService_GetSubscriber_Call

GetSubscriber is a helper method to define mock.On call

  • ctx context.Context
  • subscriberID string

func (*MockBillingAdminService_Expecter) GetUserBalance

func (_e *MockBillingAdminService_Expecter) GetUserBalance(ctx interface{}, userID interface{}) *MockBillingAdminService_GetUserBalance_Call

GetUserBalance is a helper method to define mock.On call

  • ctx context.Context
  • userID string

func (*MockBillingAdminService_Expecter) GetUserDeletedCredits

func (_e *MockBillingAdminService_Expecter) GetUserDeletedCredits(ctx interface{}, userID interface{}, params interface{}) *MockBillingAdminService_GetUserDeletedCredits_Call

GetUserDeletedCredits is a helper method to define mock.On call

  • ctx context.Context
  • userID string
  • params *admin.GetApiBillingUsersUserIdDeletedCreditsParams

func (*MockBillingAdminService_Expecter) GetUserSubscribers

func (_e *MockBillingAdminService_Expecter) GetUserSubscribers(ctx interface{}, userID interface{}) *MockBillingAdminService_GetUserSubscribers_Call

GetUserSubscribers is a helper method to define mock.On call

  • ctx context.Context
  • userID string

func (*MockBillingAdminService_Expecter) ListCredits

func (_e *MockBillingAdminService_Expecter) ListCredits(ctx interface{}, params interface{}) *MockBillingAdminService_ListCredits_Call

ListCredits is a helper method to define mock.On call

  • ctx context.Context
  • params *admin.GetApiBillingCreditsParams

func (*MockBillingAdminService_Expecter) ListGatewaySubscribers

func (_e *MockBillingAdminService_Expecter) ListGatewaySubscribers(ctx interface{}, gatewayID interface{}) *MockBillingAdminService_ListGatewaySubscribers_Call

ListGatewaySubscribers is a helper method to define mock.On call

  • ctx context.Context
  • gatewayID string

func (*MockBillingAdminService_Expecter) ListPriceLines

ListPriceLines is a helper method to define mock.On call

  • ctx context.Context

func (*MockBillingAdminService_Expecter) ListPricingPlanPeriods

ListPricingPlanPeriods is a helper method to define mock.On call

  • ctx context.Context

func (*MockBillingAdminService_Expecter) ListPricingPlans

ListPricingPlans is a helper method to define mock.On call

  • ctx context.Context

func (*MockBillingAdminService_Expecter) ListSubscribers

ListSubscribers is a helper method to define mock.On call

  • ctx context.Context

func (*MockBillingAdminService_Expecter) PauseUserSubscription

func (_e *MockBillingAdminService_Expecter) PauseUserSubscription(ctx interface{}, userID interface{}) *MockBillingAdminService_PauseUserSubscription_Call

PauseUserSubscription is a helper method to define mock.On call

  • ctx context.Context
  • userID string

func (*MockBillingAdminService_Expecter) PurgeCredits

func (_e *MockBillingAdminService_Expecter) PurgeCredits(ctx interface{}, req interface{}) *MockBillingAdminService_PurgeCredits_Call

PurgeCredits is a helper method to define mock.On call

  • ctx context.Context
  • req *admin.CreditPurgeRequest

func (*MockBillingAdminService_Expecter) RequireAuthenticated

RequireAuthenticated is a helper method to define mock.On call

func (*MockBillingAdminService_Expecter) RestoreCredit

func (_e *MockBillingAdminService_Expecter) RestoreCredit(ctx interface{}, creditID interface{}) *MockBillingAdminService_RestoreCredit_Call

RestoreCredit is a helper method to define mock.On call

  • ctx context.Context
  • creditID string

func (*MockBillingAdminService_Expecter) ResumeUserSubscription

func (_e *MockBillingAdminService_Expecter) ResumeUserSubscription(ctx interface{}, userID interface{}) *MockBillingAdminService_ResumeUserSubscription_Call

ResumeUserSubscription is a helper method to define mock.On call

  • ctx context.Context
  • userID string

func (*MockBillingAdminService_Expecter) SyncAllPricingPlans

SyncAllPricingPlans is a helper method to define mock.On call

  • ctx context.Context

func (*MockBillingAdminService_Expecter) SyncPricingPlan

func (_e *MockBillingAdminService_Expecter) SyncPricingPlan(ctx interface{}, planID interface{}) *MockBillingAdminService_SyncPricingPlan_Call

SyncPricingPlan is a helper method to define mock.On call

  • ctx context.Context
  • planID string

func (*MockBillingAdminService_Expecter) UpdatePlanPosition

func (_e *MockBillingAdminService_Expecter) UpdatePlanPosition(ctx interface{}, priceLineID interface{}, planID interface{}, req interface{}) *MockBillingAdminService_UpdatePlanPosition_Call

UpdatePlanPosition is a helper method to define mock.On call

  • ctx context.Context
  • priceLineID string
  • planID string
  • req *admin.UpdatePlanPositionRequest

func (*MockBillingAdminService_Expecter) UpdatePriceLine

func (_e *MockBillingAdminService_Expecter) UpdatePriceLine(ctx interface{}, priceLineID interface{}, req interface{}) *MockBillingAdminService_UpdatePriceLine_Call

UpdatePriceLine is a helper method to define mock.On call

  • ctx context.Context
  • priceLineID string
  • req *admin.PriceLineUpdateRequest

func (*MockBillingAdminService_Expecter) UpdatePricingPlan

func (_e *MockBillingAdminService_Expecter) UpdatePricingPlan(ctx interface{}, planID interface{}, req interface{}) *MockBillingAdminService_UpdatePricingPlan_Call

UpdatePricingPlan is a helper method to define mock.On call

  • ctx context.Context
  • planID string
  • req *admin.PricingPlanUpdateRequest

func (*MockBillingAdminService_Expecter) UpdatePricingPlanPeriod

func (_e *MockBillingAdminService_Expecter) UpdatePricingPlanPeriod(ctx interface{}, periodID interface{}, req interface{}) *MockBillingAdminService_UpdatePricingPlanPeriod_Call

UpdatePricingPlanPeriod is a helper method to define mock.On call

  • ctx context.Context
  • periodID string
  • req *admin.PricingPlanPeriodUpdateRequest

type MockBillingAdminService_GetCredit_Call

type MockBillingAdminService_GetCredit_Call struct {
	*mock.Call
}

MockBillingAdminService_GetCredit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCredit'

func (*MockBillingAdminService_GetCredit_Call) Return

func (*MockBillingAdminService_GetCredit_Call) Run

func (*MockBillingAdminService_GetCredit_Call) RunAndReturn

type MockBillingAdminService_GetPriceLine_Call

type MockBillingAdminService_GetPriceLine_Call struct {
	*mock.Call
}

MockBillingAdminService_GetPriceLine_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPriceLine'

func (*MockBillingAdminService_GetPriceLine_Call) Return

func (*MockBillingAdminService_GetPriceLine_Call) Run

func (*MockBillingAdminService_GetPriceLine_Call) RunAndReturn

type MockBillingAdminService_GetPricingPlanPeriod_Call

type MockBillingAdminService_GetPricingPlanPeriod_Call struct {
	*mock.Call
}

MockBillingAdminService_GetPricingPlanPeriod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPricingPlanPeriod'

func (*MockBillingAdminService_GetPricingPlanPeriod_Call) Return

func (*MockBillingAdminService_GetPricingPlanPeriod_Call) Run

func (*MockBillingAdminService_GetPricingPlanPeriod_Call) RunAndReturn

type MockBillingAdminService_GetPricingPlan_Call

type MockBillingAdminService_GetPricingPlan_Call struct {
	*mock.Call
}

MockBillingAdminService_GetPricingPlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPricingPlan'

func (*MockBillingAdminService_GetPricingPlan_Call) Return

func (*MockBillingAdminService_GetPricingPlan_Call) Run

func (*MockBillingAdminService_GetPricingPlan_Call) RunAndReturn

type MockBillingAdminService_GetSubscriber_Call

type MockBillingAdminService_GetSubscriber_Call struct {
	*mock.Call
}

MockBillingAdminService_GetSubscriber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSubscriber'

func (*MockBillingAdminService_GetSubscriber_Call) Return

func (*MockBillingAdminService_GetSubscriber_Call) Run

func (*MockBillingAdminService_GetSubscriber_Call) RunAndReturn

type MockBillingAdminService_GetUserBalance_Call

type MockBillingAdminService_GetUserBalance_Call struct {
	*mock.Call
}

MockBillingAdminService_GetUserBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserBalance'

func (*MockBillingAdminService_GetUserBalance_Call) Return

func (*MockBillingAdminService_GetUserBalance_Call) Run

func (*MockBillingAdminService_GetUserBalance_Call) RunAndReturn

type MockBillingAdminService_GetUserDeletedCredits_Call

type MockBillingAdminService_GetUserDeletedCredits_Call struct {
	*mock.Call
}

MockBillingAdminService_GetUserDeletedCredits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserDeletedCredits'

func (*MockBillingAdminService_GetUserDeletedCredits_Call) Return

func (*MockBillingAdminService_GetUserDeletedCredits_Call) Run

type MockBillingAdminService_GetUserSubscribers_Call

type MockBillingAdminService_GetUserSubscribers_Call struct {
	*mock.Call
}

MockBillingAdminService_GetUserSubscribers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserSubscribers'

func (*MockBillingAdminService_GetUserSubscribers_Call) Return

func (*MockBillingAdminService_GetUserSubscribers_Call) Run

func (*MockBillingAdminService_GetUserSubscribers_Call) RunAndReturn

type MockBillingAdminService_ListCredits_Call

type MockBillingAdminService_ListCredits_Call struct {
	*mock.Call
}

MockBillingAdminService_ListCredits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCredits'

func (*MockBillingAdminService_ListCredits_Call) Return

func (*MockBillingAdminService_ListCredits_Call) Run

func (*MockBillingAdminService_ListCredits_Call) RunAndReturn

type MockBillingAdminService_ListGatewaySubscribers_Call

type MockBillingAdminService_ListGatewaySubscribers_Call struct {
	*mock.Call
}

MockBillingAdminService_ListGatewaySubscribers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListGatewaySubscribers'

func (*MockBillingAdminService_ListGatewaySubscribers_Call) Return

func (*MockBillingAdminService_ListGatewaySubscribers_Call) Run

func (*MockBillingAdminService_ListGatewaySubscribers_Call) RunAndReturn

type MockBillingAdminService_ListPriceLines_Call

type MockBillingAdminService_ListPriceLines_Call struct {
	*mock.Call
}

MockBillingAdminService_ListPriceLines_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPriceLines'

func (*MockBillingAdminService_ListPriceLines_Call) Return

func (*MockBillingAdminService_ListPriceLines_Call) Run

func (*MockBillingAdminService_ListPriceLines_Call) RunAndReturn

type MockBillingAdminService_ListPricingPlanPeriods_Call

type MockBillingAdminService_ListPricingPlanPeriods_Call struct {
	*mock.Call
}

MockBillingAdminService_ListPricingPlanPeriods_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPricingPlanPeriods'

func (*MockBillingAdminService_ListPricingPlanPeriods_Call) Return

func (*MockBillingAdminService_ListPricingPlanPeriods_Call) Run

func (*MockBillingAdminService_ListPricingPlanPeriods_Call) RunAndReturn

type MockBillingAdminService_ListPricingPlans_Call

type MockBillingAdminService_ListPricingPlans_Call struct {
	*mock.Call
}

MockBillingAdminService_ListPricingPlans_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPricingPlans'

func (*MockBillingAdminService_ListPricingPlans_Call) Return

func (*MockBillingAdminService_ListPricingPlans_Call) Run

func (*MockBillingAdminService_ListPricingPlans_Call) RunAndReturn

type MockBillingAdminService_ListSubscribers_Call

type MockBillingAdminService_ListSubscribers_Call struct {
	*mock.Call
}

MockBillingAdminService_ListSubscribers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSubscribers'

func (*MockBillingAdminService_ListSubscribers_Call) Return

func (*MockBillingAdminService_ListSubscribers_Call) Run

func (*MockBillingAdminService_ListSubscribers_Call) RunAndReturn

type MockBillingAdminService_PauseUserSubscription_Call

type MockBillingAdminService_PauseUserSubscription_Call struct {
	*mock.Call
}

MockBillingAdminService_PauseUserSubscription_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PauseUserSubscription'

func (*MockBillingAdminService_PauseUserSubscription_Call) Return

func (*MockBillingAdminService_PauseUserSubscription_Call) Run

func (*MockBillingAdminService_PauseUserSubscription_Call) RunAndReturn

type MockBillingAdminService_PurgeCredits_Call

type MockBillingAdminService_PurgeCredits_Call struct {
	*mock.Call
}

MockBillingAdminService_PurgeCredits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PurgeCredits'

func (*MockBillingAdminService_PurgeCredits_Call) Return

func (*MockBillingAdminService_PurgeCredits_Call) Run

func (*MockBillingAdminService_PurgeCredits_Call) RunAndReturn

type MockBillingAdminService_RequireAuthenticated_Call

type MockBillingAdminService_RequireAuthenticated_Call struct {
	*mock.Call
}

MockBillingAdminService_RequireAuthenticated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequireAuthenticated'

func (*MockBillingAdminService_RequireAuthenticated_Call) Return

func (*MockBillingAdminService_RequireAuthenticated_Call) Run

func (*MockBillingAdminService_RequireAuthenticated_Call) RunAndReturn

type MockBillingAdminService_RestoreCredit_Call

type MockBillingAdminService_RestoreCredit_Call struct {
	*mock.Call
}

MockBillingAdminService_RestoreCredit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestoreCredit'

func (*MockBillingAdminService_RestoreCredit_Call) Return

func (*MockBillingAdminService_RestoreCredit_Call) Run

func (*MockBillingAdminService_RestoreCredit_Call) RunAndReturn

type MockBillingAdminService_ResumeUserSubscription_Call

type MockBillingAdminService_ResumeUserSubscription_Call struct {
	*mock.Call
}

MockBillingAdminService_ResumeUserSubscription_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResumeUserSubscription'

func (*MockBillingAdminService_ResumeUserSubscription_Call) Return

func (*MockBillingAdminService_ResumeUserSubscription_Call) Run

func (*MockBillingAdminService_ResumeUserSubscription_Call) RunAndReturn

type MockBillingAdminService_SyncAllPricingPlans_Call

type MockBillingAdminService_SyncAllPricingPlans_Call struct {
	*mock.Call
}

MockBillingAdminService_SyncAllPricingPlans_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncAllPricingPlans'

func (*MockBillingAdminService_SyncAllPricingPlans_Call) Return

func (*MockBillingAdminService_SyncAllPricingPlans_Call) Run

func (*MockBillingAdminService_SyncAllPricingPlans_Call) RunAndReturn

type MockBillingAdminService_SyncPricingPlan_Call

type MockBillingAdminService_SyncPricingPlan_Call struct {
	*mock.Call
}

MockBillingAdminService_SyncPricingPlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncPricingPlan'

func (*MockBillingAdminService_SyncPricingPlan_Call) Return

func (*MockBillingAdminService_SyncPricingPlan_Call) Run

func (*MockBillingAdminService_SyncPricingPlan_Call) RunAndReturn

type MockBillingAdminService_UpdatePlanPosition_Call

type MockBillingAdminService_UpdatePlanPosition_Call struct {
	*mock.Call
}

MockBillingAdminService_UpdatePlanPosition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePlanPosition'

func (*MockBillingAdminService_UpdatePlanPosition_Call) Return

func (*MockBillingAdminService_UpdatePlanPosition_Call) Run

func (*MockBillingAdminService_UpdatePlanPosition_Call) RunAndReturn

type MockBillingAdminService_UpdatePriceLine_Call

type MockBillingAdminService_UpdatePriceLine_Call struct {
	*mock.Call
}

MockBillingAdminService_UpdatePriceLine_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePriceLine'

func (*MockBillingAdminService_UpdatePriceLine_Call) Return

func (*MockBillingAdminService_UpdatePriceLine_Call) Run

func (*MockBillingAdminService_UpdatePriceLine_Call) RunAndReturn

type MockBillingAdminService_UpdatePricingPlanPeriod_Call

type MockBillingAdminService_UpdatePricingPlanPeriod_Call struct {
	*mock.Call
}

MockBillingAdminService_UpdatePricingPlanPeriod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePricingPlanPeriod'

func (*MockBillingAdminService_UpdatePricingPlanPeriod_Call) Return

func (*MockBillingAdminService_UpdatePricingPlanPeriod_Call) Run

func (*MockBillingAdminService_UpdatePricingPlanPeriod_Call) RunAndReturn

type MockBillingAdminService_UpdatePricingPlan_Call

type MockBillingAdminService_UpdatePricingPlan_Call struct {
	*mock.Call
}

MockBillingAdminService_UpdatePricingPlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePricingPlan'

func (*MockBillingAdminService_UpdatePricingPlan_Call) Return

func (*MockBillingAdminService_UpdatePricingPlan_Call) Run

func (*MockBillingAdminService_UpdatePricingPlan_Call) RunAndReturn

type MockConfirmPrompter added in v0.2.0

type MockConfirmPrompter struct {
	ConfirmResult string
	ConfirmErr    error
}

MockConfirmPrompter is a mock implementation of ConfirmPrompter for testing.

func (*MockConfirmPrompter) Confirm added in v0.2.0

func (m *MockConfirmPrompter) Confirm(label string, expected string) (string, error)

type MockContinuePrompter added in v0.2.0

type MockContinuePrompter struct {
	ContinueErr error
}

MockContinuePrompter is a mock implementation of ContinuePrompter for testing.

func (*MockContinuePrompter) Continue added in v0.2.0

func (m *MockContinuePrompter) Continue() error

type MockDownloadService

type MockDownloadService struct {
	mock.Mock
}

MockDownloadService is an autogenerated mock type for the DownloadService type

func NewMockDownloadService

func NewMockDownloadService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDownloadService

NewMockDownloadService creates a new instance of MockDownloadService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockDownloadService) Cat

func (_mock *MockDownloadService) Cat(ctx context.Context, ipfsPath string) (io.ReadCloser, error)

Cat provides a mock function for the type MockDownloadService

func (*MockDownloadService) Download

func (_mock *MockDownloadService) Download(ctx context.Context, ipfsPath string, outputPath string, force bool) (*DownloadResult, error)

Download provides a mock function for the type MockDownloadService

func (*MockDownloadService) EXPECT

func (*MockDownloadService) FileSize

func (_mock *MockDownloadService) FileSize(ctx context.Context, ipfsPath string) (int64, error)

FileSize provides a mock function for the type MockDownloadService

func (*MockDownloadService) ListDirectory

func (_mock *MockDownloadService) ListDirectory(ctx context.Context, ipfsPath string) ([]DirEntry, error)

ListDirectory provides a mock function for the type MockDownloadService

func (*MockDownloadService) RequireAuthenticated

func (_mock *MockDownloadService) RequireAuthenticated() error

RequireAuthenticated provides a mock function for the type MockDownloadService

type MockDownloadService_Cat_Call

type MockDownloadService_Cat_Call struct {
	*mock.Call
}

MockDownloadService_Cat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Cat'

func (*MockDownloadService_Cat_Call) Return

func (*MockDownloadService_Cat_Call) Run

func (*MockDownloadService_Cat_Call) RunAndReturn

func (_c *MockDownloadService_Cat_Call) RunAndReturn(run func(ctx context.Context, ipfsPath string) (io.ReadCloser, error)) *MockDownloadService_Cat_Call

type MockDownloadService_Download_Call

type MockDownloadService_Download_Call struct {
	*mock.Call
}

MockDownloadService_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download'

func (*MockDownloadService_Download_Call) Return

func (*MockDownloadService_Download_Call) Run

func (_c *MockDownloadService_Download_Call) Run(run func(ctx context.Context, ipfsPath string, outputPath string, force bool)) *MockDownloadService_Download_Call

func (*MockDownloadService_Download_Call) RunAndReturn

func (_c *MockDownloadService_Download_Call) RunAndReturn(run func(ctx context.Context, ipfsPath string, outputPath string, force bool) (*DownloadResult, error)) *MockDownloadService_Download_Call

type MockDownloadService_Expecter

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

func (*MockDownloadService_Expecter) Cat

func (_e *MockDownloadService_Expecter) Cat(ctx interface{}, ipfsPath interface{}) *MockDownloadService_Cat_Call

Cat is a helper method to define mock.On call

  • ctx context.Context
  • ipfsPath string

func (*MockDownloadService_Expecter) Download

func (_e *MockDownloadService_Expecter) Download(ctx interface{}, ipfsPath interface{}, outputPath interface{}, force interface{}) *MockDownloadService_Download_Call

Download is a helper method to define mock.On call

  • ctx context.Context
  • ipfsPath string
  • outputPath string
  • force bool

func (*MockDownloadService_Expecter) FileSize

func (_e *MockDownloadService_Expecter) FileSize(ctx interface{}, ipfsPath interface{}) *MockDownloadService_FileSize_Call

FileSize is a helper method to define mock.On call

  • ctx context.Context
  • ipfsPath string

func (*MockDownloadService_Expecter) ListDirectory

func (_e *MockDownloadService_Expecter) ListDirectory(ctx interface{}, ipfsPath interface{}) *MockDownloadService_ListDirectory_Call

ListDirectory is a helper method to define mock.On call

  • ctx context.Context
  • ipfsPath string

func (*MockDownloadService_Expecter) RequireAuthenticated

RequireAuthenticated is a helper method to define mock.On call

type MockDownloadService_FileSize_Call

type MockDownloadService_FileSize_Call struct {
	*mock.Call
}

MockDownloadService_FileSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileSize'

func (*MockDownloadService_FileSize_Call) Return

func (*MockDownloadService_FileSize_Call) Run

func (*MockDownloadService_FileSize_Call) RunAndReturn

type MockDownloadService_ListDirectory_Call

type MockDownloadService_ListDirectory_Call struct {
	*mock.Call
}

MockDownloadService_ListDirectory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDirectory'

func (*MockDownloadService_ListDirectory_Call) Return

func (*MockDownloadService_ListDirectory_Call) Run

func (*MockDownloadService_ListDirectory_Call) RunAndReturn

type MockDownloadService_RequireAuthenticated_Call

type MockDownloadService_RequireAuthenticated_Call struct {
	*mock.Call
}

MockDownloadService_RequireAuthenticated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequireAuthenticated'

func (*MockDownloadService_RequireAuthenticated_Call) Return

func (*MockDownloadService_RequireAuthenticated_Call) Run

func (*MockDownloadService_RequireAuthenticated_Call) RunAndReturn

type MockOperationsService

type MockOperationsService struct {
	mock.Mock
}

MockOperationsService is an autogenerated mock type for the OperationsService type

func NewMockOperationsService

func NewMockOperationsService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockOperationsService

NewMockOperationsService creates a new instance of MockOperationsService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockOperationsService) EXPECT

func (*MockOperationsService) Get

Get provides a mock function for the type MockOperationsService

func (*MockOperationsService) List

List provides a mock function for the type MockOperationsService

func (*MockOperationsService) RequireAuthenticated

func (_mock *MockOperationsService) RequireAuthenticated() error

RequireAuthenticated provides a mock function for the type MockOperationsService

func (*MockOperationsService) Watch

func (_mock *MockOperationsService) Watch(ctx context.Context, id int64) (*OperationDetail, error)

Watch provides a mock function for the type MockOperationsService

type MockOperationsService_Expecter

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

func (*MockOperationsService_Expecter) Get

func (_e *MockOperationsService_Expecter) Get(ctx interface{}, id interface{}) *MockOperationsService_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • id int64

func (*MockOperationsService_Expecter) List

func (_e *MockOperationsService_Expecter) List(ctx interface{}, opts interface{}) *MockOperationsService_List_Call

List is a helper method to define mock.On call

  • ctx context.Context
  • opts OperationsListOptions

func (*MockOperationsService_Expecter) RequireAuthenticated

RequireAuthenticated is a helper method to define mock.On call

func (*MockOperationsService_Expecter) Watch

func (_e *MockOperationsService_Expecter) Watch(ctx interface{}, id interface{}) *MockOperationsService_Watch_Call

Watch is a helper method to define mock.On call

  • ctx context.Context
  • id int64

type MockOperationsService_Get_Call

type MockOperationsService_Get_Call struct {
	*mock.Call
}

MockOperationsService_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*MockOperationsService_Get_Call) Return

func (*MockOperationsService_Get_Call) Run

func (*MockOperationsService_Get_Call) RunAndReturn

type MockOperationsService_List_Call

type MockOperationsService_List_Call struct {
	*mock.Call
}

MockOperationsService_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'

func (*MockOperationsService_List_Call) Return

func (*MockOperationsService_List_Call) Run

func (*MockOperationsService_List_Call) RunAndReturn

type MockOperationsService_RequireAuthenticated_Call

type MockOperationsService_RequireAuthenticated_Call struct {
	*mock.Call
}

MockOperationsService_RequireAuthenticated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequireAuthenticated'

func (*MockOperationsService_RequireAuthenticated_Call) Return

func (*MockOperationsService_RequireAuthenticated_Call) Run

func (*MockOperationsService_RequireAuthenticated_Call) RunAndReturn

type MockOperationsService_Watch_Call

type MockOperationsService_Watch_Call struct {
	*mock.Call
}

MockOperationsService_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch'

func (*MockOperationsService_Watch_Call) Return

func (*MockOperationsService_Watch_Call) Run

func (*MockOperationsService_Watch_Call) RunAndReturn

type MockPinningService

type MockPinningService struct {
	mock.Mock
}

MockPinningService is an autogenerated mock type for the PinningService type

func NewMockPinningService

func NewMockPinningService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockPinningService

NewMockPinningService creates a new instance of MockPinningService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockPinningService) EXPECT

func (*MockPinningService) List

func (_mock *MockPinningService) List(ctx context.Context, nameFilter string, limit int, statusFilter string) ([]Pin, error)

List provides a mock function for the type MockPinningService

func (*MockPinningService) Pin

func (_mock *MockPinningService) Pin(ctx context.Context, cid string, name string, wait bool) (*PinResult, error)

Pin provides a mock function for the type MockPinningService

func (*MockPinningService) PinBatch

func (_mock *MockPinningService) PinBatch(ctx context.Context, cids []string, name string, opts BatchOptions) (*BatchResult, error)

PinBatch provides a mock function for the type MockPinningService

func (*MockPinningService) RequireAuthenticated

func (_mock *MockPinningService) RequireAuthenticated() error

RequireAuthenticated provides a mock function for the type MockPinningService

func (*MockPinningService) Status

func (_mock *MockPinningService) Status(ctx context.Context, cid string, watch bool) (*PinStatus, error)

Status provides a mock function for the type MockPinningService

func (*MockPinningService) Unpin

func (_mock *MockPinningService) Unpin(ctx context.Context, cid string, confirm bool) (*UnpinResult, error)

Unpin provides a mock function for the type MockPinningService

func (*MockPinningService) UnpinAll

func (_mock *MockPinningService) UnpinAll(ctx context.Context, statusFilter string, opts BatchOptions) (*BatchResult, error)

UnpinAll provides a mock function for the type MockPinningService

func (*MockPinningService) UnpinBatch

func (_mock *MockPinningService) UnpinBatch(ctx context.Context, cids []string, opts BatchOptions) (*BatchResult, error)

UnpinBatch provides a mock function for the type MockPinningService

func (*MockPinningService) UpdateMetadata

func (_mock *MockPinningService) UpdateMetadata(ctx context.Context, cid string, set []string, clear bool) error

UpdateMetadata provides a mock function for the type MockPinningService

func (*MockPinningService) UpdatePin added in v0.2.0

func (_mock *MockPinningService) UpdatePin(ctx context.Context, cid string, name string, meta []string, clearMeta bool) error

UpdatePin provides a mock function for the type MockPinningService

type MockPinningService_Expecter

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

func (*MockPinningService_Expecter) List

func (_e *MockPinningService_Expecter) List(ctx interface{}, nameFilter interface{}, limit interface{}, statusFilter interface{}) *MockPinningService_List_Call

List is a helper method to define mock.On call

  • ctx context.Context
  • nameFilter string
  • limit int
  • statusFilter string

func (*MockPinningService_Expecter) Pin

func (_e *MockPinningService_Expecter) Pin(ctx interface{}, cid interface{}, name interface{}, wait interface{}) *MockPinningService_Pin_Call

Pin is a helper method to define mock.On call

  • ctx context.Context
  • cid string
  • name string
  • wait bool

func (*MockPinningService_Expecter) PinBatch

func (_e *MockPinningService_Expecter) PinBatch(ctx interface{}, cids interface{}, name interface{}, opts interface{}) *MockPinningService_PinBatch_Call

PinBatch is a helper method to define mock.On call

  • ctx context.Context
  • cids []string
  • name string
  • opts BatchOptions

func (*MockPinningService_Expecter) RequireAuthenticated

RequireAuthenticated is a helper method to define mock.On call

func (*MockPinningService_Expecter) Status

func (_e *MockPinningService_Expecter) Status(ctx interface{}, cid interface{}, watch interface{}) *MockPinningService_Status_Call

Status is a helper method to define mock.On call

  • ctx context.Context
  • cid string
  • watch bool

func (*MockPinningService_Expecter) Unpin

func (_e *MockPinningService_Expecter) Unpin(ctx interface{}, cid interface{}, confirm interface{}) *MockPinningService_Unpin_Call

Unpin is a helper method to define mock.On call

  • ctx context.Context
  • cid string
  • confirm bool

func (*MockPinningService_Expecter) UnpinAll

func (_e *MockPinningService_Expecter) UnpinAll(ctx interface{}, statusFilter interface{}, opts interface{}) *MockPinningService_UnpinAll_Call

UnpinAll is a helper method to define mock.On call

  • ctx context.Context
  • statusFilter string
  • opts BatchOptions

func (*MockPinningService_Expecter) UnpinBatch

func (_e *MockPinningService_Expecter) UnpinBatch(ctx interface{}, cids interface{}, opts interface{}) *MockPinningService_UnpinBatch_Call

UnpinBatch is a helper method to define mock.On call

  • ctx context.Context
  • cids []string
  • opts BatchOptions

func (*MockPinningService_Expecter) UpdateMetadata

func (_e *MockPinningService_Expecter) UpdateMetadata(ctx interface{}, cid interface{}, set interface{}, clear interface{}) *MockPinningService_UpdateMetadata_Call

UpdateMetadata is a helper method to define mock.On call

  • ctx context.Context
  • cid string
  • set []string
  • clear bool

func (*MockPinningService_Expecter) UpdatePin added in v0.2.0

func (_e *MockPinningService_Expecter) UpdatePin(ctx interface{}, cid interface{}, name interface{}, meta interface{}, clearMeta interface{}) *MockPinningService_UpdatePin_Call

UpdatePin is a helper method to define mock.On call

  • ctx context.Context
  • cid string
  • name string
  • meta []string
  • clearMeta bool

type MockPinningService_List_Call

type MockPinningService_List_Call struct {
	*mock.Call
}

MockPinningService_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'

func (*MockPinningService_List_Call) Return

func (*MockPinningService_List_Call) Run

func (_c *MockPinningService_List_Call) Run(run func(ctx context.Context, nameFilter string, limit int, statusFilter string)) *MockPinningService_List_Call

func (*MockPinningService_List_Call) RunAndReturn

func (_c *MockPinningService_List_Call) RunAndReturn(run func(ctx context.Context, nameFilter string, limit int, statusFilter string) ([]Pin, error)) *MockPinningService_List_Call

type MockPinningService_PinBatch_Call

type MockPinningService_PinBatch_Call struct {
	*mock.Call
}

MockPinningService_PinBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PinBatch'

func (*MockPinningService_PinBatch_Call) Return

func (*MockPinningService_PinBatch_Call) Run

func (*MockPinningService_PinBatch_Call) RunAndReturn

type MockPinningService_Pin_Call

type MockPinningService_Pin_Call struct {
	*mock.Call
}

MockPinningService_Pin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pin'

func (*MockPinningService_Pin_Call) Return

func (*MockPinningService_Pin_Call) Run

func (_c *MockPinningService_Pin_Call) Run(run func(ctx context.Context, cid string, name string, wait bool)) *MockPinningService_Pin_Call

func (*MockPinningService_Pin_Call) RunAndReturn

func (_c *MockPinningService_Pin_Call) RunAndReturn(run func(ctx context.Context, cid string, name string, wait bool) (*PinResult, error)) *MockPinningService_Pin_Call

type MockPinningService_RequireAuthenticated_Call

type MockPinningService_RequireAuthenticated_Call struct {
	*mock.Call
}

MockPinningService_RequireAuthenticated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequireAuthenticated'

func (*MockPinningService_RequireAuthenticated_Call) Return

func (*MockPinningService_RequireAuthenticated_Call) Run

func (*MockPinningService_RequireAuthenticated_Call) RunAndReturn

type MockPinningService_Status_Call

type MockPinningService_Status_Call struct {
	*mock.Call
}

MockPinningService_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status'

func (*MockPinningService_Status_Call) Return

func (*MockPinningService_Status_Call) Run

func (*MockPinningService_Status_Call) RunAndReturn

type MockPinningService_UnpinAll_Call

type MockPinningService_UnpinAll_Call struct {
	*mock.Call
}

MockPinningService_UnpinAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnpinAll'

func (*MockPinningService_UnpinAll_Call) Return

func (*MockPinningService_UnpinAll_Call) Run

func (*MockPinningService_UnpinAll_Call) RunAndReturn

type MockPinningService_UnpinBatch_Call

type MockPinningService_UnpinBatch_Call struct {
	*mock.Call
}

MockPinningService_UnpinBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnpinBatch'

func (*MockPinningService_UnpinBatch_Call) Return

func (*MockPinningService_UnpinBatch_Call) Run

func (*MockPinningService_UnpinBatch_Call) RunAndReturn

type MockPinningService_Unpin_Call

type MockPinningService_Unpin_Call struct {
	*mock.Call
}

MockPinningService_Unpin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unpin'

func (*MockPinningService_Unpin_Call) Return

func (*MockPinningService_Unpin_Call) Run

func (*MockPinningService_Unpin_Call) RunAndReturn

func (_c *MockPinningService_Unpin_Call) RunAndReturn(run func(ctx context.Context, cid string, confirm bool) (*UnpinResult, error)) *MockPinningService_Unpin_Call

type MockPinningService_UpdateMetadata_Call

type MockPinningService_UpdateMetadata_Call struct {
	*mock.Call
}

MockPinningService_UpdateMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateMetadata'

func (*MockPinningService_UpdateMetadata_Call) Return

func (*MockPinningService_UpdateMetadata_Call) Run

func (*MockPinningService_UpdateMetadata_Call) RunAndReturn

type MockPinningService_UpdatePin_Call added in v0.2.0

type MockPinningService_UpdatePin_Call struct {
	*mock.Call
}

MockPinningService_UpdatePin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePin'

func (*MockPinningService_UpdatePin_Call) Return added in v0.2.0

func (*MockPinningService_UpdatePin_Call) Run added in v0.2.0

func (_c *MockPinningService_UpdatePin_Call) Run(run func(ctx context.Context, cid string, name string, meta []string, clearMeta bool)) *MockPinningService_UpdatePin_Call

func (*MockPinningService_UpdatePin_Call) RunAndReturn added in v0.2.0

func (_c *MockPinningService_UpdatePin_Call) RunAndReturn(run func(ctx context.Context, cid string, name string, meta []string, clearMeta bool) error) *MockPinningService_UpdatePin_Call

type MockProfilingAdminService added in v0.2.0

type MockProfilingAdminService struct {
	mock.Mock
}

MockProfilingAdminService is an autogenerated mock type for the ProfilingAdminService type

func NewMockProfilingAdminService added in v0.2.0

func NewMockProfilingAdminService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockProfilingAdminService

NewMockProfilingAdminService creates a new instance of MockProfilingAdminService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockProfilingAdminService) EXPECT added in v0.2.0

func (*MockProfilingAdminService) GetBlockProfile added in v0.2.0

func (_mock *MockProfilingAdminService) GetBlockProfile(ctx context.Context) ([]byte, error)

GetBlockProfile provides a mock function for the type MockProfilingAdminService

func (*MockProfilingAdminService) GetCPUProfile added in v0.2.0

func (_mock *MockProfilingAdminService) GetCPUProfile(ctx context.Context) ([]byte, error)

GetCPUProfile provides a mock function for the type MockProfilingAdminService

func (*MockProfilingAdminService) GetCmdline added in v0.2.0

func (_mock *MockProfilingAdminService) GetCmdline(ctx context.Context) ([]byte, error)

GetCmdline provides a mock function for the type MockProfilingAdminService

func (*MockProfilingAdminService) GetGoroutineProfile added in v0.2.0

func (_mock *MockProfilingAdminService) GetGoroutineProfile(ctx context.Context) ([]byte, error)

GetGoroutineProfile provides a mock function for the type MockProfilingAdminService

func (*MockProfilingAdminService) GetHeapProfile added in v0.2.0

func (_mock *MockProfilingAdminService) GetHeapProfile(ctx context.Context) ([]byte, error)

GetHeapProfile provides a mock function for the type MockProfilingAdminService

func (*MockProfilingAdminService) GetMutexProfile added in v0.2.0

func (_mock *MockProfilingAdminService) GetMutexProfile(ctx context.Context) ([]byte, error)

GetMutexProfile provides a mock function for the type MockProfilingAdminService

func (*MockProfilingAdminService) GetProfileIndex added in v0.2.0

func (_mock *MockProfilingAdminService) GetProfileIndex(ctx context.Context) ([]byte, error)

GetProfileIndex provides a mock function for the type MockProfilingAdminService

func (*MockProfilingAdminService) GetStatus added in v0.2.0

GetStatus provides a mock function for the type MockProfilingAdminService

func (*MockProfilingAdminService) GetSymbol added in v0.2.0

func (_mock *MockProfilingAdminService) GetSymbol(ctx context.Context) ([]byte, error)

GetSymbol provides a mock function for the type MockProfilingAdminService

func (*MockProfilingAdminService) GetThreadcreate added in v0.2.0

func (_mock *MockProfilingAdminService) GetThreadcreate(ctx context.Context) ([]byte, error)

GetThreadcreate provides a mock function for the type MockProfilingAdminService

func (*MockProfilingAdminService) GetTrace added in v0.2.0

func (_mock *MockProfilingAdminService) GetTrace(ctx context.Context) ([]byte, error)

GetTrace provides a mock function for the type MockProfilingAdminService

func (*MockProfilingAdminService) RequireAuthenticated added in v0.2.0

func (_mock *MockProfilingAdminService) RequireAuthenticated() error

RequireAuthenticated provides a mock function for the type MockProfilingAdminService

func (*MockProfilingAdminService) SetBlockProfileRate added in v0.2.0

func (_mock *MockProfilingAdminService) SetBlockProfileRate(ctx context.Context, rate int) error

SetBlockProfileRate provides a mock function for the type MockProfilingAdminService

func (*MockProfilingAdminService) SetMutexProfileFraction added in v0.2.0

func (_mock *MockProfilingAdminService) SetMutexProfileFraction(ctx context.Context, fraction int) error

SetMutexProfileFraction provides a mock function for the type MockProfilingAdminService

type MockProfilingAdminService_Expecter added in v0.2.0

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

func (*MockProfilingAdminService_Expecter) GetBlockProfile added in v0.2.0

GetBlockProfile is a helper method to define mock.On call

  • ctx context.Context

func (*MockProfilingAdminService_Expecter) GetCPUProfile added in v0.2.0

GetCPUProfile is a helper method to define mock.On call

  • ctx context.Context

func (*MockProfilingAdminService_Expecter) GetCmdline added in v0.2.0

GetCmdline is a helper method to define mock.On call

  • ctx context.Context

func (*MockProfilingAdminService_Expecter) GetGoroutineProfile added in v0.2.0

GetGoroutineProfile is a helper method to define mock.On call

  • ctx context.Context

func (*MockProfilingAdminService_Expecter) GetHeapProfile added in v0.2.0

GetHeapProfile is a helper method to define mock.On call

  • ctx context.Context

func (*MockProfilingAdminService_Expecter) GetMutexProfile added in v0.2.0

GetMutexProfile is a helper method to define mock.On call

  • ctx context.Context

func (*MockProfilingAdminService_Expecter) GetProfileIndex added in v0.2.0

GetProfileIndex is a helper method to define mock.On call

  • ctx context.Context

func (*MockProfilingAdminService_Expecter) GetStatus added in v0.2.0

GetStatus is a helper method to define mock.On call

  • ctx context.Context

func (*MockProfilingAdminService_Expecter) GetSymbol added in v0.2.0

GetSymbol is a helper method to define mock.On call

  • ctx context.Context

func (*MockProfilingAdminService_Expecter) GetThreadcreate added in v0.2.0

GetThreadcreate is a helper method to define mock.On call

  • ctx context.Context

func (*MockProfilingAdminService_Expecter) GetTrace added in v0.2.0

GetTrace is a helper method to define mock.On call

  • ctx context.Context

func (*MockProfilingAdminService_Expecter) RequireAuthenticated added in v0.2.0

RequireAuthenticated is a helper method to define mock.On call

func (*MockProfilingAdminService_Expecter) SetBlockProfileRate added in v0.2.0

func (_e *MockProfilingAdminService_Expecter) SetBlockProfileRate(ctx interface{}, rate interface{}) *MockProfilingAdminService_SetBlockProfileRate_Call

SetBlockProfileRate is a helper method to define mock.On call

  • ctx context.Context
  • rate int

func (*MockProfilingAdminService_Expecter) SetMutexProfileFraction added in v0.2.0

func (_e *MockProfilingAdminService_Expecter) SetMutexProfileFraction(ctx interface{}, fraction interface{}) *MockProfilingAdminService_SetMutexProfileFraction_Call

SetMutexProfileFraction is a helper method to define mock.On call

  • ctx context.Context
  • fraction int

type MockProfilingAdminService_GetBlockProfile_Call added in v0.2.0

type MockProfilingAdminService_GetBlockProfile_Call struct {
	*mock.Call
}

MockProfilingAdminService_GetBlockProfile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlockProfile'

func (*MockProfilingAdminService_GetBlockProfile_Call) Return added in v0.2.0

func (*MockProfilingAdminService_GetBlockProfile_Call) Run added in v0.2.0

func (*MockProfilingAdminService_GetBlockProfile_Call) RunAndReturn added in v0.2.0

type MockProfilingAdminService_GetCPUProfile_Call added in v0.2.0

type MockProfilingAdminService_GetCPUProfile_Call struct {
	*mock.Call
}

MockProfilingAdminService_GetCPUProfile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCPUProfile'

func (*MockProfilingAdminService_GetCPUProfile_Call) Return added in v0.2.0

func (*MockProfilingAdminService_GetCPUProfile_Call) Run added in v0.2.0

func (*MockProfilingAdminService_GetCPUProfile_Call) RunAndReturn added in v0.2.0

type MockProfilingAdminService_GetCmdline_Call added in v0.2.0

type MockProfilingAdminService_GetCmdline_Call struct {
	*mock.Call
}

MockProfilingAdminService_GetCmdline_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCmdline'

func (*MockProfilingAdminService_GetCmdline_Call) Return added in v0.2.0

func (*MockProfilingAdminService_GetCmdline_Call) Run added in v0.2.0

func (*MockProfilingAdminService_GetCmdline_Call) RunAndReturn added in v0.2.0

type MockProfilingAdminService_GetGoroutineProfile_Call added in v0.2.0

type MockProfilingAdminService_GetGoroutineProfile_Call struct {
	*mock.Call
}

MockProfilingAdminService_GetGoroutineProfile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGoroutineProfile'

func (*MockProfilingAdminService_GetGoroutineProfile_Call) Return added in v0.2.0

func (*MockProfilingAdminService_GetGoroutineProfile_Call) Run added in v0.2.0

func (*MockProfilingAdminService_GetGoroutineProfile_Call) RunAndReturn added in v0.2.0

type MockProfilingAdminService_GetHeapProfile_Call added in v0.2.0

type MockProfilingAdminService_GetHeapProfile_Call struct {
	*mock.Call
}

MockProfilingAdminService_GetHeapProfile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHeapProfile'

func (*MockProfilingAdminService_GetHeapProfile_Call) Return added in v0.2.0

func (*MockProfilingAdminService_GetHeapProfile_Call) Run added in v0.2.0

func (*MockProfilingAdminService_GetHeapProfile_Call) RunAndReturn added in v0.2.0

type MockProfilingAdminService_GetMutexProfile_Call added in v0.2.0

type MockProfilingAdminService_GetMutexProfile_Call struct {
	*mock.Call
}

MockProfilingAdminService_GetMutexProfile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMutexProfile'

func (*MockProfilingAdminService_GetMutexProfile_Call) Return added in v0.2.0

func (*MockProfilingAdminService_GetMutexProfile_Call) Run added in v0.2.0

func (*MockProfilingAdminService_GetMutexProfile_Call) RunAndReturn added in v0.2.0

type MockProfilingAdminService_GetProfileIndex_Call added in v0.2.0

type MockProfilingAdminService_GetProfileIndex_Call struct {
	*mock.Call
}

MockProfilingAdminService_GetProfileIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProfileIndex'

func (*MockProfilingAdminService_GetProfileIndex_Call) Return added in v0.2.0

func (*MockProfilingAdminService_GetProfileIndex_Call) Run added in v0.2.0

func (*MockProfilingAdminService_GetProfileIndex_Call) RunAndReturn added in v0.2.0

type MockProfilingAdminService_GetStatus_Call added in v0.2.0

type MockProfilingAdminService_GetStatus_Call struct {
	*mock.Call
}

MockProfilingAdminService_GetStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatus'

func (*MockProfilingAdminService_GetStatus_Call) Return added in v0.2.0

func (*MockProfilingAdminService_GetStatus_Call) Run added in v0.2.0

func (*MockProfilingAdminService_GetStatus_Call) RunAndReturn added in v0.2.0

type MockProfilingAdminService_GetSymbol_Call added in v0.2.0

type MockProfilingAdminService_GetSymbol_Call struct {
	*mock.Call
}

MockProfilingAdminService_GetSymbol_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSymbol'

func (*MockProfilingAdminService_GetSymbol_Call) Return added in v0.2.0

func (*MockProfilingAdminService_GetSymbol_Call) Run added in v0.2.0

func (*MockProfilingAdminService_GetSymbol_Call) RunAndReturn added in v0.2.0

type MockProfilingAdminService_GetThreadcreate_Call added in v0.2.0

type MockProfilingAdminService_GetThreadcreate_Call struct {
	*mock.Call
}

MockProfilingAdminService_GetThreadcreate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetThreadcreate'

func (*MockProfilingAdminService_GetThreadcreate_Call) Return added in v0.2.0

func (*MockProfilingAdminService_GetThreadcreate_Call) Run added in v0.2.0

func (*MockProfilingAdminService_GetThreadcreate_Call) RunAndReturn added in v0.2.0

type MockProfilingAdminService_GetTrace_Call added in v0.2.0

type MockProfilingAdminService_GetTrace_Call struct {
	*mock.Call
}

MockProfilingAdminService_GetTrace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTrace'

func (*MockProfilingAdminService_GetTrace_Call) Return added in v0.2.0

func (*MockProfilingAdminService_GetTrace_Call) Run added in v0.2.0

func (*MockProfilingAdminService_GetTrace_Call) RunAndReturn added in v0.2.0

type MockProfilingAdminService_RequireAuthenticated_Call added in v0.2.0

type MockProfilingAdminService_RequireAuthenticated_Call struct {
	*mock.Call
}

MockProfilingAdminService_RequireAuthenticated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequireAuthenticated'

func (*MockProfilingAdminService_RequireAuthenticated_Call) Return added in v0.2.0

func (*MockProfilingAdminService_RequireAuthenticated_Call) Run added in v0.2.0

func (*MockProfilingAdminService_RequireAuthenticated_Call) RunAndReturn added in v0.2.0

type MockProfilingAdminService_SetBlockProfileRate_Call added in v0.2.0

type MockProfilingAdminService_SetBlockProfileRate_Call struct {
	*mock.Call
}

MockProfilingAdminService_SetBlockProfileRate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetBlockProfileRate'

func (*MockProfilingAdminService_SetBlockProfileRate_Call) Return added in v0.2.0

func (*MockProfilingAdminService_SetBlockProfileRate_Call) Run added in v0.2.0

func (*MockProfilingAdminService_SetBlockProfileRate_Call) RunAndReturn added in v0.2.0

type MockProfilingAdminService_SetMutexProfileFraction_Call added in v0.2.0

type MockProfilingAdminService_SetMutexProfileFraction_Call struct {
	*mock.Call
}

MockProfilingAdminService_SetMutexProfileFraction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetMutexProfileFraction'

func (*MockProfilingAdminService_SetMutexProfileFraction_Call) Return added in v0.2.0

func (*MockProfilingAdminService_SetMutexProfileFraction_Call) Run added in v0.2.0

func (*MockProfilingAdminService_SetMutexProfileFraction_Call) RunAndReturn added in v0.2.0

type MockQuotaAdminService

type MockQuotaAdminService struct {
	mock.Mock
}

MockQuotaAdminService is an autogenerated mock type for the QuotaAdminService type

func NewMockQuotaAdminService

func NewMockQuotaAdminService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockQuotaAdminService

NewMockQuotaAdminService creates a new instance of MockQuotaAdminService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockQuotaAdminService) Cleanup

func (_mock *MockQuotaAdminService) Cleanup(ctx context.Context, retentionDays int) (int, error)

Cleanup provides a mock function for the type MockQuotaAdminService

func (*MockQuotaAdminService) CreateAllowance

func (_mock *MockQuotaAdminService) CreateAllowance(ctx context.Context, userID int, source string, allowanceType string, upload int, download int, storage int, expiryDate time.Time) (*admin.QuotaAllowance, error)

CreateAllowance provides a mock function for the type MockQuotaAdminService

func (*MockQuotaAdminService) CreatePlan

func (_mock *MockQuotaAdminService) CreatePlan(ctx context.Context, plan *admin.QuotaPlan) (*admin.QuotaPlan, error)

CreatePlan provides a mock function for the type MockQuotaAdminService

func (*MockQuotaAdminService) DeleteAllowance

func (_mock *MockQuotaAdminService) DeleteAllowance(ctx context.Context, grantID string) error

DeleteAllowance provides a mock function for the type MockQuotaAdminService

func (*MockQuotaAdminService) DeletePlan

func (_mock *MockQuotaAdminService) DeletePlan(ctx context.Context, planID string) error

DeletePlan provides a mock function for the type MockQuotaAdminService

func (*MockQuotaAdminService) EXPECT

func (*MockQuotaAdminService) GetPlan

func (_mock *MockQuotaAdminService) GetPlan(ctx context.Context, planID string) (*admin.QuotaPlan, error)

GetPlan provides a mock function for the type MockQuotaAdminService

func (*MockQuotaAdminService) GetStats

func (_mock *MockQuotaAdminService) GetStats(ctx context.Context) (*admin.SystemStats, error)

GetStats provides a mock function for the type MockQuotaAdminService

func (*MockQuotaAdminService) ListAllowances

func (_mock *MockQuotaAdminService) ListAllowances(ctx context.Context) ([]*admin.QuotaAllowance, int, error)

ListAllowances provides a mock function for the type MockQuotaAdminService

func (*MockQuotaAdminService) ListPlans

func (_mock *MockQuotaAdminService) ListPlans(ctx context.Context) ([]*admin.QuotaPlan, int, error)

ListPlans provides a mock function for the type MockQuotaAdminService

func (*MockQuotaAdminService) ListUserConfigs

func (_mock *MockQuotaAdminService) ListUserConfigs(ctx context.Context) ([]*admin.UserQuotaConfig, int, error)

ListUserConfigs provides a mock function for the type MockQuotaAdminService

func (*MockQuotaAdminService) Reconcile

func (_mock *MockQuotaAdminService) Reconcile(ctx context.Context, userID *int) (string, int, error)

Reconcile provides a mock function for the type MockQuotaAdminService

func (*MockQuotaAdminService) RequireAuthenticated

func (_mock *MockQuotaAdminService) RequireAuthenticated() error

RequireAuthenticated provides a mock function for the type MockQuotaAdminService

func (*MockQuotaAdminService) ResetUserPlan

func (_mock *MockQuotaAdminService) ResetUserPlan(ctx context.Context, userID int) error

ResetUserPlan provides a mock function for the type MockQuotaAdminService

func (*MockQuotaAdminService) SetDefaultPlan

func (_mock *MockQuotaAdminService) SetDefaultPlan(ctx context.Context, planID string) error

SetDefaultPlan provides a mock function for the type MockQuotaAdminService

func (*MockQuotaAdminService) UpdateAllowance

func (_mock *MockQuotaAdminService) UpdateAllowance(ctx context.Context, grantID string, userID int, source string, allowanceType string, upload int, download int, storage int, expiryDate time.Time) (*admin.QuotaAllowance, error)

UpdateAllowance provides a mock function for the type MockQuotaAdminService

func (*MockQuotaAdminService) UpdatePlan

func (_mock *MockQuotaAdminService) UpdatePlan(ctx context.Context, planID string, plan *admin.QuotaPlan) (*admin.QuotaPlan, error)

UpdatePlan provides a mock function for the type MockQuotaAdminService

func (*MockQuotaAdminService) UpdateUserConfig

func (_mock *MockQuotaAdminService) UpdateUserConfig(ctx context.Context, userID int, config *admin.UserQuotaConfigUpdate) (*admin.UserQuotaConfig, error)

UpdateUserConfig provides a mock function for the type MockQuotaAdminService

type MockQuotaAdminService_Cleanup_Call

type MockQuotaAdminService_Cleanup_Call struct {
	*mock.Call
}

MockQuotaAdminService_Cleanup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Cleanup'

func (*MockQuotaAdminService_Cleanup_Call) Return

func (*MockQuotaAdminService_Cleanup_Call) Run

func (*MockQuotaAdminService_Cleanup_Call) RunAndReturn

func (_c *MockQuotaAdminService_Cleanup_Call) RunAndReturn(run func(ctx context.Context, retentionDays int) (int, error)) *MockQuotaAdminService_Cleanup_Call

type MockQuotaAdminService_CreateAllowance_Call

type MockQuotaAdminService_CreateAllowance_Call struct {
	*mock.Call
}

MockQuotaAdminService_CreateAllowance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAllowance'

func (*MockQuotaAdminService_CreateAllowance_Call) Return

func (*MockQuotaAdminService_CreateAllowance_Call) Run

func (_c *MockQuotaAdminService_CreateAllowance_Call) Run(run func(ctx context.Context, userID int, source string, allowanceType string, upload int, download int, storage int, expiryDate time.Time)) *MockQuotaAdminService_CreateAllowance_Call

func (*MockQuotaAdminService_CreateAllowance_Call) RunAndReturn

func (_c *MockQuotaAdminService_CreateAllowance_Call) RunAndReturn(run func(ctx context.Context, userID int, source string, allowanceType string, upload int, download int, storage int, expiryDate time.Time) (*admin.QuotaAllowance, error)) *MockQuotaAdminService_CreateAllowance_Call

type MockQuotaAdminService_CreatePlan_Call

type MockQuotaAdminService_CreatePlan_Call struct {
	*mock.Call
}

MockQuotaAdminService_CreatePlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePlan'

func (*MockQuotaAdminService_CreatePlan_Call) Return

func (*MockQuotaAdminService_CreatePlan_Call) Run

func (*MockQuotaAdminService_CreatePlan_Call) RunAndReturn

type MockQuotaAdminService_DeleteAllowance_Call

type MockQuotaAdminService_DeleteAllowance_Call struct {
	*mock.Call
}

MockQuotaAdminService_DeleteAllowance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAllowance'

func (*MockQuotaAdminService_DeleteAllowance_Call) Return

func (*MockQuotaAdminService_DeleteAllowance_Call) Run

func (*MockQuotaAdminService_DeleteAllowance_Call) RunAndReturn

type MockQuotaAdminService_DeletePlan_Call

type MockQuotaAdminService_DeletePlan_Call struct {
	*mock.Call
}

MockQuotaAdminService_DeletePlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePlan'

func (*MockQuotaAdminService_DeletePlan_Call) Return

func (*MockQuotaAdminService_DeletePlan_Call) Run

func (*MockQuotaAdminService_DeletePlan_Call) RunAndReturn

type MockQuotaAdminService_Expecter

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

func (*MockQuotaAdminService_Expecter) Cleanup

func (_e *MockQuotaAdminService_Expecter) Cleanup(ctx interface{}, retentionDays interface{}) *MockQuotaAdminService_Cleanup_Call

Cleanup is a helper method to define mock.On call

  • ctx context.Context
  • retentionDays int

func (*MockQuotaAdminService_Expecter) CreateAllowance

func (_e *MockQuotaAdminService_Expecter) CreateAllowance(ctx interface{}, userID interface{}, source interface{}, allowanceType interface{}, upload interface{}, download interface{}, storage interface{}, expiryDate interface{}) *MockQuotaAdminService_CreateAllowance_Call

CreateAllowance is a helper method to define mock.On call

  • ctx context.Context
  • userID int
  • source string
  • allowanceType string
  • upload int
  • download int
  • storage int
  • expiryDate time.Time

func (*MockQuotaAdminService_Expecter) CreatePlan

func (_e *MockQuotaAdminService_Expecter) CreatePlan(ctx interface{}, plan interface{}) *MockQuotaAdminService_CreatePlan_Call

CreatePlan is a helper method to define mock.On call

  • ctx context.Context
  • plan *admin.QuotaPlan

func (*MockQuotaAdminService_Expecter) DeleteAllowance

func (_e *MockQuotaAdminService_Expecter) DeleteAllowance(ctx interface{}, grantID interface{}) *MockQuotaAdminService_DeleteAllowance_Call

DeleteAllowance is a helper method to define mock.On call

  • ctx context.Context
  • grantID string

func (*MockQuotaAdminService_Expecter) DeletePlan

func (_e *MockQuotaAdminService_Expecter) DeletePlan(ctx interface{}, planID interface{}) *MockQuotaAdminService_DeletePlan_Call

DeletePlan is a helper method to define mock.On call

  • ctx context.Context
  • planID string

func (*MockQuotaAdminService_Expecter) GetPlan

func (_e *MockQuotaAdminService_Expecter) GetPlan(ctx interface{}, planID interface{}) *MockQuotaAdminService_GetPlan_Call

GetPlan is a helper method to define mock.On call

  • ctx context.Context
  • planID string

func (*MockQuotaAdminService_Expecter) GetStats

GetStats is a helper method to define mock.On call

  • ctx context.Context

func (*MockQuotaAdminService_Expecter) ListAllowances

ListAllowances is a helper method to define mock.On call

  • ctx context.Context

func (*MockQuotaAdminService_Expecter) ListPlans

ListPlans is a helper method to define mock.On call

  • ctx context.Context

func (*MockQuotaAdminService_Expecter) ListUserConfigs

func (_e *MockQuotaAdminService_Expecter) ListUserConfigs(ctx interface{}) *MockQuotaAdminService_ListUserConfigs_Call

ListUserConfigs is a helper method to define mock.On call

  • ctx context.Context

func (*MockQuotaAdminService_Expecter) Reconcile

func (_e *MockQuotaAdminService_Expecter) Reconcile(ctx interface{}, userID interface{}) *MockQuotaAdminService_Reconcile_Call

Reconcile is a helper method to define mock.On call

  • ctx context.Context
  • userID *int

func (*MockQuotaAdminService_Expecter) RequireAuthenticated

RequireAuthenticated is a helper method to define mock.On call

func (*MockQuotaAdminService_Expecter) ResetUserPlan

func (_e *MockQuotaAdminService_Expecter) ResetUserPlan(ctx interface{}, userID interface{}) *MockQuotaAdminService_ResetUserPlan_Call

ResetUserPlan is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockQuotaAdminService_Expecter) SetDefaultPlan

func (_e *MockQuotaAdminService_Expecter) SetDefaultPlan(ctx interface{}, planID interface{}) *MockQuotaAdminService_SetDefaultPlan_Call

SetDefaultPlan is a helper method to define mock.On call

  • ctx context.Context
  • planID string

func (*MockQuotaAdminService_Expecter) UpdateAllowance

func (_e *MockQuotaAdminService_Expecter) UpdateAllowance(ctx interface{}, grantID interface{}, userID interface{}, source interface{}, allowanceType interface{}, upload interface{}, download interface{}, storage interface{}, expiryDate interface{}) *MockQuotaAdminService_UpdateAllowance_Call

UpdateAllowance is a helper method to define mock.On call

  • ctx context.Context
  • grantID string
  • userID int
  • source string
  • allowanceType string
  • upload int
  • download int
  • storage int
  • expiryDate time.Time

func (*MockQuotaAdminService_Expecter) UpdatePlan

func (_e *MockQuotaAdminService_Expecter) UpdatePlan(ctx interface{}, planID interface{}, plan interface{}) *MockQuotaAdminService_UpdatePlan_Call

UpdatePlan is a helper method to define mock.On call

  • ctx context.Context
  • planID string
  • plan *admin.QuotaPlan

func (*MockQuotaAdminService_Expecter) UpdateUserConfig

func (_e *MockQuotaAdminService_Expecter) UpdateUserConfig(ctx interface{}, userID interface{}, config interface{}) *MockQuotaAdminService_UpdateUserConfig_Call

UpdateUserConfig is a helper method to define mock.On call

  • ctx context.Context
  • userID int
  • config *admin.UserQuotaConfigUpdate

type MockQuotaAdminService_GetPlan_Call

type MockQuotaAdminService_GetPlan_Call struct {
	*mock.Call
}

MockQuotaAdminService_GetPlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPlan'

func (*MockQuotaAdminService_GetPlan_Call) Return

func (*MockQuotaAdminService_GetPlan_Call) Run

func (*MockQuotaAdminService_GetPlan_Call) RunAndReturn

type MockQuotaAdminService_GetStats_Call

type MockQuotaAdminService_GetStats_Call struct {
	*mock.Call
}

MockQuotaAdminService_GetStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStats'

func (*MockQuotaAdminService_GetStats_Call) Return

func (*MockQuotaAdminService_GetStats_Call) Run

func (*MockQuotaAdminService_GetStats_Call) RunAndReturn

type MockQuotaAdminService_ListAllowances_Call

type MockQuotaAdminService_ListAllowances_Call struct {
	*mock.Call
}

MockQuotaAdminService_ListAllowances_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAllowances'

func (*MockQuotaAdminService_ListAllowances_Call) Return

func (*MockQuotaAdminService_ListAllowances_Call) Run

func (*MockQuotaAdminService_ListAllowances_Call) RunAndReturn

type MockQuotaAdminService_ListPlans_Call

type MockQuotaAdminService_ListPlans_Call struct {
	*mock.Call
}

MockQuotaAdminService_ListPlans_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPlans'

func (*MockQuotaAdminService_ListPlans_Call) Return

func (*MockQuotaAdminService_ListPlans_Call) Run

func (*MockQuotaAdminService_ListPlans_Call) RunAndReturn

type MockQuotaAdminService_ListUserConfigs_Call

type MockQuotaAdminService_ListUserConfigs_Call struct {
	*mock.Call
}

MockQuotaAdminService_ListUserConfigs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListUserConfigs'

func (*MockQuotaAdminService_ListUserConfigs_Call) Return

func (*MockQuotaAdminService_ListUserConfigs_Call) Run

func (*MockQuotaAdminService_ListUserConfigs_Call) RunAndReturn

type MockQuotaAdminService_Reconcile_Call

type MockQuotaAdminService_Reconcile_Call struct {
	*mock.Call
}

MockQuotaAdminService_Reconcile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reconcile'

func (*MockQuotaAdminService_Reconcile_Call) Return

func (*MockQuotaAdminService_Reconcile_Call) Run

func (*MockQuotaAdminService_Reconcile_Call) RunAndReturn

type MockQuotaAdminService_RequireAuthenticated_Call

type MockQuotaAdminService_RequireAuthenticated_Call struct {
	*mock.Call
}

MockQuotaAdminService_RequireAuthenticated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequireAuthenticated'

func (*MockQuotaAdminService_RequireAuthenticated_Call) Return

func (*MockQuotaAdminService_RequireAuthenticated_Call) Run

func (*MockQuotaAdminService_RequireAuthenticated_Call) RunAndReturn

type MockQuotaAdminService_ResetUserPlan_Call

type MockQuotaAdminService_ResetUserPlan_Call struct {
	*mock.Call
}

MockQuotaAdminService_ResetUserPlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResetUserPlan'

func (*MockQuotaAdminService_ResetUserPlan_Call) Return

func (*MockQuotaAdminService_ResetUserPlan_Call) Run

func (*MockQuotaAdminService_ResetUserPlan_Call) RunAndReturn

type MockQuotaAdminService_SetDefaultPlan_Call

type MockQuotaAdminService_SetDefaultPlan_Call struct {
	*mock.Call
}

MockQuotaAdminService_SetDefaultPlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetDefaultPlan'

func (*MockQuotaAdminService_SetDefaultPlan_Call) Return

func (*MockQuotaAdminService_SetDefaultPlan_Call) Run

func (*MockQuotaAdminService_SetDefaultPlan_Call) RunAndReturn

type MockQuotaAdminService_UpdateAllowance_Call

type MockQuotaAdminService_UpdateAllowance_Call struct {
	*mock.Call
}

MockQuotaAdminService_UpdateAllowance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAllowance'

func (*MockQuotaAdminService_UpdateAllowance_Call) Return

func (*MockQuotaAdminService_UpdateAllowance_Call) Run

func (_c *MockQuotaAdminService_UpdateAllowance_Call) Run(run func(ctx context.Context, grantID string, userID int, source string, allowanceType string, upload int, download int, storage int, expiryDate time.Time)) *MockQuotaAdminService_UpdateAllowance_Call

func (*MockQuotaAdminService_UpdateAllowance_Call) RunAndReturn

func (_c *MockQuotaAdminService_UpdateAllowance_Call) RunAndReturn(run func(ctx context.Context, grantID string, userID int, source string, allowanceType string, upload int, download int, storage int, expiryDate time.Time) (*admin.QuotaAllowance, error)) *MockQuotaAdminService_UpdateAllowance_Call

type MockQuotaAdminService_UpdatePlan_Call

type MockQuotaAdminService_UpdatePlan_Call struct {
	*mock.Call
}

MockQuotaAdminService_UpdatePlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePlan'

func (*MockQuotaAdminService_UpdatePlan_Call) Return

func (*MockQuotaAdminService_UpdatePlan_Call) Run

func (*MockQuotaAdminService_UpdatePlan_Call) RunAndReturn

type MockQuotaAdminService_UpdateUserConfig_Call

type MockQuotaAdminService_UpdateUserConfig_Call struct {
	*mock.Call
}

MockQuotaAdminService_UpdateUserConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateUserConfig'

func (*MockQuotaAdminService_UpdateUserConfig_Call) Return

func (*MockQuotaAdminService_UpdateUserConfig_Call) Run

func (*MockQuotaAdminService_UpdateUserConfig_Call) RunAndReturn

type MockSelectPrompter added in v0.2.0

type MockSelectPrompter struct {
	SelectResult int
	SelectString string
	SelectErr    error
}

MockSelectPrompter is a mock implementation of SelectPrompter for testing.

func (*MockSelectPrompter) Select added in v0.2.0

func (m *MockSelectPrompter) Select(label string, items []string) (int, string, error)

type MockSetupUI

type MockSetupUI struct {
	*wizard.MockUI

	AuthChoice   AuthStepChoice
	ConfigChoice ConfigStepChoice
	CustomConfig CustomConfig
	Email        string
	Password     string
	OTPCode      string
	PromptError  error

	ContinueError error

	SelectResult int
	SelectString string
	SelectErr    error
	ContinueErr  error

	AuthExecuted     bool
	ConfigExecuted   bool
	TutorialExecuted bool

	EndpointSet string
	SecureSet   *bool
	// contains filtered or unexported fields
}

func NewMockSetupUI

func NewMockSetupUI() *MockSetupUI

func (*MockSetupUI) Continue added in v0.2.0

func (m *MockSetupUI) Continue() error

func (*MockSetupUI) ExecuteAuthStep

func (m *MockSetupUI) ExecuteAuthStep(_ context.Context, w *SetupWizard) error

func (*MockSetupUI) ExecuteCompletionStep

func (m *MockSetupUI) ExecuteCompletionStep(_ *SetupWizard) error

func (*MockSetupUI) ExecuteConfigStep

func (m *MockSetupUI) ExecuteConfigStep(_ context.Context, w *SetupWizard) error

func (*MockSetupUI) ExecuteTutorialStep

func (m *MockSetupUI) ExecuteTutorialStep(_ *SetupWizard) error

func (*MockSetupUI) Select added in v0.2.0

func (m *MockSetupUI) Select(label string, items []string) (int, string, error)

func (*MockSetupUI) SetAuthChoice

func (m *MockSetupUI) SetAuthChoice(choice AuthStepChoice)

func (*MockSetupUI) SetConfigChoice

func (m *MockSetupUI) SetConfigChoice(choice ConfigStepChoice)

func (*MockSetupUI) SetCredentials

func (m *MockSetupUI) SetCredentials(email, password string)

func (*MockSetupUI) SetCustomConfig

func (m *MockSetupUI) SetCustomConfig(config CustomConfig)

func (*MockSetupUI) SetOTPCode

func (m *MockSetupUI) SetOTPCode(code string)

func (*MockSetupUI) SetReturnError

func (m *MockSetupUI) SetReturnError(err error)

type MockSpinner added in v0.2.0

type MockSpinner struct {
	StartErr error
	StopErr  error
	Messages []string
}

MockSpinner is a mock implementation of Spinner for testing.

func (*MockSpinner) Fail added in v0.2.0

func (m *MockSpinner) Fail(message string)

func (*MockSpinner) Start added in v0.2.0

func (m *MockSpinner) Start(message string) error

func (*MockSpinner) Stop added in v0.2.0

func (m *MockSpinner) Stop() error

func (*MockSpinner) Success added in v0.2.0

func (m *MockSpinner) Success(message string)

func (*MockSpinner) UpdateText added in v0.2.0

func (m *MockSpinner) UpdateText(message string)

type MockStatusService

type MockStatusService struct {
	mock.Mock
}

MockStatusService is an autogenerated mock type for the StatusService type

func NewMockStatusService

func NewMockStatusService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockStatusService

NewMockStatusService creates a new instance of MockStatusService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockStatusService) EXPECT

func (*MockStatusService) RequireAuthenticated

func (_mock *MockStatusService) RequireAuthenticated() error

RequireAuthenticated provides a mock function for the type MockStatusService

func (*MockStatusService) Status

func (_mock *MockStatusService) Status(ctx context.Context, cid string, watch bool) (*PinStatus, *OperationStatusResult, error)

Status provides a mock function for the type MockStatusService

type MockStatusService_Expecter

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

func (*MockStatusService_Expecter) RequireAuthenticated

RequireAuthenticated is a helper method to define mock.On call

func (*MockStatusService_Expecter) Status

func (_e *MockStatusService_Expecter) Status(ctx interface{}, cid interface{}, watch interface{}) *MockStatusService_Status_Call

Status is a helper method to define mock.On call

  • ctx context.Context
  • cid string
  • watch bool

type MockStatusService_RequireAuthenticated_Call

type MockStatusService_RequireAuthenticated_Call struct {
	*mock.Call
}

MockStatusService_RequireAuthenticated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequireAuthenticated'

func (*MockStatusService_RequireAuthenticated_Call) Return

func (*MockStatusService_RequireAuthenticated_Call) Run

func (*MockStatusService_RequireAuthenticated_Call) RunAndReturn

type MockStatusService_Status_Call

type MockStatusService_Status_Call struct {
	*mock.Call
}

MockStatusService_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status'

func (*MockStatusService_Status_Call) Return

func (_c *MockStatusService_Status_Call) Return(pinStatus *PinStatus, operationStatusResult *OperationStatusResult, err error) *MockStatusService_Status_Call

func (*MockStatusService_Status_Call) Run

func (*MockStatusService_Status_Call) RunAndReturn

type MockUploadService

type MockUploadService struct {
	mock.Mock
}

MockUploadService is an autogenerated mock type for the UploadService type

func NewMockUploadService

func NewMockUploadService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockUploadService

NewMockUploadService creates a new instance of MockUploadService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockUploadService) EXPECT

func (*MockUploadService) Upload

func (_mock *MockUploadService) Upload(ctx context.Context, filesystem fs.FS, name string, wait bool) (*UploadResult, error)

Upload provides a mock function for the type MockUploadService

type MockUploadService_Expecter

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

func (*MockUploadService_Expecter) Upload

func (_e *MockUploadService_Expecter) Upload(ctx interface{}, filesystem interface{}, name interface{}, wait interface{}) *MockUploadService_Upload_Call

Upload is a helper method to define mock.On call

  • ctx context.Context
  • filesystem fs.FS
  • name string
  • wait bool

type MockUploadService_Upload_Call

type MockUploadService_Upload_Call struct {
	*mock.Call
}

MockUploadService_Upload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upload'

func (*MockUploadService_Upload_Call) Return

func (*MockUploadService_Upload_Call) Run

func (_c *MockUploadService_Upload_Call) Run(run func(ctx context.Context, filesystem fs.FS, name string, wait bool)) *MockUploadService_Upload_Call

func (*MockUploadService_Upload_Call) RunAndReturn

func (_c *MockUploadService_Upload_Call) RunAndReturn(run func(ctx context.Context, filesystem fs.FS, name string, wait bool) (*UploadResult, error)) *MockUploadService_Upload_Call

type MockWebsiteAdminService

type MockWebsiteAdminService struct {
	mock.Mock
}

MockWebsiteAdminService is an autogenerated mock type for the WebsiteAdminService type

func NewMockWebsiteAdminService

func NewMockWebsiteAdminService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockWebsiteAdminService

NewMockWebsiteAdminService creates a new instance of MockWebsiteAdminService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockWebsiteAdminService) BlockWebsite

func (_mock *MockWebsiteAdminService) BlockWebsite(ctx context.Context, id string) (*admin.Website, error)

BlockWebsite provides a mock function for the type MockWebsiteAdminService

func (*MockWebsiteAdminService) EXPECT

func (*MockWebsiteAdminService) RequireAuthenticated

func (_mock *MockWebsiteAdminService) RequireAuthenticated() error

RequireAuthenticated provides a mock function for the type MockWebsiteAdminService

func (*MockWebsiteAdminService) UnblockWebsite

func (_mock *MockWebsiteAdminService) UnblockWebsite(ctx context.Context, id string) (*admin.Website, error)

UnblockWebsite provides a mock function for the type MockWebsiteAdminService

type MockWebsiteAdminService_BlockWebsite_Call

type MockWebsiteAdminService_BlockWebsite_Call struct {
	*mock.Call
}

MockWebsiteAdminService_BlockWebsite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockWebsite'

func (*MockWebsiteAdminService_BlockWebsite_Call) Return

func (*MockWebsiteAdminService_BlockWebsite_Call) Run

func (*MockWebsiteAdminService_BlockWebsite_Call) RunAndReturn

type MockWebsiteAdminService_Expecter

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

func (*MockWebsiteAdminService_Expecter) BlockWebsite

func (_e *MockWebsiteAdminService_Expecter) BlockWebsite(ctx interface{}, id interface{}) *MockWebsiteAdminService_BlockWebsite_Call

BlockWebsite is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*MockWebsiteAdminService_Expecter) RequireAuthenticated

RequireAuthenticated is a helper method to define mock.On call

func (*MockWebsiteAdminService_Expecter) UnblockWebsite

func (_e *MockWebsiteAdminService_Expecter) UnblockWebsite(ctx interface{}, id interface{}) *MockWebsiteAdminService_UnblockWebsite_Call

UnblockWebsite is a helper method to define mock.On call

  • ctx context.Context
  • id string

type MockWebsiteAdminService_RequireAuthenticated_Call

type MockWebsiteAdminService_RequireAuthenticated_Call struct {
	*mock.Call
}

MockWebsiteAdminService_RequireAuthenticated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequireAuthenticated'

func (*MockWebsiteAdminService_RequireAuthenticated_Call) Return

func (*MockWebsiteAdminService_RequireAuthenticated_Call) Run

func (*MockWebsiteAdminService_RequireAuthenticated_Call) RunAndReturn

type MockWebsiteAdminService_UnblockWebsite_Call

type MockWebsiteAdminService_UnblockWebsite_Call struct {
	*mock.Call
}

MockWebsiteAdminService_UnblockWebsite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnblockWebsite'

func (*MockWebsiteAdminService_UnblockWebsite_Call) Return

func (*MockWebsiteAdminService_UnblockWebsite_Call) Run

func (*MockWebsiteAdminService_UnblockWebsite_Call) RunAndReturn

type MockWebsitesUI

type MockWebsitesUI struct {
	*wizard.MockUI

	ContentChoice ContentSourceChoice
	DNSChoice     DNSModeChoice
	TargetChoice  TargetTypeChoice
	CIDInput      string
	DomainInput   string
	PromptError   error

	ContinueError error

	SelectResult int
	SelectString string
	SelectErr    error
	ContinueErr  error

	StartErr error
	StopErr  error
	Messages []string

	AuthCheckExecuted     bool
	ContentSourceExecuted bool
	TargetTypeExecuted    bool
	DomainExecuted        bool
	DNSModeExecuted       bool
	ValidateExecuted      bool
	ValidateAttempts      int
	// contains filtered or unexported fields
}

MockWebsitesUI is a mock implementation of WebsitesUI for testing.

func NewMockWebsitesUI

func NewMockWebsitesUI() *MockWebsitesUI

NewMockWebsitesUI creates a new mock websites UI.

func (*MockWebsitesUI) Continue added in v0.2.0

func (m *MockWebsitesUI) Continue() error

func (*MockWebsitesUI) ExecuteAuthCheckStep

func (m *MockWebsitesUI) ExecuteAuthCheckStep(_ context.Context, w *WebsitesWizard) error

ExecuteAuthCheckStep implements WebsitesUI.

func (*MockWebsitesUI) ExecuteContentSourceStep

func (m *MockWebsitesUI) ExecuteContentSourceStep(_ context.Context, w *WebsitesWizard) error

ExecuteContentSourceStep implements WebsitesUI.

func (*MockWebsitesUI) ExecuteCreateWebsiteStep

func (m *MockWebsitesUI) ExecuteCreateWebsiteStep(_ context.Context, w *WebsitesWizard) error

func (*MockWebsitesUI) ExecuteDNSModeStep

func (m *MockWebsitesUI) ExecuteDNSModeStep(_ context.Context, w *WebsitesWizard) error

ExecuteDNSModeStep implements WebsitesUI.

func (*MockWebsitesUI) ExecuteDomainStep

func (m *MockWebsitesUI) ExecuteDomainStep(_ context.Context, w *WebsitesWizard) error

ExecuteDomainStep implements WebsitesUI.

func (*MockWebsitesUI) ExecuteTargetTypeStep

func (m *MockWebsitesUI) ExecuteTargetTypeStep(_ context.Context, w *WebsitesWizard) error

ExecuteTargetTypeStep implements WebsitesUI.

func (*MockWebsitesUI) ExecuteValidateStep

func (m *MockWebsitesUI) ExecuteValidateStep(_ context.Context, w *WebsitesWizard) error

ExecuteValidateStep implements WebsitesUI.

func (*MockWebsitesUI) Fail added in v0.2.0

func (m *MockWebsitesUI) Fail(message string)

func (*MockWebsitesUI) Select added in v0.2.0

func (m *MockWebsitesUI) Select(label string, items []string) (int, string, error)

func (*MockWebsitesUI) SetCIDInput

func (m *MockWebsitesUI) SetCIDInput(cid string)

SetCIDInput sets the mock's CID input response.

func (*MockWebsitesUI) SetContentChoice

func (m *MockWebsitesUI) SetContentChoice(choice ContentSourceChoice)

SetContentChoice sets the mock's content source choice response.

func (*MockWebsitesUI) SetDNSChoice

func (m *MockWebsitesUI) SetDNSChoice(choice DNSModeChoice)

SetDNSChoice sets the mock's DNS mode choice response.

func (*MockWebsitesUI) SetDomainInput

func (m *MockWebsitesUI) SetDomainInput(domain string)

SetDomainInput sets the mock's domain input response.

func (*MockWebsitesUI) SetReturnError

func (m *MockWebsitesUI) SetReturnError(err error)

SetReturnError sets an error to return from the next UI call.

func (*MockWebsitesUI) SetTargetChoice

func (m *MockWebsitesUI) SetTargetChoice(choice TargetTypeChoice)

SetTargetChoice sets the mock's target type choice response.

func (*MockWebsitesUI) Start added in v0.2.0

func (m *MockWebsitesUI) Start(message string) error

func (*MockWebsitesUI) Stop added in v0.2.0

func (m *MockWebsitesUI) Stop() error

func (*MockWebsitesUI) Success added in v0.2.0

func (m *MockWebsitesUI) Success(message string)

func (*MockWebsitesUI) UpdateText added in v0.2.0

func (m *MockWebsitesUI) UpdateText(message string)

type OperationDetail

type OperationDetail struct {
	ID                   int
	Operation            string
	OperationDisplayName string
	Protocol             string
	ProtocolDisplayName  string
	Status               string
	StatusDisplayName    string
	StatusMessage        string
	CID                  string
	ProgressPercent      float32
	StartedAt            string
	UpdatedAt            string
	Error                string
	CurrentStep          *int
	TotalSteps           *int
}

type OperationError

type OperationError struct {
	CID   string
	Error string
}

OperationError represents a failed operation in a batch

type OperationListItem

type OperationListItem struct {
	ID                   int
	Operation            string
	OperationDisplayName string
	Protocol             string
	ProtocolDisplayName  string
	Status               string
	StatusDisplayName    string
	StatusMessage        string
	CID                  string
	ProgressPercent      float32
	StartedAt            string
	UpdatedAt            string
	Error                string
	CurrentStep          *int
	TotalSteps           *int
}

type OperationResult

type OperationResult struct {
	CID       string
	RequestID string
	Status    string
}

OperationResult represents a successful operation in a batch

type OperationStatusResult

type OperationStatusResult struct {
	ID                   int
	Operation            string
	OperationDisplayName string
	Protocol             string
	ProtocolDisplayName  string
	Status               string
	StatusDisplayName    string
	StatusMessage        string
	CID                  string
	ProgressPercent      float32
	StartedAt            string
	UpdatedAt            string
	Error                string
	Source               string
}

OperationStatusResult represents the status of an account operation.

type OperationsListOptions

type OperationsListOptions struct {
	StatusFilter    string
	OperationFilter string
	ProtocolFilter  string
	CIDFilter       string
	Limit           int
	Offset          int
}

type OperationsListResult

type OperationsListResult struct {
	Operations []OperationListItem
	Total      int
}

type OperationsService

type OperationsService interface {
	List(ctx context.Context, opts OperationsListOptions) (*OperationsListResult, error)
	Get(ctx context.Context, id int64) (*OperationDetail, error)
	Watch(ctx context.Context, id int64) (*OperationDetail, error)
	RequireAuthenticated() error
}

func NewOperationsService

func NewOperationsService(cfgMgr config.Manager, output Output, authService AuthService, opts ...OperationsServiceOption) OperationsService

type OperationsServiceDefault

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

func (*OperationsServiceDefault) Get

func (*OperationsServiceDefault) List

func (*OperationsServiceDefault) RequireAuthenticated

func (s *OperationsServiceDefault) RequireAuthenticated() error

func (*OperationsServiceDefault) Watch

type OperationsServiceFactory

type OperationsServiceFactory func(cfgMgr config.Manager, output Output, authService AuthService) OperationsService

type OperationsServiceOption

type OperationsServiceOption func(*OperationsServiceDefault)

func WithOperationsAccountClient

func WithOperationsAccountClient(client portalsdk.AccountAPI) OperationsServiceOption

func WithOperationsAuthService

func WithOperationsAuthService(as AuthService) OperationsServiceOption

type Output

type Output interface {
	// Print prints a message to the output.
	Print(message string)

	// Printf formats and prints a message to the output.
	Printf(format string, args ...any)

	// Printfln formats and prints a message to the output with a newline.
	Printfln(format string, args ...any)

	// PrintJSON prints data as JSON to the output.
	PrintJSON(data any) error

	// PrintVerbose prints a message only if verbose mode is enabled.
	PrintVerbose(message string)

	// PrintVerbosef formats and prints a message only if verbose mode is enabled.
	PrintVerbosef(format string, args ...any)

	// PrintError prints an error message to stderr.
	PrintError(err error)

	// SetWriter sets the output writer.
	SetWriter(w io.Writer)

	// IsJSON returns true if JSON output is enabled.
	IsJSON() bool

	// IsVerbose returns true if verbose mode is enabled.
	IsVerbose() bool

	// IsQuiet returns true if quiet mode is enabled.
	IsQuiet() bool

	// IsUnmask returns true if unmask mode is enabled.
	IsUnmask() bool

	// PrintTable prints data as a formatted table.
	PrintTable(headers []string, rows [][]string)

	// PrintList prints items as a bulleted list.
	PrintList(items []string)

	// MaskSensitive masks sensitive data like tokens, passwords, etc.
	MaskSensitive(value, key string) string

	// PrintFields renders a titled group of labeled fields.
	PrintFields(group FieldGroup)

	// PrintListGroup renders a titled group with fields and an optional item list.
	PrintListGroup(group ListGroup)

	// PrintBatchResult renders a batch operation summary with structured output.
	PrintBatchResult(result *BatchResult)

	// Watch continuously monitors and displays updates for the provided data fetcher.
	// Returns when all items reach terminal status or context is cancelled.
	Watch(ctx context.Context, fetcher func(context.Context) (any, error), formatter func(any) (string, []string, [][]string)) error
}

Output defines the interface for CLI output formatting.

func NewOutputFormatter

func NewOutputFormatter(json, verbose, quiet, unmask bool) Output

NewOutputFormatter creates a new output formatter based on configuration.

type PTermConfirmPrompter added in v0.2.0

type PTermConfirmPrompter struct{}

PTermConfirmPrompter implements ConfirmPrompter using promptui.Prompt.

func (*PTermConfirmPrompter) Confirm added in v0.2.0

func (p *PTermConfirmPrompter) Confirm(label string, expected string) (string, error)

type PTermContinuePrompter added in v0.2.0

type PTermContinuePrompter struct{}

PTermContinuePrompter implements ContinuePrompter using pterm.DefaultInteractiveContinue.

func (*PTermContinuePrompter) Continue added in v0.2.0

func (p *PTermContinuePrompter) Continue() error

type PTermSelectPrompter added in v0.2.0

type PTermSelectPrompter struct{}

PTermSelectPrompter implements SelectPrompter using promptui.Select.

func (*PTermSelectPrompter) Select added in v0.2.0

func (p *PTermSelectPrompter) Select(label string, items []string) (int, string, error)

type PTermSetupUI

type PTermSetupUI struct {
	*wizard.PTermUI
	*PTermSelectPrompter
	*PTermContinuePrompter
	// contains filtered or unexported fields
}

PTermSetupUI implements SetupUI using PTerm for display. This is the production UI layer - tests use mocks.

func NewPTermSetupUI

func NewPTermSetupUI(output Output) *PTermSetupUI

NewPTermSetupUI creates a new PTerm-based UI.

func (*PTermSetupUI) ExecuteAuthStep

func (ui *PTermSetupUI) ExecuteAuthStep(ctx context.Context, wizard *SetupWizard) error

ExecuteAuthStep handles the authentication step.

func (*PTermSetupUI) ExecuteCompletionStep

func (ui *PTermSetupUI) ExecuteCompletionStep(_ *SetupWizard) error

ExecuteCompletionStep offers to set up shell completion.

func (*PTermSetupUI) ExecuteConfigStep

func (ui *PTermSetupUI) ExecuteConfigStep(ctx context.Context, wizard *SetupWizard) error

ExecuteConfigStep handles the configuration step.

func (*PTermSetupUI) ExecuteTutorialStep

func (ui *PTermSetupUI) ExecuteTutorialStep(_ *SetupWizard) error

ExecuteTutorialStep shows the quick tutorial.

func (*PTermSetupUI) ShowCompletion

func (ui *PTermSetupUI) ShowCompletion() error

ShowCompletion displays the completion message.

func (*PTermSetupUI) ShowWelcome

func (ui *PTermSetupUI) ShowWelcome() error

ShowWelcome displays the welcome screen.

type PTermSpinner added in v0.2.0

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

PTermSpinner implements Spinner using pterm.DefaultSpinner.

func (*PTermSpinner) Fail added in v0.2.0

func (s *PTermSpinner) Fail(message string)

func (*PTermSpinner) Start added in v0.2.0

func (s *PTermSpinner) Start(message string) error

func (*PTermSpinner) Stop added in v0.2.0

func (s *PTermSpinner) Stop() error

func (*PTermSpinner) Success added in v0.2.0

func (s *PTermSpinner) Success(message string)

func (*PTermSpinner) UpdateText added in v0.2.0

func (s *PTermSpinner) UpdateText(message string)

type PTermWebsitesUI

type PTermWebsitesUI struct {
	*wizard.PTermUI
	*PTermSelectPrompter
	*PTermContinuePrompter
	*PTermSpinner
	// contains filtered or unexported fields
}

PTermWebsitesUI implements WebsitesUI using PTerm for display.

func NewPTermWebsitesUI

func NewPTermWebsitesUI(output Output) *PTermWebsitesUI

NewPTermWebsitesUI creates a new PTerm-based websites UI.

func (*PTermWebsitesUI) ExecuteAuthCheckStep

func (ui *PTermWebsitesUI) ExecuteAuthCheckStep(_ context.Context, w *WebsitesWizard) error

ExecuteAuthCheckStep handles the authentication check step.

func (*PTermWebsitesUI) ExecuteContentSourceStep

func (ui *PTermWebsitesUI) ExecuteContentSourceStep(_ context.Context, w *WebsitesWizard) error

ExecuteContentSourceStep handles the content source step.

func (*PTermWebsitesUI) ExecuteCreateWebsiteStep

func (ui *PTermWebsitesUI) ExecuteCreateWebsiteStep(ctx context.Context, w *WebsitesWizard) error

func (*PTermWebsitesUI) ExecuteDNSModeStep

func (ui *PTermWebsitesUI) ExecuteDNSModeStep(_ context.Context, w *WebsitesWizard) error

ExecuteDNSModeStep handles the DNS mode selection step.

func (*PTermWebsitesUI) ExecuteDomainStep

func (ui *PTermWebsitesUI) ExecuteDomainStep(_ context.Context, w *WebsitesWizard) error

ExecuteDomainStep handles the domain name step.

func (*PTermWebsitesUI) ExecuteTargetTypeStep

func (ui *PTermWebsitesUI) ExecuteTargetTypeStep(_ context.Context, w *WebsitesWizard) error

ExecuteTargetTypeStep handles the target type selection step.

func (*PTermWebsitesUI) ExecuteValidateStep

func (ui *PTermWebsitesUI) ExecuteValidateStep(ctx context.Context, w *WebsitesWizard) error

ExecuteValidateStep handles the validation step. For managed DNS, it retries with exponential backoff and a spinner since the server may need time to create DNS records. For self-managed DNS, it prompts the user to add records before validating.

func (*PTermWebsitesUI) SetWizard

func (ui *PTermWebsitesUI) SetWizard(w *WebsitesWizard)

SetWizard sets the wizard reference for state-aware completion messages.

func (*PTermWebsitesUI) ShowCompletion

func (ui *PTermWebsitesUI) ShowCompletion() error

ShowCompletion displays the completion message.

func (*PTermWebsitesUI) ShowWelcome

func (ui *PTermWebsitesUI) ShowWelcome() error

ShowWelcome displays the websites wizard welcome screen.

type Pin

type Pin struct {
	CID       string
	Name      string
	Status    string
	Created   string
	RequestID string
	Metadata  map[string]string
}

Pin represents a pinned item

type PinResult

type PinResult struct {
	CID       string
	RequestID string
	Status    string
}

PinResult represents the result of a pin operation

func NewPinResult

func NewPinResult(cid, requestID, status string) *PinResult

NewPinResult creates a new PinResult with the given details.

type PinStatus

type PinStatus struct {
	CID       string
	Status    string
	Delegates []string
	Created   string
}

PinStatus represents the status of a pin

type PinningService

type PinningService interface {
	// Pin existing content by CID
	Pin(ctx context.Context, cid, name string, wait bool) (*PinResult, error)

	// Pin multiple CIDs in batch
	PinBatch(ctx context.Context, cids []string, name string, opts BatchOptions) (*BatchResult, error)

	// List pinned content with optional filters
	List(ctx context.Context, nameFilter string, limit int, statusFilter string) ([]Pin, error)

	// Get status of a pin
	Status(ctx context.Context, cid string, watch bool) (*PinStatus, error)

	// Remove a pin
	Unpin(ctx context.Context, cid string, confirm bool) (*UnpinResult, error)

	// Unpin multiple CIDs in batch
	UnpinBatch(ctx context.Context, cids []string, opts BatchOptions) (*BatchResult, error)

	// UnpinAll unpins all pins, optionally filtered by status
	UnpinAll(ctx context.Context, statusFilter string, opts BatchOptions) (*BatchResult, error)

	// Update metadata for a pin
	UpdateMetadata(ctx context.Context, cid string, set []string, clear bool) error

	// UpdatePin updates name and/or metadata for a pin.
	// name: new name (empty = no change)
	// meta: metadata key-value pairs to set (alternating key, value)
	// clearMeta: if true, clears all existing metadata before applying meta
	UpdatePin(ctx context.Context, cid string, name string, meta []string, clearMeta bool) error

	// RequireAuthenticated checks if the service is authenticated.
	RequireAuthenticated() error
}

PinningService defines the interface for pinning operations on existing IPFS content.

func NewPinningService

func NewPinningService(cfgMgr config.Manager, output Output, apiEndpoint string, opts ...PinningServiceOption) PinningService

NewPinningService creates a new PinningService with the given dependencies.

type PinningServiceDefault

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

PinningServiceDefault provides pinning operations using the IPFS pinning service API.

func (*PinningServiceDefault) List

func (s *PinningServiceDefault) List(ctx context.Context, nameFilter string, limit int, statusFilter string) ([]Pin, error)

List returns a list of pinned content with optional filters.

func (*PinningServiceDefault) Pin

func (s *PinningServiceDefault) Pin(ctx context.Context, cidStr, name string, wait bool) (*PinResult, error)

Pin pins existing content by CID.

func (*PinningServiceDefault) PinBatch

func (s *PinningServiceDefault) PinBatch(ctx context.Context, cids []string, name string, opts BatchOptions) (*BatchResult, error)

PinBatch pins multiple CIDs in parallel using workerpool.

func (*PinningServiceDefault) RequireAuthenticated

func (s *PinningServiceDefault) RequireAuthenticated() error

RequireAuthenticated checks if the service is authenticated and returns an error if not.

func (*PinningServiceDefault) Status

func (s *PinningServiceDefault) Status(ctx context.Context, cidStr string, watch bool) (*PinStatus, error)

Status returns the status of a pin.

func (*PinningServiceDefault) Unpin

func (s *PinningServiceDefault) Unpin(ctx context.Context, cidStr string, confirm bool) (*UnpinResult, error)

Unpin removes a pin by CID.

func (*PinningServiceDefault) UnpinAll

func (s *PinningServiceDefault) UnpinAll(ctx context.Context, statusFilter string, opts BatchOptions) (*BatchResult, error)

func (*PinningServiceDefault) UnpinBatch

func (s *PinningServiceDefault) UnpinBatch(ctx context.Context, cids []string, opts BatchOptions) (*BatchResult, error)

UnpinBatch unpins multiple CIDs in parallel using workerpool.

func (*PinningServiceDefault) UpdateMetadata

func (s *PinningServiceDefault) UpdateMetadata(ctx context.Context, cidStr string, set []string, clear bool) error

UpdateMetadata updates metadata for a pin.

func (*PinningServiceDefault) UpdatePin added in v0.2.0

func (s *PinningServiceDefault) UpdatePin(ctx context.Context, cidStr string, name string, set []string, clear bool) error

UpdatePin updates name and/or metadata for a pin.

type PinningServiceFactory

type PinningServiceFactory func(cfgMgr config.Manager, output Output, secure bool) PinningService

PinningServiceFactory creates a PinningService with dependencies

type PinningServiceOption

type PinningServiceOption func(*PinningServiceDefault)

PinningServiceOption configures a PinningService.

func WithAuthToken

func WithAuthToken(token string) PinningServiceOption

WithAuthToken sets an auth token override that takes precedence over config.

func WithPinningClient

func WithPinningClient(client internal.PinningClient) PinningServiceOption

WithPinningClient sets a custom pinning client (useful for testing).

func WithPinningClientFactory

func WithPinningClientFactory(factory internal.PinningClientFactory) PinningServiceOption

WithPinningClientFactory sets a custom client factory for creating pinning clients.

type PowerShellCompletionDetector

type PowerShellCompletionDetector struct{}

PowerShellCompletionDetector checks for PowerShell completion configuration.

func (*PowerShellCompletionDetector) ConfigPath

func (d *PowerShellCompletionDetector) ConfigPath() string

func (*PowerShellCompletionDetector) InstallCommand

func (d *PowerShellCompletionDetector) InstallCommand() string

func (*PowerShellCompletionDetector) IsConfigured

func (d *PowerShellCompletionDetector) IsConfigured() (bool, error)

func (*PowerShellCompletionDetector) Name

type ProfilingAdminService added in v0.2.0

type ProfilingAdminService interface {
	RequireAuthenticated() error
	GetProfileIndex(ctx context.Context) ([]byte, error)
	GetBlockProfile(ctx context.Context) ([]byte, error)
	SetBlockProfileRate(ctx context.Context, rate int) error
	GetCmdline(ctx context.Context) ([]byte, error)
	GetGoroutineProfile(ctx context.Context) ([]byte, error)
	GetHeapProfile(ctx context.Context) ([]byte, error)
	GetMutexProfile(ctx context.Context) ([]byte, error)
	SetMutexProfileFraction(ctx context.Context, fraction int) error
	GetCPUProfile(ctx context.Context) ([]byte, error)
	GetStatus(ctx context.Context) (*admin.ProfilingStatus, error)
	GetSymbol(ctx context.Context) ([]byte, error)
	GetThreadcreate(ctx context.Context) ([]byte, error)
	GetTrace(ctx context.Context) ([]byte, error)
}

ProfilingAdminService defines the interface for profiling admin operations.

func NewProfilingAdminService added in v0.2.0

func NewProfilingAdminService(cfgMgr config.Manager, output Output, apiEndpoint string) ProfilingAdminService

NewProfilingAdminService creates a new ProfilingAdminService instance.

type ProfilingAdminServiceFactory added in v0.2.0

type ProfilingAdminServiceFactory func(cfgMgr config.Manager, output Output) ProfilingAdminService

ProfilingAdminServiceFactory creates a ProfilingAdminService with dependencies.

type ProgressWriter

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

ProgressWriter wraps an io.Reader to track read progress and display a pterm progress bar.

func NewProgressWriter

func NewProgressWriter(reader io.Reader, total int64, enabled bool, title string) *ProgressWriter

NewProgressWriter creates a new progress writer. If enabled is false, total is 0, or not in a terminal, no progress bar will be displayed.

func (*ProgressWriter) Read

func (pw *ProgressWriter) Read(p []byte) (int, error)

Read implements io.Reader, tracking bytes read and updating progress.

func (*ProgressWriter) Start

func (pw *ProgressWriter) Start() error

Start begins displaying the progress bar.

func (*ProgressWriter) Stop

func (pw *ProgressWriter) Stop() error

Stop ensures the progress bar is stopped.

type QuotaAdminService

type QuotaAdminService interface {
	RequireAuthenticated() error

	// Plan operations
	ListPlans(ctx context.Context) ([]*admin.QuotaPlan, int, error)
	CreatePlan(ctx context.Context, plan *admin.QuotaPlan) (*admin.QuotaPlan, error)
	GetPlan(ctx context.Context, planID string) (*admin.QuotaPlan, error)
	UpdatePlan(ctx context.Context, planID string, plan *admin.QuotaPlan) (*admin.QuotaPlan, error)
	DeletePlan(ctx context.Context, planID string) error
	SetDefaultPlan(ctx context.Context, planID string) error

	// Allowance operations
	ListAllowances(ctx context.Context) ([]*admin.QuotaAllowance, int, error)
	CreateAllowance(ctx context.Context, userID int, source, allowanceType string, upload, download, storage int, expiryDate time.Time) (*admin.QuotaAllowance, error)
	UpdateAllowance(ctx context.Context, grantID string, userID int, source, allowanceType string, upload, download, storage int, expiryDate time.Time) (*admin.QuotaAllowance, error)
	DeleteAllowance(ctx context.Context, grantID string) error

	// System operations
	GetStats(ctx context.Context) (*admin.SystemStats, error)
	Reconcile(ctx context.Context, userID *int) (string, int, error)
	Cleanup(ctx context.Context, retentionDays int) (int, error)

	// User config operations
	ListUserConfigs(ctx context.Context) ([]*admin.UserQuotaConfig, int, error)
	UpdateUserConfig(ctx context.Context, userID int, config *admin.UserQuotaConfigUpdate) (*admin.UserQuotaConfig, error)
	ResetUserPlan(ctx context.Context, userID int) error
}

QuotaAdminService defines the interface for quota admin operations.

func NewQuotaAdminService

func NewQuotaAdminService(cfgMgr config.Manager, output Output, apiEndpoint string) QuotaAdminService

NewQuotaAdminService creates a new QuotaAdminService instance.

type QuotaAdminServiceFactory

type QuotaAdminServiceFactory func(cfgMgr config.Manager, output Output) QuotaAdminService

QuotaAdminServiceFactory creates a QuotaAdminService with dependencies.

type SelectPrompter added in v0.2.0

type SelectPrompter interface {
	// Select displays a selection prompt and returns the index and value of the selected item.
	Select(label string, items []string) (int, string, error)
}

SelectPrompter prompts the user to select from a list of items.

type SetupOptions

type SetupOptions struct {
	SkipAuth   bool
	SkipConfig bool
	Reset      bool
}

SetupOptions configures the wizard behavior.

type SetupUI

type SetupUI interface {
	wizard.UI
	SelectPrompter
	ContinuePrompter

	// Step execution
	ExecuteAuthStep(ctx context.Context, wizard *SetupWizard) error
	ExecuteConfigStep(ctx context.Context, wizard *SetupWizard) error
	ExecuteCompletionStep(wizard *SetupWizard) error
	ExecuteTutorialStep(wizard *SetupWizard) error
}

SetupUI defines the interface for setup wizard UI interactions. This allows for easy testing by providing mock implementations.

type SetupWizard

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

SetupWizard manages the setup process. This is the business logic layer - fully testable without UI dependencies.

func NewSetupWizard

func NewSetupWizard(
	cfgMgr config.Manager,
	authService AuthService,
	ui SetupUI,
	options SetupOptions,
) *SetupWizard

NewSetupWizard creates a new setup wizard.

func (*SetupWizard) AuthService

func (w *SetupWizard) AuthService() AuthService

AuthService returns the auth service.

func (*SetupWizard) ConfigManager

func (w *SetupWizard) ConfigManager() config.Manager

ConfigManager returns the config manager.

func (*SetupWizard) Options

func (w *SetupWizard) Options() SetupOptions

Options returns the setup options.

func (*SetupWizard) Run

func (w *SetupWizard) Run(ctx context.Context) (wizard.Result, error)

Run executes the setup wizard.

type Spinner added in v0.2.0

type Spinner interface {
	// Start begins the spinner with the given message.
	Start(message string) error
	// UpdateText updates the spinner message.
	UpdateText(message string)
	// Success stops the spinner with a success message.
	Success(message string)
	// Fail stops the spinner with a failure message.
	Fail(message string)
	// Stop stops the spinner without a success or failure message.
	Stop() error
}

Spinner displays a spinner with status messages.

type StageStats

type StageStats struct {
	Min    time.Duration `json:"min"`
	Max    time.Duration `json:"max"`
	Avg    time.Duration `json:"avg"`
	Median time.Duration `json:"median"`
}

StageStats contains per-stage aggregate statistics.

type StatusService

type StatusService interface {
	// Status checks pin status, falling back to account operations if pin not found
	Status(ctx context.Context, cid string, watch bool) (*PinStatus, *OperationStatusResult, error)

	// RequireAuthenticated checks if the service is authenticated.
	RequireAuthenticated() error
}

StatusService defines the interface for checking CID status with pin and operation fallback.

func NewStatusService

func NewStatusService(cfgMgr config.Manager, output Output, pinningService PinningService, authService AuthService, opts ...StatusServiceOption) StatusService

type StatusServiceDefault

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

func (*StatusServiceDefault) RequireAuthenticated

func (s *StatusServiceDefault) RequireAuthenticated() error

func (*StatusServiceDefault) Status

type StatusServiceFactory

type StatusServiceFactory func(cfgMgr config.Manager, output Output, pinningService PinningService, authService AuthService) StatusService

type StatusServiceOption

type StatusServiceOption func(*StatusServiceDefault)

func WithStatusAccountClient

func WithStatusAccountClient(client portalsdk.AccountAPI) StatusServiceOption

func WithStatusAuthService

func WithStatusAuthService(as AuthService) StatusServiceOption

func WithStatusPinningService

func WithStatusPinningService(ps PinningService) StatusServiceOption

type StdinSource

type StdinSource struct{}

StdinSource is a ValueSource that reads from stdin. It implements the urfave/cli ValueSource interface.

func NewStdinSource

func NewStdinSource() *StdinSource

NewStdinSource creates a new StdinSource.

func Stdin

func Stdin() *StdinSource

Stdin is a convenience function to create a StdinSource.

func (*StdinSource) GoString

func (s *StdinSource) GoString() string

GoString returns a Go string representation of the source.

func (*StdinSource) Lookup

func (s *StdinSource) Lookup() (string, bool)

Lookup reads from stdin and returns the value. Returns empty string and false if stdin is empty or not a pipe.

func (*StdinSource) String

func (s *StdinSource) String() string

String returns a string representation of the source.

type TargetTypeChoice

type TargetTypeChoice int

TargetTypeChoice represents user's choice for the target type step.

const (
	TargetTypeIPFS TargetTypeChoice = iota // IPFS content addressing (default)
	TargetTypeIPNS                         // IPNS mutable name
)

type TutorialCommand

type TutorialCommand struct {
	*cli.Command
	Metadata *TutorialMetadata
}

TutorialCommand wraps a cli.Command with tutorial metadata.

func TutorialCommands

func TutorialCommands(rootCmd *cli.Command) []TutorialCommand

TutorialCommands returns the list of commands to display in the tutorial, extracted dynamically from the root command's subcommands.

type TutorialMetadata

type TutorialMetadata struct {
	Priority    int    // Order in tutorial (1=first, higher values come later)
	Description string // Brief description for tutorial (uses Description if empty)
	Example     string // Specific usage example (uses Usage if empty)
}

TutorialMetadata contains information for displaying a command in the tutorial.

type UnpinResult

type UnpinResult struct {
	CID string
}

UnpinResult represents the result of an unpin operation

func NewUnpinResult

func NewUnpinResult(cid string) *UnpinResult

NewUnpinResult creates a new UnpinResult with the given CID.

type UploadInput

type UploadInput struct {
	Filesystem fs.FS
	Name       string
	// contains filtered or unexported fields
}

UploadInput represents the resolved input source for an upload operation.

func (*UploadInput) Close

func (i *UploadInput) Close() error

Close releases resources held by the UploadInput, such as open file handles.

type UploadResult

type UploadResult struct {
	CID      string
	Size     int64
	Duration time.Duration
}

UploadResult contains information about an upload operation.

type UploadService

type UploadService interface {
	// Upload file/directory to IPFS.
	// Returns the upload result with CID, size, and duration.
	Upload(ctx context.Context, filesystem fs.FS, name string, wait bool) (*UploadResult, error)
}

UploadService defines the interface for uploading content to IPFS.

func NewUploadService

func NewUploadService(cfgMgr config.Manager, output Output, opts ...UploadServiceOption) UploadService

NewUploadService creates a new UploadService with the given dependencies.

type UploadServiceConfig

type UploadServiceConfig struct {
	HTTPClient      *http.Client
	AccountClient   portalsdk.AccountAPI
	IPFSEndpoint    string
	AccountEndpoint string
}

UploadServiceConfig holds configuration options for UploadService.

type UploadServiceDefault

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

UploadServiceDefault provides upload operations using the ipfs-sdk UploadService.

func (*UploadServiceDefault) RequireAuthenticated

func (s *UploadServiceDefault) RequireAuthenticated() error

RequireAuthenticated checks if the service is authenticated and returns an error if not.

func (*UploadServiceDefault) Upload

func (s *UploadServiceDefault) Upload(ctx context.Context, filesystem fs.FS, name string, wait bool) (*UploadResult, error)

Upload uploads a file or directory to IPFS and optionally pins it.

func (*UploadServiceDefault) WithAuthToken

func (s *UploadServiceDefault) WithAuthToken(token string) *UploadServiceDefault

WithAuthToken sets an auth token override that takes precedence over config.

type UploadServiceFactory

type UploadServiceFactory func(cfgMgr config.Manager, output Output, opts ...UploadServiceOption) UploadService

UploadServiceFactory creates an UploadService with dependencies

type UploadServiceOption

type UploadServiceOption func(*UploadServiceDefault)

UploadServiceOption is a function that configures an UploadService.

func WithAccountEndpoint

func WithAccountEndpoint(endpoint string) UploadServiceOption

WithAccountEndpoint sets a custom account API endpoint for auth/operations calls.

func WithChunkSize

func WithChunkSize(size int64) UploadServiceOption

WithChunkSize sets the chunk size in bytes for UnixFS file splitting.

func WithChunkerStrategy

func WithChunkerStrategy(strategy ipfs.ChunkerStrategy) UploadServiceOption

WithChunkerStrategy sets the DAG layout strategy for UnixFS node generation.

func WithIPFSEndpoint

func WithIPFSEndpoint(endpoint string) UploadServiceOption

WithIPFSEndpoint sets a custom IPFS endpoint for upload calls.

func WithMaxLinks(max int) UploadServiceOption

WithMaxLinks sets the maximum number of links per DAG node.

func WithMemoryLimit

func WithMemoryLimit(limit uint64) UploadServiceOption

WithMemoryLimit sets a memory limit override that takes precedence over config.

func WithUploadAccountClient

func WithUploadAccountClient(client portalsdk.AccountAPI) UploadServiceOption

WithUploadAccountClient sets a custom account client for the upload service. This is primarily used for testing to inject mock clients.

func WithUploadAuthService

func WithUploadAuthService(authSvc AuthService) UploadServiceOption

WithUploadAuthService sets the auth service for token exchange (needed for TUS uploads).

func WithUploadHTTPClient

func WithUploadHTTPClient(client *http.Client) UploadServiceOption

WithUploadHTTPClient sets a custom HTTP client for the service. This is primarily used for testing to inject mock HTTP clients.

func WithUploadPinningService

func WithUploadPinningService(ps PinningService) UploadServiceOption

WithUploadPinningService sets the pinning service for verifying pin status after upload.

type WebsiteAdminService

type WebsiteAdminService interface {
	RequireAuthenticated() error
	BlockWebsite(ctx context.Context, id string) (*admin.Website, error)
	UnblockWebsite(ctx context.Context, id string) (*admin.Website, error)
}

WebsiteAdminService defines the interface for website admin operations.

func NewWebsiteAdminService

func NewWebsiteAdminService(cfgMgr config.Manager, output Output, apiEndpoint string) WebsiteAdminService

NewWebsiteAdminService creates a new WebsiteAdminService instance.

type WebsiteAdminServiceFactory

type WebsiteAdminServiceFactory func(cfgMgr config.Manager, output Output) WebsiteAdminService

WebsiteAdminServiceFactory creates a WebsiteAdminService with dependencies.

type WebsitesService

type WebsitesService interface {
	RequireAuthenticated() error
	List(ctx context.Context) ([]ipfs.WebsiteItem, error)
	Create(ctx context.Context, domain, targetHash, targetType string) (*ipfs.WebsiteItem, error)
	CreateWithOptions(ctx context.Context, req ipfs.WebsiteRequest) (*ipfs.WebsiteItem, error)
	Get(ctx context.Context, id string) (*ipfs.WebsiteItem, error)
	Update(ctx context.Context, id, domain, targetHash, targetType string) (*ipfs.WebsiteItem, error)
	UpdateWithOptions(ctx context.Context, id string, req ipfs.WebsiteUpdateRequest) (*ipfs.WebsiteItem, error)
	Delete(ctx context.Context, id string) error
	Validate(ctx context.Context, id string) (*ipfs.WebsiteValidateResponse, error)
	GetSSLStatus(ctx context.Context, domain string) (*ipfs.WebsiteResponse, error)
	GetConfig(ctx context.Context) (*ipfs.WebsiteConfigResponse, error)
}

WebsitesService defines the interface for website operations.

func NewWebsitesService

func NewWebsitesService(cfgMgr config.Manager, output Output, apiEndpoint string, opts ...WebsitesServiceOption) WebsitesService

NewWebsitesService creates a new WebsitesService instance.

type WebsitesServiceFactory

type WebsitesServiceFactory func(cfgMgr config.Manager, output Output, secure bool, opts ...WebsitesServiceOption) WebsitesService

WebsitesServiceFactory creates a WebsitesService with dependencies.

type WebsitesServiceOption added in v0.2.0

type WebsitesServiceOption func(*websitesService)

WebsitesServiceOption is a function that configures a websitesService.

func WithWebsitesAuthToken added in v0.2.0

func WithWebsitesAuthToken(token string) WebsitesServiceOption

WithWebsitesAuthToken sets an auth token override that takes precedence over config.

func WithWebsitesClient added in v0.2.0

func WithWebsitesClient(client *ipfs.Client) WebsitesServiceOption

WithWebsitesClient sets a pre-configured ipfs.Client, bypassing the default ipfs.NewClient() call.

type WebsitesUI

type WebsitesUI interface {
	wizard.UI
	SelectPrompter
	ContinuePrompter
	Spinner

	// Step execution
	ExecuteAuthCheckStep(ctx context.Context, w *WebsitesWizard) error
	ExecuteContentSourceStep(ctx context.Context, w *WebsitesWizard) error
	ExecuteTargetTypeStep(ctx context.Context, w *WebsitesWizard) error
	ExecuteDomainStep(ctx context.Context, w *WebsitesWizard) error
	ExecuteDNSModeStep(ctx context.Context, w *WebsitesWizard) error
	ExecuteCreateWebsiteStep(ctx context.Context, w *WebsitesWizard) error
	ExecuteValidateStep(ctx context.Context, w *WebsitesWizard) error
}

WebsitesUI defines the interface for websites wizard UI interactions.

type WebsitesWizard

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

WebsitesWizard manages the website creation wizard.

func NewWebsitesWizard

func NewWebsitesWizard(
	websitesService WebsitesService,
	cfgMgr config.Manager,
	ui WebsitesUI,
	output Output,
) *WebsitesWizard

NewWebsitesWizard creates a new websites wizard.

func (*WebsitesWizard) CID

func (w *WebsitesWizard) CID() string

CID returns the content identifier.

func (*WebsitesWizard) ConfigManager

func (w *WebsitesWizard) ConfigManager() config.Manager

ConfigManager returns the config manager.

func (*WebsitesWizard) DNSHosting

func (w *WebsitesWizard) DNSHosting() bool

DNSHosting returns whether DNS hosting is enabled.

func (*WebsitesWizard) Domain

func (w *WebsitesWizard) Domain() string

Domain returns the domain name.

func (*WebsitesWizard) Output

func (w *WebsitesWizard) Output() Output

Output returns the output formatter.

func (*WebsitesWizard) Run

Run executes the websites wizard.

func (*WebsitesWizard) SetCID

func (w *WebsitesWizard) SetCID(cid string)

SetCID sets the content identifier.

func (*WebsitesWizard) SetDNSHosting

func (w *WebsitesWizard) SetDNSHosting(enabled bool)

SetDNSHosting sets whether DNS hosting is enabled.

func (*WebsitesWizard) SetDomain

func (w *WebsitesWizard) SetDomain(domain string)

SetDomain sets the domain name.

func (*WebsitesWizard) SetTargetType

func (w *WebsitesWizard) SetTargetType(targetType string)

SetTargetType sets the target type (ipfs or ipns).

func (*WebsitesWizard) SetValidateRetry

func (w *WebsitesWizard) SetValidateRetry(retry bool)

SetValidateRetry sets whether the validation step should be retried.

func (*WebsitesWizard) SetValidationResult

func (w *WebsitesWizard) SetValidationResult(result *ipfs.WebsiteValidateResponse)

SetValidationResult sets the validation result.

func (*WebsitesWizard) SetWebsite

func (w *WebsitesWizard) SetWebsite(website *ipfs.WebsiteItem)

SetWebsite sets the created website.

func (*WebsitesWizard) TargetType

func (w *WebsitesWizard) TargetType() string

TargetType returns the target type (ipfs or ipns).

func (*WebsitesWizard) ValidateRetry

func (w *WebsitesWizard) ValidateRetry() bool

ValidateRetry returns whether the validation step should be retried.

func (*WebsitesWizard) ValidationResult

func (w *WebsitesWizard) ValidationResult() *ipfs.WebsiteValidateResponse

ValidationResult returns the validation result.

func (*WebsitesWizard) Website

func (w *WebsitesWizard) Website() *ipfs.WebsiteItem

Website returns the created website.

func (*WebsitesWizard) WebsitesService

func (w *WebsitesWizard) WebsitesService() WebsitesService

WebsitesService returns the websites service.

type ZshCompletionDetector

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

ZshCompletionDetector checks for zsh completion configuration.

func (*ZshCompletionDetector) ConfigPath

func (d *ZshCompletionDetector) ConfigPath() string

func (*ZshCompletionDetector) InstallCommand

func (d *ZshCompletionDetector) InstallCommand() string

func (*ZshCompletionDetector) IsConfigured

func (d *ZshCompletionDetector) IsConfigured() (bool, error)

func (*ZshCompletionDetector) Name

func (d *ZshCompletionDetector) Name() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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