Documentation
¶
Index ¶
- Constants
- Variables
- func ApplySecureConfig(cmd *cli.Command, cfgMgr config.Manager) bool
- func BuildTutorialCommandsTable(rootCmd *cli.Command) ([]string, [][]string)
- func BuildTutorialExamplesTable(rootCmd *cli.Command) ([]string, [][]string)
- func ConfirmFlag() *cli.BoolFlag
- func ContentFlag() *cli.StringFlag
- func ContinueFlag() *cli.BoolFlag
- func DNSHostingFlag() *cli.BoolFlag
- func DisabledFlag() *cli.BoolFlag
- func DomainFlag() *cli.StringFlag
- func DryRunFlag() *cli.BoolFlag
- func DryRunOption(key, value string) map[string]string
- func FileFlag() *cli.StringFlag
- func ForceFlag() *cli.BoolFlag
- func FormatCurrency(amount float64, code CurrencyCode) string
- func FormatError(err error, verbose bool) string
- func FormatUSD(amount float32) string
- func GetAuthToken(cmd *cli.Command, cfgMgr config.Manager) string
- func GetJWTPurpose(token string) (string, error)
- func GetSecureSetting(cmd *cli.Command, cfgMgr config.Manager) bool
- func GlobalFlags() []cli.Flag
- func LimitFlag() *cli.IntFlag
- func MemoryLimitFlag() *cli.Uint64Flag
- func NameFlag(usage string) *cli.StringFlag
- func NameserversFlag() *cli.StringFlag
- func NewRootCommand() *cli.Command
- func NoDNSHostingFlag() *cli.BoolFlag
- func ParallelFlag() *cli.IntFlag
- func RenderDryRun(output Output, preview DryRunPreview)
- func Run(ctx context.Context, args []string) error
- func SecureFlag() *cli.BoolFlag
- func StatusFlag() *cli.StringFlag
- func TTLFlag() *cli.UintFlag
- func TargetHashFlag() *cli.StringFlag
- func TargetTypeFlag() *cli.StringFlag
- func TypeFlag() *cli.StringFlag
- func WaitFlag() *cli.BoolFlag
- func WatchFlag() *cli.BoolFlag
- func WithTutorial(priority int, description, example string) map[string]interface{}
- func WrapAuthError(operation string, err error) error
- func WrapFileError(operation, path string, err error) error
- func WrapNetworkError(operation string, err error) error
- func ZoneIDFlag() *cli.StringFlag
- type AdminTokenProvider
- type AuthInfo
- type AuthPrompter
- type AuthService
- type AuthServiceDefault
- func (s *AuthServiceDefault) CompleteLogin(ctx context.Context, token, keyName string, noCreateKey bool) error
- func (s *AuthServiceDefault) DisableOTP(ctx context.Context, password string) error
- func (s *AuthServiceDefault) EnableOTP(ctx context.Context, otpCode string) error
- func (s *AuthServiceDefault) GetAPIEndpoint() string
- func (s *AuthServiceDefault) GetAuthenticatedClient(ctx context.Context) (portalsdk.AccountAPI, error)
- func (s *AuthServiceDefault) LoginCheck(ctx context.Context, email, password string) (*portalsdk.LoginResult, error)
- func (s *AuthServiceDefault) LoginWithOTP(ctx context.Context, intermediateJWT, otp, keyName string, noCreateKey bool) error
- func (s *AuthServiceDefault) Register(ctx context.Context, email, firstName, lastName, password string) error
- func (s *AuthServiceDefault) SaveToken(token string) error
- func (s *AuthServiceDefault) Status(ctx context.Context) error
- type AuthServiceFactory
- type AuthServiceOption
- type AuthStep
- type AuthStepChoice
- type BashCompletionDetector
- type BatchOptions
- type BatchProgressTracker
- type BatchResult
- type BillingAdminService
- type BillingAdminServiceFactory
- type ClientFactory
- type CompletionDetector
- type CompletionDetectorFactory
- type CompletionInfo
- type CompletionStep
- type ConfigInfo
- type ConfigManagerFactory
- type ConfigStep
- type ConfigStepChoice
- type Currency
- type CurrencyCode
- type CustomConfig
- type DNSService
- type DoctorReport
- type DryRunPreview
- type Field
- type FieldGroup
- type FishCompletionDetector
- type IPNSService
- type IPNSServiceFactory
- type LimitsInfo
- type ListGroup
- type MockAuthPrompter
- func (_m *MockAuthPrompter) EXPECT() *MockAuthPrompter_Expecter
- func (_mock *MockAuthPrompter) Password(label string) (string, error)
- func (_mock *MockAuthPrompter) PromptEmail() (string, error)
- func (_mock *MockAuthPrompter) PromptOTP() (string, error)
- func (_mock *MockAuthPrompter) PromptPassword() (string, error)
- func (_mock *MockAuthPrompter) PromptString(label string) (string, error)
- type MockAuthPrompter_Expecter
- func (_e *MockAuthPrompter_Expecter) Password(label interface{}) *MockAuthPrompter_Password_Call
- func (_e *MockAuthPrompter_Expecter) PromptEmail() *MockAuthPrompter_PromptEmail_Call
- func (_e *MockAuthPrompter_Expecter) PromptOTP() *MockAuthPrompter_PromptOTP_Call
- func (_e *MockAuthPrompter_Expecter) PromptPassword() *MockAuthPrompter_PromptPassword_Call
- func (_e *MockAuthPrompter_Expecter) PromptString(label interface{}) *MockAuthPrompter_PromptString_Call
- type MockAuthPrompter_Password_Call
- func (_c *MockAuthPrompter_Password_Call) Return(s string, err error) *MockAuthPrompter_Password_Call
- func (_c *MockAuthPrompter_Password_Call) Run(run func(label string)) *MockAuthPrompter_Password_Call
- func (_c *MockAuthPrompter_Password_Call) RunAndReturn(run func(label string) (string, error)) *MockAuthPrompter_Password_Call
- type MockAuthPrompter_PromptEmail_Call
- func (_c *MockAuthPrompter_PromptEmail_Call) Return(s string, err error) *MockAuthPrompter_PromptEmail_Call
- func (_c *MockAuthPrompter_PromptEmail_Call) Run(run func()) *MockAuthPrompter_PromptEmail_Call
- func (_c *MockAuthPrompter_PromptEmail_Call) RunAndReturn(run func() (string, error)) *MockAuthPrompter_PromptEmail_Call
- type MockAuthPrompter_PromptOTP_Call
- func (_c *MockAuthPrompter_PromptOTP_Call) Return(s string, err error) *MockAuthPrompter_PromptOTP_Call
- func (_c *MockAuthPrompter_PromptOTP_Call) Run(run func()) *MockAuthPrompter_PromptOTP_Call
- func (_c *MockAuthPrompter_PromptOTP_Call) RunAndReturn(run func() (string, error)) *MockAuthPrompter_PromptOTP_Call
- type MockAuthPrompter_PromptPassword_Call
- func (_c *MockAuthPrompter_PromptPassword_Call) Return(s string, err error) *MockAuthPrompter_PromptPassword_Call
- func (_c *MockAuthPrompter_PromptPassword_Call) Run(run func()) *MockAuthPrompter_PromptPassword_Call
- func (_c *MockAuthPrompter_PromptPassword_Call) RunAndReturn(run func() (string, error)) *MockAuthPrompter_PromptPassword_Call
- type MockAuthPrompter_PromptString_Call
- func (_c *MockAuthPrompter_PromptString_Call) Return(s string, err error) *MockAuthPrompter_PromptString_Call
- func (_c *MockAuthPrompter_PromptString_Call) Run(run func(label string)) *MockAuthPrompter_PromptString_Call
- func (_c *MockAuthPrompter_PromptString_Call) RunAndReturn(run func(label string) (string, error)) *MockAuthPrompter_PromptString_Call
- type MockAuthService
- func (_mock *MockAuthService) CompleteLogin(ctx context.Context, token string, keyName string, noCreateKey bool) error
- func (_mock *MockAuthService) DisableOTP(ctx context.Context, password string) error
- func (_m *MockAuthService) EXPECT() *MockAuthService_Expecter
- func (_mock *MockAuthService) EnableOTP(ctx context.Context, otpCode string) error
- func (_mock *MockAuthService) GetAPIEndpoint() string
- func (_mock *MockAuthService) GetAuthenticatedClient(ctx context.Context) (account.AccountAPI, error)
- func (_mock *MockAuthService) LoginCheck(ctx context.Context, email string, password string) (*account.LoginResult, error)
- func (_mock *MockAuthService) LoginWithOTP(ctx context.Context, intermediateJWT string, otp string, keyName string, ...) error
- func (_mock *MockAuthService) Register(ctx context.Context, email string, firstName string, lastName string, ...) error
- func (_mock *MockAuthService) SaveToken(token string) error
- func (_mock *MockAuthService) Status(ctx context.Context) error
- type MockAuthService_CompleteLogin_Call
- func (_c *MockAuthService_CompleteLogin_Call) Return(err error) *MockAuthService_CompleteLogin_Call
- func (_c *MockAuthService_CompleteLogin_Call) Run(run func(ctx context.Context, token string, keyName string, noCreateKey bool)) *MockAuthService_CompleteLogin_Call
- func (_c *MockAuthService_CompleteLogin_Call) RunAndReturn(...) *MockAuthService_CompleteLogin_Call
- type MockAuthService_DisableOTP_Call
- func (_c *MockAuthService_DisableOTP_Call) Return(err error) *MockAuthService_DisableOTP_Call
- func (_c *MockAuthService_DisableOTP_Call) Run(run func(ctx context.Context, password string)) *MockAuthService_DisableOTP_Call
- func (_c *MockAuthService_DisableOTP_Call) RunAndReturn(run func(ctx context.Context, password string) error) *MockAuthService_DisableOTP_Call
- type MockAuthService_EnableOTP_Call
- func (_c *MockAuthService_EnableOTP_Call) Return(err error) *MockAuthService_EnableOTP_Call
- func (_c *MockAuthService_EnableOTP_Call) Run(run func(ctx context.Context, otpCode string)) *MockAuthService_EnableOTP_Call
- func (_c *MockAuthService_EnableOTP_Call) RunAndReturn(run func(ctx context.Context, otpCode string) error) *MockAuthService_EnableOTP_Call
- type MockAuthService_Expecter
- func (_e *MockAuthService_Expecter) CompleteLogin(ctx interface{}, token interface{}, keyName interface{}, ...) *MockAuthService_CompleteLogin_Call
- func (_e *MockAuthService_Expecter) DisableOTP(ctx interface{}, password interface{}) *MockAuthService_DisableOTP_Call
- func (_e *MockAuthService_Expecter) EnableOTP(ctx interface{}, otpCode interface{}) *MockAuthService_EnableOTP_Call
- func (_e *MockAuthService_Expecter) GetAPIEndpoint() *MockAuthService_GetAPIEndpoint_Call
- func (_e *MockAuthService_Expecter) GetAuthenticatedClient(ctx interface{}) *MockAuthService_GetAuthenticatedClient_Call
- func (_e *MockAuthService_Expecter) LoginCheck(ctx interface{}, email interface{}, password interface{}) *MockAuthService_LoginCheck_Call
- func (_e *MockAuthService_Expecter) LoginWithOTP(ctx interface{}, intermediateJWT interface{}, otp interface{}, ...) *MockAuthService_LoginWithOTP_Call
- func (_e *MockAuthService_Expecter) Register(ctx interface{}, email interface{}, firstName interface{}, ...) *MockAuthService_Register_Call
- func (_e *MockAuthService_Expecter) SaveToken(token interface{}) *MockAuthService_SaveToken_Call
- func (_e *MockAuthService_Expecter) Status(ctx interface{}) *MockAuthService_Status_Call
- type MockAuthService_GetAPIEndpoint_Call
- func (_c *MockAuthService_GetAPIEndpoint_Call) Return(s string) *MockAuthService_GetAPIEndpoint_Call
- func (_c *MockAuthService_GetAPIEndpoint_Call) Run(run func()) *MockAuthService_GetAPIEndpoint_Call
- func (_c *MockAuthService_GetAPIEndpoint_Call) RunAndReturn(run func() string) *MockAuthService_GetAPIEndpoint_Call
- type MockAuthService_GetAuthenticatedClient_Call
- func (_c *MockAuthService_GetAuthenticatedClient_Call) Return(accountAPI account.AccountAPI, err error) *MockAuthService_GetAuthenticatedClient_Call
- func (_c *MockAuthService_GetAuthenticatedClient_Call) Run(run func(ctx context.Context)) *MockAuthService_GetAuthenticatedClient_Call
- func (_c *MockAuthService_GetAuthenticatedClient_Call) RunAndReturn(run func(ctx context.Context) (account.AccountAPI, error)) *MockAuthService_GetAuthenticatedClient_Call
- type MockAuthService_LoginCheck_Call
- func (_c *MockAuthService_LoginCheck_Call) Return(loginResult *account.LoginResult, err error) *MockAuthService_LoginCheck_Call
- func (_c *MockAuthService_LoginCheck_Call) Run(run func(ctx context.Context, email string, password string)) *MockAuthService_LoginCheck_Call
- func (_c *MockAuthService_LoginCheck_Call) RunAndReturn(...) *MockAuthService_LoginCheck_Call
- type MockAuthService_LoginWithOTP_Call
- type MockAuthService_Register_Call
- type MockAuthService_SaveToken_Call
- func (_c *MockAuthService_SaveToken_Call) Return(err error) *MockAuthService_SaveToken_Call
- func (_c *MockAuthService_SaveToken_Call) Run(run func(token string)) *MockAuthService_SaveToken_Call
- func (_c *MockAuthService_SaveToken_Call) RunAndReturn(run func(token string) error) *MockAuthService_SaveToken_Call
- type MockAuthService_Status_Call
- func (_c *MockAuthService_Status_Call) Return(err error) *MockAuthService_Status_Call
- func (_c *MockAuthService_Status_Call) Run(run func(ctx context.Context)) *MockAuthService_Status_Call
- func (_c *MockAuthService_Status_Call) RunAndReturn(run func(ctx context.Context) error) *MockAuthService_Status_Call
- type MockBillingAdminService
- func (_mock *MockBillingAdminService) AbortUserSubscriptionCancellation(ctx context.Context, userID string) (*admin.ManagementResult, error)
- func (_mock *MockBillingAdminService) AddPlanToPriceLine(ctx context.Context, priceLineID string, req *admin.AddPlanToPriceLineRequest) (*admin.PriceLineDetailResponse, error)
- func (_mock *MockBillingAdminService) CancelUserSubscription(ctx context.Context, userID string, req *admin.CancelSubscriptionRequest) (*admin.ManagementResult, error)
- func (_mock *MockBillingAdminService) ChangeUserPlan(ctx context.Context, userID string, req *admin.ChangePlanRequest) (*admin.PlanChangeResult, error)
- func (_mock *MockBillingAdminService) CreateCredit(ctx context.Context, req *admin.CreditCreateRequest) (*admin.Credit, error)
- func (_mock *MockBillingAdminService) CreatePriceLine(ctx context.Context, req *admin.PriceLineCreateRequest) (*admin.PriceLine, error)
- func (_mock *MockBillingAdminService) CreatePricingPlan(ctx context.Context, req *admin.PricingPlanCreateRequest) (*admin.PricingPlan, error)
- func (_mock *MockBillingAdminService) CreatePricingPlanPeriod(ctx context.Context, req *admin.PricingPlanPeriodCreateRequest) (*admin.PricingPlanPeriod, error)
- func (_mock *MockBillingAdminService) DeleteCredit(ctx context.Context, creditID string) error
- func (_mock *MockBillingAdminService) DeletePlanFromPriceLine(ctx context.Context, priceLineID string, planID string) error
- func (_mock *MockBillingAdminService) DeletePriceLine(ctx context.Context, priceLineID string) error
- func (_mock *MockBillingAdminService) DeletePricingPlan(ctx context.Context, planID string) error
- func (_mock *MockBillingAdminService) DeletePricingPlanPeriod(ctx context.Context, periodID string) error
- func (_m *MockBillingAdminService) EXPECT() *MockBillingAdminService_Expecter
- func (_mock *MockBillingAdminService) GetCredit(ctx context.Context, creditID string) (*admin.Credit, error)
- func (_mock *MockBillingAdminService) GetPriceLine(ctx context.Context, priceLineID string) (*admin.PriceLineDetailResponse, error)
- func (_mock *MockBillingAdminService) GetPricingPlan(ctx context.Context, planID string) (*admin.PricingPlan, error)
- func (_mock *MockBillingAdminService) GetPricingPlanPeriod(ctx context.Context, periodID string) (*admin.PricingPlanPeriod, error)
- func (_mock *MockBillingAdminService) GetSubscriber(ctx context.Context, subscriberID string) (*admin.Subscriber, error)
- func (_mock *MockBillingAdminService) GetUserBalance(ctx context.Context, userID string) (*admin.UserBalance, error)
- func (_mock *MockBillingAdminService) GetUserDeletedCredits(ctx context.Context, userID string, ...) ([]*admin.CreditItem, int, error)
- func (_mock *MockBillingAdminService) GetUserSubscribers(ctx context.Context, userID string) ([]*admin.Subscriber, int, error)
- func (_mock *MockBillingAdminService) ListCredits(ctx context.Context, params *admin.GetApiBillingCreditsParams) ([]*admin.CreditItem, int, error)
- func (_mock *MockBillingAdminService) ListGatewaySubscribers(ctx context.Context, gatewayID string) ([]*admin.Subscriber, int, error)
- func (_mock *MockBillingAdminService) ListPriceLines(ctx context.Context) ([]*admin.PriceLine, int, error)
- func (_mock *MockBillingAdminService) ListPricingPlanPeriods(ctx context.Context) ([]*admin.PricingPlanPeriod, int, error)
- func (_mock *MockBillingAdminService) ListPricingPlans(ctx context.Context) ([]*admin.PricingPlanItem, int, error)
- func (_mock *MockBillingAdminService) ListSubscribers(ctx context.Context) ([]*admin.Subscriber, int, error)
- func (_mock *MockBillingAdminService) PauseUserSubscription(ctx context.Context, userID string) (*admin.ManagementResult, error)
- func (_mock *MockBillingAdminService) PurgeCredits(ctx context.Context, req *admin.CreditPurgeRequest) (int, error)
- func (_mock *MockBillingAdminService) RequireAuthenticated() error
- func (_mock *MockBillingAdminService) RestoreCredit(ctx context.Context, creditID string) (*admin.Credit, error)
- func (_mock *MockBillingAdminService) ResumeUserSubscription(ctx context.Context, userID string) (*admin.ManagementResult, error)
- func (_mock *MockBillingAdminService) SyncAllPricingPlans(ctx context.Context) error
- func (_mock *MockBillingAdminService) SyncPricingPlan(ctx context.Context, planID string) error
- func (_mock *MockBillingAdminService) UpdatePlanPosition(ctx context.Context, priceLineID string, planID string, ...) (*admin.PriceLineDetailResponse, error)
- func (_mock *MockBillingAdminService) UpdatePriceLine(ctx context.Context, priceLineID string, req *admin.PriceLineUpdateRequest) (*admin.PriceLine, error)
- func (_mock *MockBillingAdminService) UpdatePricingPlan(ctx context.Context, planID string, req *admin.PricingPlanUpdateRequest) (*admin.PricingPlan, error)
- func (_mock *MockBillingAdminService) UpdatePricingPlanPeriod(ctx context.Context, periodID string, ...) (*admin.PricingPlanPeriod, error)
- type MockBillingAdminService_AbortUserSubscriptionCancellation_Call
- func (_c *MockBillingAdminService_AbortUserSubscriptionCancellation_Call) Return(managementResult *admin.ManagementResult, err error) *MockBillingAdminService_AbortUserSubscriptionCancellation_Call
- func (_c *MockBillingAdminService_AbortUserSubscriptionCancellation_Call) Run(run func(ctx context.Context, userID string)) *MockBillingAdminService_AbortUserSubscriptionCancellation_Call
- func (_c *MockBillingAdminService_AbortUserSubscriptionCancellation_Call) RunAndReturn(run func(ctx context.Context, userID string) (*admin.ManagementResult, error)) *MockBillingAdminService_AbortUserSubscriptionCancellation_Call
- type MockBillingAdminService_AddPlanToPriceLine_Call
- func (_c *MockBillingAdminService_AddPlanToPriceLine_Call) Return(priceLineDetailResponse *admin.PriceLineDetailResponse, err error) *MockBillingAdminService_AddPlanToPriceLine_Call
- func (_c *MockBillingAdminService_AddPlanToPriceLine_Call) Run(...) *MockBillingAdminService_AddPlanToPriceLine_Call
- func (_c *MockBillingAdminService_AddPlanToPriceLine_Call) RunAndReturn(...) *MockBillingAdminService_AddPlanToPriceLine_Call
- type MockBillingAdminService_CancelUserSubscription_Call
- func (_c *MockBillingAdminService_CancelUserSubscription_Call) Return(managementResult *admin.ManagementResult, err error) *MockBillingAdminService_CancelUserSubscription_Call
- func (_c *MockBillingAdminService_CancelUserSubscription_Call) Run(...) *MockBillingAdminService_CancelUserSubscription_Call
- func (_c *MockBillingAdminService_CancelUserSubscription_Call) RunAndReturn(...) *MockBillingAdminService_CancelUserSubscription_Call
- type MockBillingAdminService_ChangeUserPlan_Call
- func (_c *MockBillingAdminService_ChangeUserPlan_Call) Return(planChangeResult *admin.PlanChangeResult, err error) *MockBillingAdminService_ChangeUserPlan_Call
- func (_c *MockBillingAdminService_ChangeUserPlan_Call) Run(run func(ctx context.Context, userID string, req *admin.ChangePlanRequest)) *MockBillingAdminService_ChangeUserPlan_Call
- func (_c *MockBillingAdminService_ChangeUserPlan_Call) RunAndReturn(...) *MockBillingAdminService_ChangeUserPlan_Call
- type MockBillingAdminService_CreateCredit_Call
- func (_c *MockBillingAdminService_CreateCredit_Call) Return(credit *admin.Credit, err error) *MockBillingAdminService_CreateCredit_Call
- func (_c *MockBillingAdminService_CreateCredit_Call) Run(run func(ctx context.Context, req *admin.CreditCreateRequest)) *MockBillingAdminService_CreateCredit_Call
- func (_c *MockBillingAdminService_CreateCredit_Call) RunAndReturn(...) *MockBillingAdminService_CreateCredit_Call
- type MockBillingAdminService_CreatePriceLine_Call
- func (_c *MockBillingAdminService_CreatePriceLine_Call) Return(priceLine *admin.PriceLine, err error) *MockBillingAdminService_CreatePriceLine_Call
- func (_c *MockBillingAdminService_CreatePriceLine_Call) Run(run func(ctx context.Context, req *admin.PriceLineCreateRequest)) *MockBillingAdminService_CreatePriceLine_Call
- func (_c *MockBillingAdminService_CreatePriceLine_Call) RunAndReturn(...) *MockBillingAdminService_CreatePriceLine_Call
- type MockBillingAdminService_CreatePricingPlanPeriod_Call
- func (_c *MockBillingAdminService_CreatePricingPlanPeriod_Call) Return(pricingPlanPeriod *admin.PricingPlanPeriod, err error) *MockBillingAdminService_CreatePricingPlanPeriod_Call
- func (_c *MockBillingAdminService_CreatePricingPlanPeriod_Call) Run(run func(ctx context.Context, req *admin.PricingPlanPeriodCreateRequest)) *MockBillingAdminService_CreatePricingPlanPeriod_Call
- func (_c *MockBillingAdminService_CreatePricingPlanPeriod_Call) RunAndReturn(...) *MockBillingAdminService_CreatePricingPlanPeriod_Call
- type MockBillingAdminService_CreatePricingPlan_Call
- func (_c *MockBillingAdminService_CreatePricingPlan_Call) Return(pricingPlan *admin.PricingPlan, err error) *MockBillingAdminService_CreatePricingPlan_Call
- func (_c *MockBillingAdminService_CreatePricingPlan_Call) Run(run func(ctx context.Context, req *admin.PricingPlanCreateRequest)) *MockBillingAdminService_CreatePricingPlan_Call
- func (_c *MockBillingAdminService_CreatePricingPlan_Call) RunAndReturn(...) *MockBillingAdminService_CreatePricingPlan_Call
- type MockBillingAdminService_DeleteCredit_Call
- func (_c *MockBillingAdminService_DeleteCredit_Call) Return(err error) *MockBillingAdminService_DeleteCredit_Call
- func (_c *MockBillingAdminService_DeleteCredit_Call) Run(run func(ctx context.Context, creditID string)) *MockBillingAdminService_DeleteCredit_Call
- func (_c *MockBillingAdminService_DeleteCredit_Call) RunAndReturn(run func(ctx context.Context, creditID string) error) *MockBillingAdminService_DeleteCredit_Call
- type MockBillingAdminService_DeletePlanFromPriceLine_Call
- func (_c *MockBillingAdminService_DeletePlanFromPriceLine_Call) Return(err error) *MockBillingAdminService_DeletePlanFromPriceLine_Call
- func (_c *MockBillingAdminService_DeletePlanFromPriceLine_Call) Run(run func(ctx context.Context, priceLineID string, planID string)) *MockBillingAdminService_DeletePlanFromPriceLine_Call
- func (_c *MockBillingAdminService_DeletePlanFromPriceLine_Call) RunAndReturn(run func(ctx context.Context, priceLineID string, planID string) error) *MockBillingAdminService_DeletePlanFromPriceLine_Call
- type MockBillingAdminService_DeletePriceLine_Call
- func (_c *MockBillingAdminService_DeletePriceLine_Call) Return(err error) *MockBillingAdminService_DeletePriceLine_Call
- func (_c *MockBillingAdminService_DeletePriceLine_Call) Run(run func(ctx context.Context, priceLineID string)) *MockBillingAdminService_DeletePriceLine_Call
- func (_c *MockBillingAdminService_DeletePriceLine_Call) RunAndReturn(run func(ctx context.Context, priceLineID string) error) *MockBillingAdminService_DeletePriceLine_Call
- type MockBillingAdminService_DeletePricingPlanPeriod_Call
- func (_c *MockBillingAdminService_DeletePricingPlanPeriod_Call) Return(err error) *MockBillingAdminService_DeletePricingPlanPeriod_Call
- func (_c *MockBillingAdminService_DeletePricingPlanPeriod_Call) Run(run func(ctx context.Context, periodID string)) *MockBillingAdminService_DeletePricingPlanPeriod_Call
- func (_c *MockBillingAdminService_DeletePricingPlanPeriod_Call) RunAndReturn(run func(ctx context.Context, periodID string) error) *MockBillingAdminService_DeletePricingPlanPeriod_Call
- type MockBillingAdminService_DeletePricingPlan_Call
- func (_c *MockBillingAdminService_DeletePricingPlan_Call) Return(err error) *MockBillingAdminService_DeletePricingPlan_Call
- func (_c *MockBillingAdminService_DeletePricingPlan_Call) Run(run func(ctx context.Context, planID string)) *MockBillingAdminService_DeletePricingPlan_Call
- func (_c *MockBillingAdminService_DeletePricingPlan_Call) RunAndReturn(run func(ctx context.Context, planID string) error) *MockBillingAdminService_DeletePricingPlan_Call
- type MockBillingAdminService_Expecter
- func (_e *MockBillingAdminService_Expecter) AbortUserSubscriptionCancellation(ctx interface{}, userID interface{}) *MockBillingAdminService_AbortUserSubscriptionCancellation_Call
- func (_e *MockBillingAdminService_Expecter) AddPlanToPriceLine(ctx interface{}, priceLineID interface{}, req interface{}) *MockBillingAdminService_AddPlanToPriceLine_Call
- func (_e *MockBillingAdminService_Expecter) CancelUserSubscription(ctx interface{}, userID interface{}, req interface{}) *MockBillingAdminService_CancelUserSubscription_Call
- func (_e *MockBillingAdminService_Expecter) ChangeUserPlan(ctx interface{}, userID interface{}, req interface{}) *MockBillingAdminService_ChangeUserPlan_Call
- func (_e *MockBillingAdminService_Expecter) CreateCredit(ctx interface{}, req interface{}) *MockBillingAdminService_CreateCredit_Call
- func (_e *MockBillingAdminService_Expecter) CreatePriceLine(ctx interface{}, req interface{}) *MockBillingAdminService_CreatePriceLine_Call
- func (_e *MockBillingAdminService_Expecter) CreatePricingPlan(ctx interface{}, req interface{}) *MockBillingAdminService_CreatePricingPlan_Call
- func (_e *MockBillingAdminService_Expecter) CreatePricingPlanPeriod(ctx interface{}, req interface{}) *MockBillingAdminService_CreatePricingPlanPeriod_Call
- func (_e *MockBillingAdminService_Expecter) DeleteCredit(ctx interface{}, creditID interface{}) *MockBillingAdminService_DeleteCredit_Call
- func (_e *MockBillingAdminService_Expecter) DeletePlanFromPriceLine(ctx interface{}, priceLineID interface{}, planID interface{}) *MockBillingAdminService_DeletePlanFromPriceLine_Call
- func (_e *MockBillingAdminService_Expecter) DeletePriceLine(ctx interface{}, priceLineID interface{}) *MockBillingAdminService_DeletePriceLine_Call
- func (_e *MockBillingAdminService_Expecter) DeletePricingPlan(ctx interface{}, planID interface{}) *MockBillingAdminService_DeletePricingPlan_Call
- func (_e *MockBillingAdminService_Expecter) DeletePricingPlanPeriod(ctx interface{}, periodID interface{}) *MockBillingAdminService_DeletePricingPlanPeriod_Call
- func (_e *MockBillingAdminService_Expecter) GetCredit(ctx interface{}, creditID interface{}) *MockBillingAdminService_GetCredit_Call
- func (_e *MockBillingAdminService_Expecter) GetPriceLine(ctx interface{}, priceLineID interface{}) *MockBillingAdminService_GetPriceLine_Call
- func (_e *MockBillingAdminService_Expecter) GetPricingPlan(ctx interface{}, planID interface{}) *MockBillingAdminService_GetPricingPlan_Call
- func (_e *MockBillingAdminService_Expecter) GetPricingPlanPeriod(ctx interface{}, periodID interface{}) *MockBillingAdminService_GetPricingPlanPeriod_Call
- func (_e *MockBillingAdminService_Expecter) GetSubscriber(ctx interface{}, subscriberID interface{}) *MockBillingAdminService_GetSubscriber_Call
- func (_e *MockBillingAdminService_Expecter) GetUserBalance(ctx interface{}, userID interface{}) *MockBillingAdminService_GetUserBalance_Call
- func (_e *MockBillingAdminService_Expecter) GetUserDeletedCredits(ctx interface{}, userID interface{}, params interface{}) *MockBillingAdminService_GetUserDeletedCredits_Call
- func (_e *MockBillingAdminService_Expecter) GetUserSubscribers(ctx interface{}, userID interface{}) *MockBillingAdminService_GetUserSubscribers_Call
- func (_e *MockBillingAdminService_Expecter) ListCredits(ctx interface{}, params interface{}) *MockBillingAdminService_ListCredits_Call
- func (_e *MockBillingAdminService_Expecter) ListGatewaySubscribers(ctx interface{}, gatewayID interface{}) *MockBillingAdminService_ListGatewaySubscribers_Call
- func (_e *MockBillingAdminService_Expecter) ListPriceLines(ctx interface{}) *MockBillingAdminService_ListPriceLines_Call
- func (_e *MockBillingAdminService_Expecter) ListPricingPlanPeriods(ctx interface{}) *MockBillingAdminService_ListPricingPlanPeriods_Call
- func (_e *MockBillingAdminService_Expecter) ListPricingPlans(ctx interface{}) *MockBillingAdminService_ListPricingPlans_Call
- func (_e *MockBillingAdminService_Expecter) ListSubscribers(ctx interface{}) *MockBillingAdminService_ListSubscribers_Call
- func (_e *MockBillingAdminService_Expecter) PauseUserSubscription(ctx interface{}, userID interface{}) *MockBillingAdminService_PauseUserSubscription_Call
- func (_e *MockBillingAdminService_Expecter) PurgeCredits(ctx interface{}, req interface{}) *MockBillingAdminService_PurgeCredits_Call
- func (_e *MockBillingAdminService_Expecter) RequireAuthenticated() *MockBillingAdminService_RequireAuthenticated_Call
- func (_e *MockBillingAdminService_Expecter) RestoreCredit(ctx interface{}, creditID interface{}) *MockBillingAdminService_RestoreCredit_Call
- func (_e *MockBillingAdminService_Expecter) ResumeUserSubscription(ctx interface{}, userID interface{}) *MockBillingAdminService_ResumeUserSubscription_Call
- func (_e *MockBillingAdminService_Expecter) SyncAllPricingPlans(ctx interface{}) *MockBillingAdminService_SyncAllPricingPlans_Call
- func (_e *MockBillingAdminService_Expecter) SyncPricingPlan(ctx interface{}, planID interface{}) *MockBillingAdminService_SyncPricingPlan_Call
- func (_e *MockBillingAdminService_Expecter) UpdatePlanPosition(ctx interface{}, priceLineID interface{}, planID interface{}, req interface{}) *MockBillingAdminService_UpdatePlanPosition_Call
- func (_e *MockBillingAdminService_Expecter) UpdatePriceLine(ctx interface{}, priceLineID interface{}, req interface{}) *MockBillingAdminService_UpdatePriceLine_Call
- func (_e *MockBillingAdminService_Expecter) UpdatePricingPlan(ctx interface{}, planID interface{}, req interface{}) *MockBillingAdminService_UpdatePricingPlan_Call
- func (_e *MockBillingAdminService_Expecter) UpdatePricingPlanPeriod(ctx interface{}, periodID interface{}, req interface{}) *MockBillingAdminService_UpdatePricingPlanPeriod_Call
- type MockBillingAdminService_GetCredit_Call
- func (_c *MockBillingAdminService_GetCredit_Call) Return(credit *admin.Credit, err error) *MockBillingAdminService_GetCredit_Call
- func (_c *MockBillingAdminService_GetCredit_Call) Run(run func(ctx context.Context, creditID string)) *MockBillingAdminService_GetCredit_Call
- func (_c *MockBillingAdminService_GetCredit_Call) RunAndReturn(run func(ctx context.Context, creditID string) (*admin.Credit, error)) *MockBillingAdminService_GetCredit_Call
- type MockBillingAdminService_GetPriceLine_Call
- func (_c *MockBillingAdminService_GetPriceLine_Call) Return(priceLineDetailResponse *admin.PriceLineDetailResponse, err error) *MockBillingAdminService_GetPriceLine_Call
- func (_c *MockBillingAdminService_GetPriceLine_Call) Run(run func(ctx context.Context, priceLineID string)) *MockBillingAdminService_GetPriceLine_Call
- func (_c *MockBillingAdminService_GetPriceLine_Call) RunAndReturn(...) *MockBillingAdminService_GetPriceLine_Call
- type MockBillingAdminService_GetPricingPlanPeriod_Call
- func (_c *MockBillingAdminService_GetPricingPlanPeriod_Call) Return(pricingPlanPeriod *admin.PricingPlanPeriod, err error) *MockBillingAdminService_GetPricingPlanPeriod_Call
- func (_c *MockBillingAdminService_GetPricingPlanPeriod_Call) Run(run func(ctx context.Context, periodID string)) *MockBillingAdminService_GetPricingPlanPeriod_Call
- func (_c *MockBillingAdminService_GetPricingPlanPeriod_Call) RunAndReturn(...) *MockBillingAdminService_GetPricingPlanPeriod_Call
- type MockBillingAdminService_GetPricingPlan_Call
- func (_c *MockBillingAdminService_GetPricingPlan_Call) Return(pricingPlan *admin.PricingPlan, err error) *MockBillingAdminService_GetPricingPlan_Call
- func (_c *MockBillingAdminService_GetPricingPlan_Call) Run(run func(ctx context.Context, planID string)) *MockBillingAdminService_GetPricingPlan_Call
- func (_c *MockBillingAdminService_GetPricingPlan_Call) RunAndReturn(run func(ctx context.Context, planID string) (*admin.PricingPlan, error)) *MockBillingAdminService_GetPricingPlan_Call
- type MockBillingAdminService_GetSubscriber_Call
- func (_c *MockBillingAdminService_GetSubscriber_Call) Return(subscriber *admin.Subscriber, err error) *MockBillingAdminService_GetSubscriber_Call
- func (_c *MockBillingAdminService_GetSubscriber_Call) Run(run func(ctx context.Context, subscriberID string)) *MockBillingAdminService_GetSubscriber_Call
- func (_c *MockBillingAdminService_GetSubscriber_Call) RunAndReturn(run func(ctx context.Context, subscriberID string) (*admin.Subscriber, error)) *MockBillingAdminService_GetSubscriber_Call
- type MockBillingAdminService_GetUserBalance_Call
- func (_c *MockBillingAdminService_GetUserBalance_Call) Return(userBalance *admin.UserBalance, err error) *MockBillingAdminService_GetUserBalance_Call
- func (_c *MockBillingAdminService_GetUserBalance_Call) Run(run func(ctx context.Context, userID string)) *MockBillingAdminService_GetUserBalance_Call
- func (_c *MockBillingAdminService_GetUserBalance_Call) RunAndReturn(run func(ctx context.Context, userID string) (*admin.UserBalance, error)) *MockBillingAdminService_GetUserBalance_Call
- type MockBillingAdminService_GetUserDeletedCredits_Call
- func (_c *MockBillingAdminService_GetUserDeletedCredits_Call) Return(creditItems []*admin.CreditItem, n int, err error) *MockBillingAdminService_GetUserDeletedCredits_Call
- func (_c *MockBillingAdminService_GetUserDeletedCredits_Call) Run(run func(ctx context.Context, userID string, ...)) *MockBillingAdminService_GetUserDeletedCredits_Call
- func (_c *MockBillingAdminService_GetUserDeletedCredits_Call) RunAndReturn(...) *MockBillingAdminService_GetUserDeletedCredits_Call
- type MockBillingAdminService_GetUserSubscribers_Call
- func (_c *MockBillingAdminService_GetUserSubscribers_Call) Return(subscribers []*admin.Subscriber, n int, err error) *MockBillingAdminService_GetUserSubscribers_Call
- func (_c *MockBillingAdminService_GetUserSubscribers_Call) Run(run func(ctx context.Context, userID string)) *MockBillingAdminService_GetUserSubscribers_Call
- func (_c *MockBillingAdminService_GetUserSubscribers_Call) RunAndReturn(run func(ctx context.Context, userID string) ([]*admin.Subscriber, int, error)) *MockBillingAdminService_GetUserSubscribers_Call
- type MockBillingAdminService_ListCredits_Call
- func (_c *MockBillingAdminService_ListCredits_Call) Return(creditItems []*admin.CreditItem, n int, err error) *MockBillingAdminService_ListCredits_Call
- func (_c *MockBillingAdminService_ListCredits_Call) Run(run func(ctx context.Context, params *admin.GetApiBillingCreditsParams)) *MockBillingAdminService_ListCredits_Call
- func (_c *MockBillingAdminService_ListCredits_Call) RunAndReturn(...) *MockBillingAdminService_ListCredits_Call
- type MockBillingAdminService_ListGatewaySubscribers_Call
- func (_c *MockBillingAdminService_ListGatewaySubscribers_Call) Return(subscribers []*admin.Subscriber, n int, err error) *MockBillingAdminService_ListGatewaySubscribers_Call
- func (_c *MockBillingAdminService_ListGatewaySubscribers_Call) Run(run func(ctx context.Context, gatewayID string)) *MockBillingAdminService_ListGatewaySubscribers_Call
- func (_c *MockBillingAdminService_ListGatewaySubscribers_Call) RunAndReturn(...) *MockBillingAdminService_ListGatewaySubscribers_Call
- type MockBillingAdminService_ListPriceLines_Call
- func (_c *MockBillingAdminService_ListPriceLines_Call) Return(priceLines []*admin.PriceLine, n int, err error) *MockBillingAdminService_ListPriceLines_Call
- func (_c *MockBillingAdminService_ListPriceLines_Call) Run(run func(ctx context.Context)) *MockBillingAdminService_ListPriceLines_Call
- func (_c *MockBillingAdminService_ListPriceLines_Call) RunAndReturn(run func(ctx context.Context) ([]*admin.PriceLine, int, error)) *MockBillingAdminService_ListPriceLines_Call
- type MockBillingAdminService_ListPricingPlanPeriods_Call
- func (_c *MockBillingAdminService_ListPricingPlanPeriods_Call) Return(pricingPlanPeriods []*admin.PricingPlanPeriod, n int, err error) *MockBillingAdminService_ListPricingPlanPeriods_Call
- func (_c *MockBillingAdminService_ListPricingPlanPeriods_Call) Run(run func(ctx context.Context)) *MockBillingAdminService_ListPricingPlanPeriods_Call
- func (_c *MockBillingAdminService_ListPricingPlanPeriods_Call) RunAndReturn(run func(ctx context.Context) ([]*admin.PricingPlanPeriod, int, error)) *MockBillingAdminService_ListPricingPlanPeriods_Call
- type MockBillingAdminService_ListPricingPlans_Call
- func (_c *MockBillingAdminService_ListPricingPlans_Call) Return(pricingPlanItems []*admin.PricingPlanItem, n int, err error) *MockBillingAdminService_ListPricingPlans_Call
- func (_c *MockBillingAdminService_ListPricingPlans_Call) Run(run func(ctx context.Context)) *MockBillingAdminService_ListPricingPlans_Call
- func (_c *MockBillingAdminService_ListPricingPlans_Call) RunAndReturn(run func(ctx context.Context) ([]*admin.PricingPlanItem, int, error)) *MockBillingAdminService_ListPricingPlans_Call
- type MockBillingAdminService_ListSubscribers_Call
- func (_c *MockBillingAdminService_ListSubscribers_Call) Return(subscribers []*admin.Subscriber, n int, err error) *MockBillingAdminService_ListSubscribers_Call
- func (_c *MockBillingAdminService_ListSubscribers_Call) Run(run func(ctx context.Context)) *MockBillingAdminService_ListSubscribers_Call
- func (_c *MockBillingAdminService_ListSubscribers_Call) RunAndReturn(run func(ctx context.Context) ([]*admin.Subscriber, int, error)) *MockBillingAdminService_ListSubscribers_Call
- type MockBillingAdminService_PauseUserSubscription_Call
- func (_c *MockBillingAdminService_PauseUserSubscription_Call) Return(managementResult *admin.ManagementResult, err error) *MockBillingAdminService_PauseUserSubscription_Call
- func (_c *MockBillingAdminService_PauseUserSubscription_Call) Run(run func(ctx context.Context, userID string)) *MockBillingAdminService_PauseUserSubscription_Call
- func (_c *MockBillingAdminService_PauseUserSubscription_Call) RunAndReturn(run func(ctx context.Context, userID string) (*admin.ManagementResult, error)) *MockBillingAdminService_PauseUserSubscription_Call
- type MockBillingAdminService_PurgeCredits_Call
- func (_c *MockBillingAdminService_PurgeCredits_Call) Return(n int, err error) *MockBillingAdminService_PurgeCredits_Call
- func (_c *MockBillingAdminService_PurgeCredits_Call) Run(run func(ctx context.Context, req *admin.CreditPurgeRequest)) *MockBillingAdminService_PurgeCredits_Call
- func (_c *MockBillingAdminService_PurgeCredits_Call) RunAndReturn(run func(ctx context.Context, req *admin.CreditPurgeRequest) (int, error)) *MockBillingAdminService_PurgeCredits_Call
- type MockBillingAdminService_RequireAuthenticated_Call
- func (_c *MockBillingAdminService_RequireAuthenticated_Call) Return(err error) *MockBillingAdminService_RequireAuthenticated_Call
- func (_c *MockBillingAdminService_RequireAuthenticated_Call) Run(run func()) *MockBillingAdminService_RequireAuthenticated_Call
- func (_c *MockBillingAdminService_RequireAuthenticated_Call) RunAndReturn(run func() error) *MockBillingAdminService_RequireAuthenticated_Call
- type MockBillingAdminService_RestoreCredit_Call
- func (_c *MockBillingAdminService_RestoreCredit_Call) Return(credit *admin.Credit, err error) *MockBillingAdminService_RestoreCredit_Call
- func (_c *MockBillingAdminService_RestoreCredit_Call) Run(run func(ctx context.Context, creditID string)) *MockBillingAdminService_RestoreCredit_Call
- func (_c *MockBillingAdminService_RestoreCredit_Call) RunAndReturn(run func(ctx context.Context, creditID string) (*admin.Credit, error)) *MockBillingAdminService_RestoreCredit_Call
- type MockBillingAdminService_ResumeUserSubscription_Call
- func (_c *MockBillingAdminService_ResumeUserSubscription_Call) Return(managementResult *admin.ManagementResult, err error) *MockBillingAdminService_ResumeUserSubscription_Call
- func (_c *MockBillingAdminService_ResumeUserSubscription_Call) Run(run func(ctx context.Context, userID string)) *MockBillingAdminService_ResumeUserSubscription_Call
- func (_c *MockBillingAdminService_ResumeUserSubscription_Call) RunAndReturn(run func(ctx context.Context, userID string) (*admin.ManagementResult, error)) *MockBillingAdminService_ResumeUserSubscription_Call
- type MockBillingAdminService_SyncAllPricingPlans_Call
- func (_c *MockBillingAdminService_SyncAllPricingPlans_Call) Return(err error) *MockBillingAdminService_SyncAllPricingPlans_Call
- func (_c *MockBillingAdminService_SyncAllPricingPlans_Call) Run(run func(ctx context.Context)) *MockBillingAdminService_SyncAllPricingPlans_Call
- func (_c *MockBillingAdminService_SyncAllPricingPlans_Call) RunAndReturn(run func(ctx context.Context) error) *MockBillingAdminService_SyncAllPricingPlans_Call
- type MockBillingAdminService_SyncPricingPlan_Call
- func (_c *MockBillingAdminService_SyncPricingPlan_Call) Return(err error) *MockBillingAdminService_SyncPricingPlan_Call
- func (_c *MockBillingAdminService_SyncPricingPlan_Call) Run(run func(ctx context.Context, planID string)) *MockBillingAdminService_SyncPricingPlan_Call
- func (_c *MockBillingAdminService_SyncPricingPlan_Call) RunAndReturn(run func(ctx context.Context, planID string) error) *MockBillingAdminService_SyncPricingPlan_Call
- type MockBillingAdminService_UpdatePlanPosition_Call
- func (_c *MockBillingAdminService_UpdatePlanPosition_Call) Return(priceLineDetailResponse *admin.PriceLineDetailResponse, err error) *MockBillingAdminService_UpdatePlanPosition_Call
- func (_c *MockBillingAdminService_UpdatePlanPosition_Call) Run(run func(ctx context.Context, priceLineID string, planID string, ...)) *MockBillingAdminService_UpdatePlanPosition_Call
- func (_c *MockBillingAdminService_UpdatePlanPosition_Call) RunAndReturn(...) *MockBillingAdminService_UpdatePlanPosition_Call
- type MockBillingAdminService_UpdatePriceLine_Call
- func (_c *MockBillingAdminService_UpdatePriceLine_Call) Return(priceLine *admin.PriceLine, err error) *MockBillingAdminService_UpdatePriceLine_Call
- func (_c *MockBillingAdminService_UpdatePriceLine_Call) Run(...) *MockBillingAdminService_UpdatePriceLine_Call
- func (_c *MockBillingAdminService_UpdatePriceLine_Call) RunAndReturn(...) *MockBillingAdminService_UpdatePriceLine_Call
- type MockBillingAdminService_UpdatePricingPlanPeriod_Call
- func (_c *MockBillingAdminService_UpdatePricingPlanPeriod_Call) Return(pricingPlanPeriod *admin.PricingPlanPeriod, err error) *MockBillingAdminService_UpdatePricingPlanPeriod_Call
- func (_c *MockBillingAdminService_UpdatePricingPlanPeriod_Call) Run(run func(ctx context.Context, periodID string, ...)) *MockBillingAdminService_UpdatePricingPlanPeriod_Call
- func (_c *MockBillingAdminService_UpdatePricingPlanPeriod_Call) RunAndReturn(...) *MockBillingAdminService_UpdatePricingPlanPeriod_Call
- type MockBillingAdminService_UpdatePricingPlan_Call
- func (_c *MockBillingAdminService_UpdatePricingPlan_Call) Return(pricingPlan *admin.PricingPlan, err error) *MockBillingAdminService_UpdatePricingPlan_Call
- func (_c *MockBillingAdminService_UpdatePricingPlan_Call) Run(...) *MockBillingAdminService_UpdatePricingPlan_Call
- func (_c *MockBillingAdminService_UpdatePricingPlan_Call) RunAndReturn(...) *MockBillingAdminService_UpdatePricingPlan_Call
- type MockPinningService
- func (_m *MockPinningService) EXPECT() *MockPinningService_Expecter
- func (_mock *MockPinningService) List(ctx context.Context, nameFilter string, limit int, statusFilter string) ([]Pin, error)
- func (_mock *MockPinningService) Pin(ctx context.Context, cid string, name string, wait bool) (*PinResult, error)
- func (_mock *MockPinningService) PinBatch(ctx context.Context, cids []string, name string, opts BatchOptions) (*BatchResult, error)
- func (_mock *MockPinningService) RequireAuthenticated() error
- func (_mock *MockPinningService) Status(ctx context.Context, cid string, watch bool) (*PinStatus, error)
- func (_mock *MockPinningService) Unpin(ctx context.Context, cid string, confirm bool) (*UnpinResult, error)
- func (_mock *MockPinningService) UnpinBatch(ctx context.Context, cids []string, opts BatchOptions) (*BatchResult, error)
- func (_mock *MockPinningService) UpdateMetadata(ctx context.Context, cid string, set []string, clear bool) error
- type MockPinningService_Expecter
- func (_e *MockPinningService_Expecter) List(ctx interface{}, nameFilter interface{}, limit interface{}, ...) *MockPinningService_List_Call
- func (_e *MockPinningService_Expecter) Pin(ctx interface{}, cid interface{}, name interface{}, wait interface{}) *MockPinningService_Pin_Call
- func (_e *MockPinningService_Expecter) PinBatch(ctx interface{}, cids interface{}, name interface{}, opts interface{}) *MockPinningService_PinBatch_Call
- func (_e *MockPinningService_Expecter) RequireAuthenticated() *MockPinningService_RequireAuthenticated_Call
- func (_e *MockPinningService_Expecter) Status(ctx interface{}, cid interface{}, watch interface{}) *MockPinningService_Status_Call
- func (_e *MockPinningService_Expecter) Unpin(ctx interface{}, cid interface{}, confirm interface{}) *MockPinningService_Unpin_Call
- func (_e *MockPinningService_Expecter) UnpinBatch(ctx interface{}, cids interface{}, opts interface{}) *MockPinningService_UnpinBatch_Call
- func (_e *MockPinningService_Expecter) UpdateMetadata(ctx interface{}, cid interface{}, set interface{}, clear interface{}) *MockPinningService_UpdateMetadata_Call
- type MockPinningService_List_Call
- type MockPinningService_PinBatch_Call
- func (_c *MockPinningService_PinBatch_Call) Return(batchResult *BatchResult, err error) *MockPinningService_PinBatch_Call
- func (_c *MockPinningService_PinBatch_Call) Run(run func(ctx context.Context, cids []string, name string, opts BatchOptions)) *MockPinningService_PinBatch_Call
- func (_c *MockPinningService_PinBatch_Call) RunAndReturn(...) *MockPinningService_PinBatch_Call
- type MockPinningService_Pin_Call
- func (_c *MockPinningService_Pin_Call) Return(pinResult *PinResult, err error) *MockPinningService_Pin_Call
- func (_c *MockPinningService_Pin_Call) Run(run func(ctx context.Context, cid string, name string, wait bool)) *MockPinningService_Pin_Call
- func (_c *MockPinningService_Pin_Call) RunAndReturn(...) *MockPinningService_Pin_Call
- type MockPinningService_RequireAuthenticated_Call
- func (_c *MockPinningService_RequireAuthenticated_Call) Return(err error) *MockPinningService_RequireAuthenticated_Call
- func (_c *MockPinningService_RequireAuthenticated_Call) Run(run func()) *MockPinningService_RequireAuthenticated_Call
- func (_c *MockPinningService_RequireAuthenticated_Call) RunAndReturn(run func() error) *MockPinningService_RequireAuthenticated_Call
- type MockPinningService_Status_Call
- func (_c *MockPinningService_Status_Call) Return(pinStatus *PinStatus, err error) *MockPinningService_Status_Call
- func (_c *MockPinningService_Status_Call) Run(run func(ctx context.Context, cid string, watch bool)) *MockPinningService_Status_Call
- func (_c *MockPinningService_Status_Call) RunAndReturn(run func(ctx context.Context, cid string, watch bool) (*PinStatus, error)) *MockPinningService_Status_Call
- type MockPinningService_UnpinBatch_Call
- func (_c *MockPinningService_UnpinBatch_Call) Return(batchResult *BatchResult, err error) *MockPinningService_UnpinBatch_Call
- func (_c *MockPinningService_UnpinBatch_Call) Run(run func(ctx context.Context, cids []string, opts BatchOptions)) *MockPinningService_UnpinBatch_Call
- func (_c *MockPinningService_UnpinBatch_Call) RunAndReturn(...) *MockPinningService_UnpinBatch_Call
- type MockPinningService_Unpin_Call
- func (_c *MockPinningService_Unpin_Call) Return(unpinResult *UnpinResult, err error) *MockPinningService_Unpin_Call
- func (_c *MockPinningService_Unpin_Call) Run(run func(ctx context.Context, cid string, confirm bool)) *MockPinningService_Unpin_Call
- func (_c *MockPinningService_Unpin_Call) RunAndReturn(run func(ctx context.Context, cid string, confirm bool) (*UnpinResult, error)) *MockPinningService_Unpin_Call
- type MockPinningService_UpdateMetadata_Call
- func (_c *MockPinningService_UpdateMetadata_Call) Return(err error) *MockPinningService_UpdateMetadata_Call
- func (_c *MockPinningService_UpdateMetadata_Call) Run(run func(ctx context.Context, cid string, set []string, clear bool)) *MockPinningService_UpdateMetadata_Call
- func (_c *MockPinningService_UpdateMetadata_Call) RunAndReturn(run func(ctx context.Context, cid string, set []string, clear bool) error) *MockPinningService_UpdateMetadata_Call
- type MockQuotaAdminService
- func (_mock *MockQuotaAdminService) Cleanup(ctx context.Context, retentionDays int) (int, error)
- func (_mock *MockQuotaAdminService) CreateAllowance(ctx context.Context, userID int, source string, allowanceType string, ...) (*admin.QuotaAllowance, error)
- func (_mock *MockQuotaAdminService) CreatePlan(ctx context.Context, plan *admin.QuotaPlan) (*admin.QuotaPlan, error)
- func (_mock *MockQuotaAdminService) DeleteAllowance(ctx context.Context, grantID string) error
- func (_mock *MockQuotaAdminService) DeletePlan(ctx context.Context, planID string) error
- func (_m *MockQuotaAdminService) EXPECT() *MockQuotaAdminService_Expecter
- func (_mock *MockQuotaAdminService) GetPlan(ctx context.Context, planID string) (*admin.QuotaPlan, error)
- func (_mock *MockQuotaAdminService) GetStats(ctx context.Context) (*admin.SystemStats, error)
- func (_mock *MockQuotaAdminService) ListAllowances(ctx context.Context) ([]*admin.QuotaAllowance, int, error)
- func (_mock *MockQuotaAdminService) ListPlans(ctx context.Context) ([]*admin.QuotaPlan, int, error)
- func (_mock *MockQuotaAdminService) ListUserConfigs(ctx context.Context) ([]*admin.UserQuotaConfig, int, error)
- func (_mock *MockQuotaAdminService) Reconcile(ctx context.Context, userID *int) (string, int, error)
- func (_mock *MockQuotaAdminService) RequireAuthenticated() error
- func (_mock *MockQuotaAdminService) ResetUserPlan(ctx context.Context, userID int) error
- func (_mock *MockQuotaAdminService) SetDefaultPlan(ctx context.Context, planID string) error
- func (_mock *MockQuotaAdminService) UpdateAllowance(ctx context.Context, grantID string, userID int, source string, ...) (*admin.QuotaAllowance, error)
- func (_mock *MockQuotaAdminService) UpdatePlan(ctx context.Context, planID string, plan *admin.QuotaPlan) (*admin.QuotaPlan, error)
- func (_mock *MockQuotaAdminService) UpdateUserConfig(ctx context.Context, userID int, config *admin.UserQuotaConfigUpdate) (*admin.UserQuotaConfig, error)
- type MockQuotaAdminService_Cleanup_Call
- func (_c *MockQuotaAdminService_Cleanup_Call) Return(n int, err error) *MockQuotaAdminService_Cleanup_Call
- func (_c *MockQuotaAdminService_Cleanup_Call) Run(run func(ctx context.Context, retentionDays int)) *MockQuotaAdminService_Cleanup_Call
- func (_c *MockQuotaAdminService_Cleanup_Call) RunAndReturn(run func(ctx context.Context, retentionDays int) (int, error)) *MockQuotaAdminService_Cleanup_Call
- type MockQuotaAdminService_CreateAllowance_Call
- func (_c *MockQuotaAdminService_CreateAllowance_Call) Return(quotaAllowance *admin.QuotaAllowance, err error) *MockQuotaAdminService_CreateAllowance_Call
- func (_c *MockQuotaAdminService_CreateAllowance_Call) Run(...) *MockQuotaAdminService_CreateAllowance_Call
- func (_c *MockQuotaAdminService_CreateAllowance_Call) RunAndReturn(...) *MockQuotaAdminService_CreateAllowance_Call
- type MockQuotaAdminService_CreatePlan_Call
- func (_c *MockQuotaAdminService_CreatePlan_Call) Return(quotaPlan *admin.QuotaPlan, err error) *MockQuotaAdminService_CreatePlan_Call
- func (_c *MockQuotaAdminService_CreatePlan_Call) Run(run func(ctx context.Context, plan *admin.QuotaPlan)) *MockQuotaAdminService_CreatePlan_Call
- func (_c *MockQuotaAdminService_CreatePlan_Call) RunAndReturn(run func(ctx context.Context, plan *admin.QuotaPlan) (*admin.QuotaPlan, error)) *MockQuotaAdminService_CreatePlan_Call
- type MockQuotaAdminService_DeleteAllowance_Call
- func (_c *MockQuotaAdminService_DeleteAllowance_Call) Return(err error) *MockQuotaAdminService_DeleteAllowance_Call
- func (_c *MockQuotaAdminService_DeleteAllowance_Call) Run(run func(ctx context.Context, grantID string)) *MockQuotaAdminService_DeleteAllowance_Call
- func (_c *MockQuotaAdminService_DeleteAllowance_Call) RunAndReturn(run func(ctx context.Context, grantID string) error) *MockQuotaAdminService_DeleteAllowance_Call
- type MockQuotaAdminService_DeletePlan_Call
- func (_c *MockQuotaAdminService_DeletePlan_Call) Return(err error) *MockQuotaAdminService_DeletePlan_Call
- func (_c *MockQuotaAdminService_DeletePlan_Call) Run(run func(ctx context.Context, planID string)) *MockQuotaAdminService_DeletePlan_Call
- func (_c *MockQuotaAdminService_DeletePlan_Call) RunAndReturn(run func(ctx context.Context, planID string) error) *MockQuotaAdminService_DeletePlan_Call
- type MockQuotaAdminService_Expecter
- func (_e *MockQuotaAdminService_Expecter) Cleanup(ctx interface{}, retentionDays interface{}) *MockQuotaAdminService_Cleanup_Call
- func (_e *MockQuotaAdminService_Expecter) CreateAllowance(ctx interface{}, userID interface{}, source interface{}, ...) *MockQuotaAdminService_CreateAllowance_Call
- func (_e *MockQuotaAdminService_Expecter) CreatePlan(ctx interface{}, plan interface{}) *MockQuotaAdminService_CreatePlan_Call
- func (_e *MockQuotaAdminService_Expecter) DeleteAllowance(ctx interface{}, grantID interface{}) *MockQuotaAdminService_DeleteAllowance_Call
- func (_e *MockQuotaAdminService_Expecter) DeletePlan(ctx interface{}, planID interface{}) *MockQuotaAdminService_DeletePlan_Call
- func (_e *MockQuotaAdminService_Expecter) GetPlan(ctx interface{}, planID interface{}) *MockQuotaAdminService_GetPlan_Call
- func (_e *MockQuotaAdminService_Expecter) GetStats(ctx interface{}) *MockQuotaAdminService_GetStats_Call
- func (_e *MockQuotaAdminService_Expecter) ListAllowances(ctx interface{}) *MockQuotaAdminService_ListAllowances_Call
- func (_e *MockQuotaAdminService_Expecter) ListPlans(ctx interface{}) *MockQuotaAdminService_ListPlans_Call
- func (_e *MockQuotaAdminService_Expecter) ListUserConfigs(ctx interface{}) *MockQuotaAdminService_ListUserConfigs_Call
- func (_e *MockQuotaAdminService_Expecter) Reconcile(ctx interface{}, userID interface{}) *MockQuotaAdminService_Reconcile_Call
- func (_e *MockQuotaAdminService_Expecter) RequireAuthenticated() *MockQuotaAdminService_RequireAuthenticated_Call
- func (_e *MockQuotaAdminService_Expecter) ResetUserPlan(ctx interface{}, userID interface{}) *MockQuotaAdminService_ResetUserPlan_Call
- func (_e *MockQuotaAdminService_Expecter) SetDefaultPlan(ctx interface{}, planID interface{}) *MockQuotaAdminService_SetDefaultPlan_Call
- func (_e *MockQuotaAdminService_Expecter) UpdateAllowance(ctx interface{}, grantID interface{}, userID interface{}, source interface{}, ...) *MockQuotaAdminService_UpdateAllowance_Call
- func (_e *MockQuotaAdminService_Expecter) UpdatePlan(ctx interface{}, planID interface{}, plan interface{}) *MockQuotaAdminService_UpdatePlan_Call
- func (_e *MockQuotaAdminService_Expecter) UpdateUserConfig(ctx interface{}, userID interface{}, config interface{}) *MockQuotaAdminService_UpdateUserConfig_Call
- type MockQuotaAdminService_GetPlan_Call
- func (_c *MockQuotaAdminService_GetPlan_Call) Return(quotaPlan *admin.QuotaPlan, err error) *MockQuotaAdminService_GetPlan_Call
- func (_c *MockQuotaAdminService_GetPlan_Call) Run(run func(ctx context.Context, planID string)) *MockQuotaAdminService_GetPlan_Call
- func (_c *MockQuotaAdminService_GetPlan_Call) RunAndReturn(run func(ctx context.Context, planID string) (*admin.QuotaPlan, error)) *MockQuotaAdminService_GetPlan_Call
- type MockQuotaAdminService_GetStats_Call
- func (_c *MockQuotaAdminService_GetStats_Call) Return(systemStats *admin.SystemStats, err error) *MockQuotaAdminService_GetStats_Call
- func (_c *MockQuotaAdminService_GetStats_Call) Run(run func(ctx context.Context)) *MockQuotaAdminService_GetStats_Call
- func (_c *MockQuotaAdminService_GetStats_Call) RunAndReturn(run func(ctx context.Context) (*admin.SystemStats, error)) *MockQuotaAdminService_GetStats_Call
- type MockQuotaAdminService_ListAllowances_Call
- func (_c *MockQuotaAdminService_ListAllowances_Call) Return(quotaAllowances []*admin.QuotaAllowance, n int, err error) *MockQuotaAdminService_ListAllowances_Call
- func (_c *MockQuotaAdminService_ListAllowances_Call) Run(run func(ctx context.Context)) *MockQuotaAdminService_ListAllowances_Call
- func (_c *MockQuotaAdminService_ListAllowances_Call) RunAndReturn(run func(ctx context.Context) ([]*admin.QuotaAllowance, int, error)) *MockQuotaAdminService_ListAllowances_Call
- type MockQuotaAdminService_ListPlans_Call
- func (_c *MockQuotaAdminService_ListPlans_Call) Return(quotaPlans []*admin.QuotaPlan, n int, err error) *MockQuotaAdminService_ListPlans_Call
- func (_c *MockQuotaAdminService_ListPlans_Call) Run(run func(ctx context.Context)) *MockQuotaAdminService_ListPlans_Call
- func (_c *MockQuotaAdminService_ListPlans_Call) RunAndReturn(run func(ctx context.Context) ([]*admin.QuotaPlan, int, error)) *MockQuotaAdminService_ListPlans_Call
- type MockQuotaAdminService_ListUserConfigs_Call
- func (_c *MockQuotaAdminService_ListUserConfigs_Call) Return(userQuotaConfigs []*admin.UserQuotaConfig, n int, err error) *MockQuotaAdminService_ListUserConfigs_Call
- func (_c *MockQuotaAdminService_ListUserConfigs_Call) Run(run func(ctx context.Context)) *MockQuotaAdminService_ListUserConfigs_Call
- func (_c *MockQuotaAdminService_ListUserConfigs_Call) RunAndReturn(run func(ctx context.Context) ([]*admin.UserQuotaConfig, int, error)) *MockQuotaAdminService_ListUserConfigs_Call
- type MockQuotaAdminService_Reconcile_Call
- func (_c *MockQuotaAdminService_Reconcile_Call) Return(s string, n int, err error) *MockQuotaAdminService_Reconcile_Call
- func (_c *MockQuotaAdminService_Reconcile_Call) Run(run func(ctx context.Context, userID *int)) *MockQuotaAdminService_Reconcile_Call
- func (_c *MockQuotaAdminService_Reconcile_Call) RunAndReturn(run func(ctx context.Context, userID *int) (string, int, error)) *MockQuotaAdminService_Reconcile_Call
- type MockQuotaAdminService_RequireAuthenticated_Call
- func (_c *MockQuotaAdminService_RequireAuthenticated_Call) Return(err error) *MockQuotaAdminService_RequireAuthenticated_Call
- func (_c *MockQuotaAdminService_RequireAuthenticated_Call) Run(run func()) *MockQuotaAdminService_RequireAuthenticated_Call
- func (_c *MockQuotaAdminService_RequireAuthenticated_Call) RunAndReturn(run func() error) *MockQuotaAdminService_RequireAuthenticated_Call
- type MockQuotaAdminService_ResetUserPlan_Call
- func (_c *MockQuotaAdminService_ResetUserPlan_Call) Return(err error) *MockQuotaAdminService_ResetUserPlan_Call
- func (_c *MockQuotaAdminService_ResetUserPlan_Call) Run(run func(ctx context.Context, userID int)) *MockQuotaAdminService_ResetUserPlan_Call
- func (_c *MockQuotaAdminService_ResetUserPlan_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockQuotaAdminService_ResetUserPlan_Call
- type MockQuotaAdminService_SetDefaultPlan_Call
- func (_c *MockQuotaAdminService_SetDefaultPlan_Call) Return(err error) *MockQuotaAdminService_SetDefaultPlan_Call
- func (_c *MockQuotaAdminService_SetDefaultPlan_Call) Run(run func(ctx context.Context, planID string)) *MockQuotaAdminService_SetDefaultPlan_Call
- func (_c *MockQuotaAdminService_SetDefaultPlan_Call) RunAndReturn(run func(ctx context.Context, planID string) error) *MockQuotaAdminService_SetDefaultPlan_Call
- type MockQuotaAdminService_UpdateAllowance_Call
- func (_c *MockQuotaAdminService_UpdateAllowance_Call) Return(quotaAllowance *admin.QuotaAllowance, err error) *MockQuotaAdminService_UpdateAllowance_Call
- func (_c *MockQuotaAdminService_UpdateAllowance_Call) Run(run func(ctx context.Context, grantID string, userID int, source string, ...)) *MockQuotaAdminService_UpdateAllowance_Call
- func (_c *MockQuotaAdminService_UpdateAllowance_Call) RunAndReturn(...) *MockQuotaAdminService_UpdateAllowance_Call
- type MockQuotaAdminService_UpdatePlan_Call
- func (_c *MockQuotaAdminService_UpdatePlan_Call) Return(quotaPlan *admin.QuotaPlan, err error) *MockQuotaAdminService_UpdatePlan_Call
- func (_c *MockQuotaAdminService_UpdatePlan_Call) Run(run func(ctx context.Context, planID string, plan *admin.QuotaPlan)) *MockQuotaAdminService_UpdatePlan_Call
- func (_c *MockQuotaAdminService_UpdatePlan_Call) RunAndReturn(...) *MockQuotaAdminService_UpdatePlan_Call
- type MockQuotaAdminService_UpdateUserConfig_Call
- func (_c *MockQuotaAdminService_UpdateUserConfig_Call) Return(userQuotaConfig *admin.UserQuotaConfig, err error) *MockQuotaAdminService_UpdateUserConfig_Call
- func (_c *MockQuotaAdminService_UpdateUserConfig_Call) Run(run func(ctx context.Context, userID int, config *admin.UserQuotaConfigUpdate)) *MockQuotaAdminService_UpdateUserConfig_Call
- func (_c *MockQuotaAdminService_UpdateUserConfig_Call) RunAndReturn(...) *MockQuotaAdminService_UpdateUserConfig_Call
- type MockSetupUI
- func (m *MockSetupUI) CallCount(method string) int
- func (m *MockSetupUI) ClearCalls()
- func (m *MockSetupUI) ExecuteAuthStep(ctx context.Context, wizard *SetupWizard) error
- func (m *MockSetupUI) ExecuteCompletionStep(wizard *SetupWizard) error
- func (m *MockSetupUI) ExecuteConfigStep(ctx context.Context, wizard *SetupWizard) error
- func (m *MockSetupUI) ExecuteTutorialStep(wizard *SetupWizard) error
- func (m *MockSetupUI) GetCalls() []string
- func (m *MockSetupUI) SetAuthChoice(choice AuthStepChoice)
- func (m *MockSetupUI) SetConfigChoice(choice ConfigStepChoice)
- func (m *MockSetupUI) SetCredentials(email, password string)
- func (m *MockSetupUI) SetCustomConfig(config CustomConfig)
- func (m *MockSetupUI) SetOTPCode(code string)
- func (m *MockSetupUI) SetReturnError(err error)
- func (m *MockSetupUI) ShowCompletion() error
- func (m *MockSetupUI) ShowStepProgress(ctx context.Context, current, total int, stepName string) error
- func (m *MockSetupUI) ShowStepSkipped(ctx context.Context, stepName string) error
- func (m *MockSetupUI) ShowWelcome() error
- func (m *MockSetupUI) VerifyCalls(expected []string) bool
- func (m *MockSetupUI) WasCalled(method string) bool
- type MockUploadService
- type MockUploadService_Expecter
- type MockUploadService_Upload_Call
- func (_c *MockUploadService_Upload_Call) Return(uploadResult *UploadResult, err error) *MockUploadService_Upload_Call
- func (_c *MockUploadService_Upload_Call) Run(run func(ctx context.Context, filesystem fs.FS, name string, wait bool)) *MockUploadService_Upload_Call
- func (_c *MockUploadService_Upload_Call) RunAndReturn(...) *MockUploadService_Upload_Call
- type OperationError
- type OperationResult
- type Output
- type PTermSetupUI
- func (ui *PTermSetupUI) ExecuteAuthStep(ctx context.Context, wizard *SetupWizard) error
- func (ui *PTermSetupUI) ExecuteCompletionStep(_ *SetupWizard) error
- func (ui *PTermSetupUI) ExecuteConfigStep(ctx context.Context, wizard *SetupWizard) error
- func (ui *PTermSetupUI) ExecuteTutorialStep(_ *SetupWizard) error
- func (ui *PTermSetupUI) ShowCompletion() error
- func (ui *PTermSetupUI) ShowStepProgress(ctx context.Context, current, total int, stepName string) error
- func (ui *PTermSetupUI) ShowStepSkipped(ctx context.Context, stepName string) error
- func (ui *PTermSetupUI) ShowWelcome() error
- type Pin
- type PinResult
- type PinStatus
- type PinningService
- type PinningServiceDefault
- func (s *PinningServiceDefault) List(ctx context.Context, nameFilter string, limit int, statusFilter string) ([]Pin, error)
- func (s *PinningServiceDefault) Pin(ctx context.Context, cidStr, name string, wait bool) (*PinResult, error)
- func (s *PinningServiceDefault) PinBatch(ctx context.Context, cids []string, name string, opts BatchOptions) (*BatchResult, error)
- func (s *PinningServiceDefault) RequireAuthenticated() error
- func (s *PinningServiceDefault) Status(ctx context.Context, cidStr string, watch bool) (*PinStatus, error)
- func (s *PinningServiceDefault) Unpin(ctx context.Context, cidStr string, confirm bool) (*UnpinResult, error)
- func (s *PinningServiceDefault) UnpinBatch(ctx context.Context, cids []string, opts BatchOptions) (*BatchResult, error)
- func (s *PinningServiceDefault) UpdateMetadata(ctx context.Context, cidStr string, set []string, clear bool) error
- type PinningServiceFactory
- type PinningServiceOption
- type PowerShellCompletionDetector
- type ProgressWriter
- type QuotaAdminService
- type QuotaAdminServiceFactory
- type SetupOptions
- type SetupStep
- type SetupUI
- type SetupWizard
- type StdinSource
- type TutorialCommand
- type TutorialMetadata
- type TutorialStep
- type UnpinResult
- type UploadInput
- type UploadResult
- type UploadService
- type UploadServiceConfig
- type UploadServiceDefault
- type UploadServiceFactory
- type UploadServiceOption
- type WebsitesService
- type WebsitesServiceFactory
- type ZshCompletionDetector
Constants ¶
const ( // DocumentationURL is the URL for the Pinner CLI documentation. DocumentationURL = "https://docs.lumeweb.com" // TutorialCID is a sample v1 CID for use in tutorial examples. TutorialCID = "bafybeie7m2fsbt6sjtn7tymyb6sim7iiyz6szl4ethtn7anzx4frzfzipu" )
const ( FlagJSON = "json" FlagVerbose = "verbose" FlagQuiet = "quiet" FlagUnmask = "unmask" )
Global/Output flags
const ( FlagAuthToken = "auth-token" FlagEmail = "email" FlagPassword = "password" FlagFirstName = "first-name" FlagLastName = "last-name" FlagOTPCode = "otp-code" FlagKeyName = "key-name" FlagNoCreateKey = "no-create-key" FlagForce = "force" FlagToken = "token" FlagOTP = "otp" )
Authentication flags
const ( FlagName = "name" FlagWait = "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" )
Operation flags
const ( FlagDomain = "domain" FlagTargetHash = "target-hash" FlagTargetType = "target-type" FlagDNSHosting = "dns-hosting" FlagNoDNSHosting = "no-dns-hosting" )
Websites flags
const ( FlagZoneID = "zone-id" FlagNameservers = "nameservers" FlagContent = "content" FlagType = "type" FlagTTL = "ttl" FlagDisabled = "disabled" )
DNS flags
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" )
Admin command flags
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" CmdAdmin = "admin" CmdSync = "sync" CmdSyncAll = "sync-all" )
Admin command name constants
const ( DryRunOptionName = "Name" DryRunOptionWait = "Wait for completion" DryRunOptionParallel = "Parallel operations" DryRunOptionContinueOnError = "Continue on error" DryRunOptionConfirm = "Confirmation required" DryRunOptionInputType = "Input type" DryRunOptionPath = "Path" DryRunOptionMemoryLimit = "Memory limit" DryRunOptionCID = "CID" DryRunOptionAction = "Action" DryRunOptionKey = "Key" DryRunOptionCurrentValue = "Current value" DryRunOptionNewValue = "New value" DryRunOptionDescription = "Description" )
Dry run option key constants
const ConfigValueNotSet = "(not set)"
Sentinel constant for unset configuration values
const DefaultUploadLimit = 100 * units.MiB
DefaultUploadLimit is the default upload limit in bytes (100MB).
const (
FlagSecure = "secure"
)
Connection/Config flags
Variables ¶
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") // Upload errors ErrUploadFailed = errors.New("upload failed") ErrUploadInterrupted = errors.New("upload interrupted") // 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") )
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 ¶
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 BuildTutorialCommandsTable ¶
BuildTutorialCommandsTable returns headers and rows for displaying tutorial commands.
func BuildTutorialExamplesTable ¶
BuildTutorialExamplesTable returns headers and rows for displaying tutorial examples.
func ConfirmFlag ¶
ConfirmFlag returns a flag to skip confirmation prompts.
func ContentFlag ¶
func ContentFlag() *cli.StringFlag
ContentFlag returns a flag for DNS record content.
func ContinueFlag ¶
ContinueFlag returns a flag to continue on error.
func DNSHostingFlag ¶
DNSHostingFlag returns a flag for enabling DNS hosting.
func DisabledFlag ¶
DisabledFlag returns a flag for disabling DNS records.
func DomainFlag ¶
func DomainFlag() *cli.StringFlag
DomainFlag returns a flag for the website domain.
func DryRunOption ¶
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 FormatCurrency ¶
func FormatCurrency(amount float64, code CurrencyCode) string
FormatCurrency formats an amount with the given currency code.
func FormatError ¶
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 GetAuthToken ¶
GetAuthToken returns the auth token from command flag, environment variable, or config (in that order).
func GetJWTPurpose ¶
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 ¶
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 ¶
GlobalFlags returns flags that are available to all commands.
func MemoryLimitFlag ¶
func MemoryLimitFlag() *cli.Uint64Flag
MemoryLimitFlag returns a flag for setting the memory limit for CAR generation.
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 ¶
NewRootCommand creates and returns the root CLI command.
func NoDNSHostingFlag ¶
NoDNSHostingFlag returns a flag for disabling DNS hosting.
func ParallelFlag ¶
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 SecureFlag ¶
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 TargetHashFlag ¶
func TargetHashFlag() *cli.StringFlag
TargetHashFlag returns a flag for the target CID.
func TargetTypeFlag ¶
func TargetTypeFlag() *cli.StringFlag
TargetTypeFlag returns a flag for the target type.
func WithTutorial ¶
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 ¶
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 ¶
WrapFileError wraps file-related errors with context about what operation failed.
func WrapNetworkError ¶
WrapNetworkError wraps errors with network troubleshooting hints.
Types ¶
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)
}
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) 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.
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 AuthStep ¶
type AuthStep struct{}
AuthStep handles authentication setup.
func (*AuthStep) Execute ¶
func (s *AuthStep) Execute(ctx context.Context, wizard *SetupWizard) error
func (*AuthStep) ShouldSkip ¶
func (s *AuthStep) ShouldSkip(wizard *SetupWizard) bool
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 ¶
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 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 CompletionStep ¶
type CompletionStep struct{}
CompletionStep offers to enable shell completion.
func (*CompletionStep) Execute ¶
func (s *CompletionStep) Execute(ctx context.Context, wizard *SetupWizard) error
func (*CompletionStep) Name ¶
func (s *CompletionStep) Name() string
func (*CompletionStep) ShouldSkip ¶
func (s *CompletionStep) ShouldSkip(wizard *SetupWizard) bool
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 ¶
ConfigManagerFactory creates a config manager for testing.
type ConfigStep ¶
type ConfigStep struct{}
ConfigStep handles configuration setup.
func (*ConfigStep) Execute ¶
func (s *ConfigStep) Execute(ctx context.Context, wizard *SetupWizard) error
func (*ConfigStep) Name ¶
func (s *ConfigStep) Name() string
func (*ConfigStep) ShouldSkip ¶
func (s *ConfigStep) ShouldSkip(wizard *SetupWizard) bool
type ConfigStepChoice ¶
type ConfigStepChoice int
ConfigStepChoice represents user's choice for configuration step.
const ( ConfigChoiceUseDefaults ConfigStepChoice = iota ConfigChoiceCustomEndpoint ConfigChoiceSkip )
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.
type CurrencyCode ¶
type CurrencyCode string
CurrencyCode represents an ISO 4217 currency code.
const (
USD CurrencyCode = "USD"
)
Currency constants for ISO 4217 codes.
type CustomConfig ¶
CustomConfig represents custom configuration values.
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
// 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) DNSService
NewDNSService creates a new DNSService instance with the provided configuration.
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 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 FieldGroup ¶
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 IPNSService ¶
type IPNSService interface {
// ListKeys retrieves all IPNS keys for the authenticated user.
ListKeys(ctx context.Context) ([]ipfs.IPNSKeyResponse, error)
// CreateKey generates a new IPNS key with the given name.
CreateKey(ctx context.Context, name string, key *string) (*ipfs.IPNSKeyResponse, error)
// GetKey retrieves a specific IPNS key by its ID.
GetKey(ctx context.Context, id string) (*ipfs.IPNSKeyResponse, error)
// DeleteKey removes an IPNS key by its ID.
DeleteKey(ctx context.Context, id string) error
// Publish publishes a CID to an IPNS key.
Publish(ctx context.Context, cid string, keyId int, ttl *string) (*ipfs.IPNSPublishResponse, error)
// Resolve resolves an IPNS name to its target CID.
Resolve(ctx context.Context, name string) (*ipfs.IPNSResolveResponse, error)
// RequireAuthenticated checks if the service is authenticated.
RequireAuthenticated() error
}
IPNSService defines the interface for IPNS operations in the CLI layer.
func NewIPNSService ¶
func NewIPNSService(cfgMgr config.Manager, output Output, apiEndpoint string) IPNSService
NewIPNSService creates a new IPNSService instance.
type IPNSServiceFactory ¶
type IPNSServiceFactory func(cfgMgr config.Manager, output Output) IPNSService
IPNSServiceFactory creates an IPNSService with dependencies.
type LimitsInfo ¶
LimitsInfo contains resource limits information
type MockAuthPrompter ¶
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 (_m *MockAuthPrompter) EXPECT() *MockAuthPrompter_Expecter
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 ¶
func (_e *MockAuthPrompter_Expecter) PromptEmail() *MockAuthPrompter_PromptEmail_Call
PromptEmail is a helper method to define mock.On call
func (*MockAuthPrompter_Expecter) PromptOTP ¶
func (_e *MockAuthPrompter_Expecter) PromptOTP() *MockAuthPrompter_PromptOTP_Call
PromptOTP is a helper method to define mock.On call
func (*MockAuthPrompter_Expecter) PromptPassword ¶
func (_e *MockAuthPrompter_Expecter) PromptPassword() *MockAuthPrompter_PromptPassword_Call
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 ¶
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 (_c *MockAuthPrompter_Password_Call) Return(s string, err error) *MockAuthPrompter_Password_Call
func (*MockAuthPrompter_Password_Call) Run ¶
func (_c *MockAuthPrompter_Password_Call) Run(run func(label string)) *MockAuthPrompter_Password_Call
func (*MockAuthPrompter_Password_Call) RunAndReturn ¶
func (_c *MockAuthPrompter_Password_Call) RunAndReturn(run func(label string) (string, error)) *MockAuthPrompter_Password_Call
type MockAuthPrompter_PromptEmail_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 (_c *MockAuthPrompter_PromptEmail_Call) Return(s string, err error) *MockAuthPrompter_PromptEmail_Call
func (*MockAuthPrompter_PromptEmail_Call) Run ¶
func (_c *MockAuthPrompter_PromptEmail_Call) Run(run func()) *MockAuthPrompter_PromptEmail_Call
func (*MockAuthPrompter_PromptEmail_Call) RunAndReturn ¶
func (_c *MockAuthPrompter_PromptEmail_Call) RunAndReturn(run func() (string, error)) *MockAuthPrompter_PromptEmail_Call
type MockAuthPrompter_PromptOTP_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 (_c *MockAuthPrompter_PromptOTP_Call) Return(s string, err error) *MockAuthPrompter_PromptOTP_Call
func (*MockAuthPrompter_PromptOTP_Call) Run ¶
func (_c *MockAuthPrompter_PromptOTP_Call) Run(run func()) *MockAuthPrompter_PromptOTP_Call
func (*MockAuthPrompter_PromptOTP_Call) RunAndReturn ¶
func (_c *MockAuthPrompter_PromptOTP_Call) RunAndReturn(run func() (string, error)) *MockAuthPrompter_PromptOTP_Call
type MockAuthPrompter_PromptPassword_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 (_c *MockAuthPrompter_PromptPassword_Call) Return(s string, err error) *MockAuthPrompter_PromptPassword_Call
func (*MockAuthPrompter_PromptPassword_Call) Run ¶
func (_c *MockAuthPrompter_PromptPassword_Call) Run(run func()) *MockAuthPrompter_PromptPassword_Call
func (*MockAuthPrompter_PromptPassword_Call) RunAndReturn ¶
func (_c *MockAuthPrompter_PromptPassword_Call) RunAndReturn(run func() (string, error)) *MockAuthPrompter_PromptPassword_Call
type MockAuthPrompter_PromptString_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 (_c *MockAuthPrompter_PromptString_Call) Return(s string, err error) *MockAuthPrompter_PromptString_Call
func (*MockAuthPrompter_PromptString_Call) Run ¶
func (_c *MockAuthPrompter_PromptString_Call) Run(run func(label string)) *MockAuthPrompter_PromptString_Call
func (*MockAuthPrompter_PromptString_Call) RunAndReturn ¶
func (_c *MockAuthPrompter_PromptString_Call) RunAndReturn(run func(label string) (string, error)) *MockAuthPrompter_PromptString_Call
type MockAuthService ¶
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 (_m *MockAuthService) EXPECT() *MockAuthService_Expecter
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) 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
type MockAuthService_CompleteLogin_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 (_c *MockAuthService_CompleteLogin_Call) Return(err error) *MockAuthService_CompleteLogin_Call
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 ¶
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 (_c *MockAuthService_DisableOTP_Call) Return(err error) *MockAuthService_DisableOTP_Call
func (*MockAuthService_DisableOTP_Call) Run ¶
func (_c *MockAuthService_DisableOTP_Call) Run(run func(ctx context.Context, password string)) *MockAuthService_DisableOTP_Call
func (*MockAuthService_DisableOTP_Call) RunAndReturn ¶
func (_c *MockAuthService_DisableOTP_Call) RunAndReturn(run func(ctx context.Context, password string) error) *MockAuthService_DisableOTP_Call
type MockAuthService_EnableOTP_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 (_c *MockAuthService_EnableOTP_Call) Return(err error) *MockAuthService_EnableOTP_Call
func (*MockAuthService_EnableOTP_Call) Run ¶
func (_c *MockAuthService_EnableOTP_Call) Run(run func(ctx context.Context, otpCode string)) *MockAuthService_EnableOTP_Call
func (*MockAuthService_EnableOTP_Call) RunAndReturn ¶
func (_c *MockAuthService_EnableOTP_Call) RunAndReturn(run func(ctx context.Context, otpCode string) error) *MockAuthService_EnableOTP_Call
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 ¶
func (_e *MockAuthService_Expecter) GetAPIEndpoint() *MockAuthService_GetAPIEndpoint_Call
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) 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 ¶
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 (_c *MockAuthService_GetAPIEndpoint_Call) Return(s string) *MockAuthService_GetAPIEndpoint_Call
func (*MockAuthService_GetAPIEndpoint_Call) Run ¶
func (_c *MockAuthService_GetAPIEndpoint_Call) Run(run func()) *MockAuthService_GetAPIEndpoint_Call
func (*MockAuthService_GetAPIEndpoint_Call) RunAndReturn ¶
func (_c *MockAuthService_GetAPIEndpoint_Call) RunAndReturn(run func() string) *MockAuthService_GetAPIEndpoint_Call
type MockAuthService_GetAuthenticatedClient_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 (_c *MockAuthService_GetAuthenticatedClient_Call) Return(accountAPI account.AccountAPI, err error) *MockAuthService_GetAuthenticatedClient_Call
func (*MockAuthService_GetAuthenticatedClient_Call) Run ¶
func (_c *MockAuthService_GetAuthenticatedClient_Call) Run(run func(ctx context.Context)) *MockAuthService_GetAuthenticatedClient_Call
func (*MockAuthService_GetAuthenticatedClient_Call) RunAndReturn ¶
func (_c *MockAuthService_GetAuthenticatedClient_Call) RunAndReturn(run func(ctx context.Context) (account.AccountAPI, error)) *MockAuthService_GetAuthenticatedClient_Call
type MockAuthService_LoginCheck_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 (_c *MockAuthService_LoginCheck_Call) Run(run func(ctx context.Context, email string, password string)) *MockAuthService_LoginCheck_Call
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 ¶
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 (_c *MockAuthService_LoginWithOTP_Call) Return(err error) *MockAuthService_LoginWithOTP_Call
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 ¶
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 (_c *MockAuthService_Register_Call) Return(err error) *MockAuthService_Register_Call
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 ¶
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 (_c *MockAuthService_SaveToken_Call) Return(err error) *MockAuthService_SaveToken_Call
func (*MockAuthService_SaveToken_Call) Run ¶
func (_c *MockAuthService_SaveToken_Call) Run(run func(token string)) *MockAuthService_SaveToken_Call
func (*MockAuthService_SaveToken_Call) RunAndReturn ¶
func (_c *MockAuthService_SaveToken_Call) RunAndReturn(run func(token string) error) *MockAuthService_SaveToken_Call
type MockAuthService_Status_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 (_c *MockAuthService_Status_Call) Return(err error) *MockAuthService_Status_Call
func (*MockAuthService_Status_Call) Run ¶
func (_c *MockAuthService_Status_Call) Run(run func(ctx context.Context)) *MockAuthService_Status_Call
func (*MockAuthService_Status_Call) RunAndReturn ¶
func (_c *MockAuthService_Status_Call) RunAndReturn(run func(ctx context.Context) error) *MockAuthService_Status_Call
type MockBillingAdminService ¶
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 ¶
func (_mock *MockBillingAdminService) CreateCredit(ctx context.Context, req *admin.CreditCreateRequest) (*admin.Credit, error)
CreateCredit provides a mock function for the type MockBillingAdminService
func (*MockBillingAdminService) CreatePriceLine ¶
func (_mock *MockBillingAdminService) CreatePriceLine(ctx context.Context, req *admin.PriceLineCreateRequest) (*admin.PriceLine, error)
CreatePriceLine provides a mock function for the type MockBillingAdminService
func (*MockBillingAdminService) CreatePricingPlan ¶
func (_mock *MockBillingAdminService) CreatePricingPlan(ctx context.Context, req *admin.PricingPlanCreateRequest) (*admin.PricingPlan, error)
CreatePricingPlan provides a mock function for the type MockBillingAdminService
func (*MockBillingAdminService) CreatePricingPlanPeriod ¶
func (_mock *MockBillingAdminService) CreatePricingPlanPeriod(ctx context.Context, req *admin.PricingPlanPeriodCreateRequest) (*admin.PricingPlanPeriod, error)
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 (_m *MockBillingAdminService) EXPECT() *MockBillingAdminService_Expecter
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 ¶
func (_mock *MockBillingAdminService) GetUserDeletedCredits(ctx context.Context, userID string, params *admin.GetApiBillingUsersUserIdDeletedCreditsParams) ([]*admin.CreditItem, int, error)
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 ¶
func (_mock *MockBillingAdminService) ListCredits(ctx context.Context, params *admin.GetApiBillingCreditsParams) ([]*admin.CreditItem, int, error)
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 ¶
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 (_c *MockBillingAdminService_AbortUserSubscriptionCancellation_Call) Return(managementResult *admin.ManagementResult, err error) *MockBillingAdminService_AbortUserSubscriptionCancellation_Call
func (*MockBillingAdminService_AbortUserSubscriptionCancellation_Call) Run ¶
func (_c *MockBillingAdminService_AbortUserSubscriptionCancellation_Call) Run(run func(ctx context.Context, userID string)) *MockBillingAdminService_AbortUserSubscriptionCancellation_Call
func (*MockBillingAdminService_AbortUserSubscriptionCancellation_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_AbortUserSubscriptionCancellation_Call) RunAndReturn(run func(ctx context.Context, userID string) (*admin.ManagementResult, error)) *MockBillingAdminService_AbortUserSubscriptionCancellation_Call
type MockBillingAdminService_AddPlanToPriceLine_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 (_c *MockBillingAdminService_AddPlanToPriceLine_Call) Return(priceLineDetailResponse *admin.PriceLineDetailResponse, err error) *MockBillingAdminService_AddPlanToPriceLine_Call
func (*MockBillingAdminService_AddPlanToPriceLine_Call) Run ¶
func (_c *MockBillingAdminService_AddPlanToPriceLine_Call) Run(run func(ctx context.Context, priceLineID string, req *admin.AddPlanToPriceLineRequest)) *MockBillingAdminService_AddPlanToPriceLine_Call
func (*MockBillingAdminService_AddPlanToPriceLine_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_AddPlanToPriceLine_Call) RunAndReturn(run func(ctx context.Context, priceLineID string, req *admin.AddPlanToPriceLineRequest) (*admin.PriceLineDetailResponse, error)) *MockBillingAdminService_AddPlanToPriceLine_Call
type MockBillingAdminService_CancelUserSubscription_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 (_c *MockBillingAdminService_CancelUserSubscription_Call) Return(managementResult *admin.ManagementResult, err error) *MockBillingAdminService_CancelUserSubscription_Call
func (*MockBillingAdminService_CancelUserSubscription_Call) Run ¶
func (_c *MockBillingAdminService_CancelUserSubscription_Call) Run(run func(ctx context.Context, userID string, req *admin.CancelSubscriptionRequest)) *MockBillingAdminService_CancelUserSubscription_Call
func (*MockBillingAdminService_CancelUserSubscription_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_CancelUserSubscription_Call) RunAndReturn(run func(ctx context.Context, userID string, req *admin.CancelSubscriptionRequest) (*admin.ManagementResult, error)) *MockBillingAdminService_CancelUserSubscription_Call
type MockBillingAdminService_ChangeUserPlan_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 (_c *MockBillingAdminService_ChangeUserPlan_Call) Return(planChangeResult *admin.PlanChangeResult, err error) *MockBillingAdminService_ChangeUserPlan_Call
func (*MockBillingAdminService_ChangeUserPlan_Call) Run ¶
func (_c *MockBillingAdminService_ChangeUserPlan_Call) Run(run func(ctx context.Context, userID string, req *admin.ChangePlanRequest)) *MockBillingAdminService_ChangeUserPlan_Call
func (*MockBillingAdminService_ChangeUserPlan_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_ChangeUserPlan_Call) RunAndReturn(run func(ctx context.Context, userID string, req *admin.ChangePlanRequest) (*admin.PlanChangeResult, error)) *MockBillingAdminService_ChangeUserPlan_Call
type MockBillingAdminService_CreateCredit_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 (_c *MockBillingAdminService_CreateCredit_Call) Return(credit *admin.Credit, err error) *MockBillingAdminService_CreateCredit_Call
func (*MockBillingAdminService_CreateCredit_Call) Run ¶
func (_c *MockBillingAdminService_CreateCredit_Call) Run(run func(ctx context.Context, req *admin.CreditCreateRequest)) *MockBillingAdminService_CreateCredit_Call
func (*MockBillingAdminService_CreateCredit_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_CreateCredit_Call) RunAndReturn(run func(ctx context.Context, req *admin.CreditCreateRequest) (*admin.Credit, error)) *MockBillingAdminService_CreateCredit_Call
type MockBillingAdminService_CreatePriceLine_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 (_c *MockBillingAdminService_CreatePriceLine_Call) Return(priceLine *admin.PriceLine, err error) *MockBillingAdminService_CreatePriceLine_Call
func (*MockBillingAdminService_CreatePriceLine_Call) Run ¶
func (_c *MockBillingAdminService_CreatePriceLine_Call) Run(run func(ctx context.Context, req *admin.PriceLineCreateRequest)) *MockBillingAdminService_CreatePriceLine_Call
func (*MockBillingAdminService_CreatePriceLine_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_CreatePriceLine_Call) RunAndReturn(run func(ctx context.Context, req *admin.PriceLineCreateRequest) (*admin.PriceLine, error)) *MockBillingAdminService_CreatePriceLine_Call
type MockBillingAdminService_CreatePricingPlanPeriod_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 (_c *MockBillingAdminService_CreatePricingPlanPeriod_Call) Return(pricingPlanPeriod *admin.PricingPlanPeriod, err error) *MockBillingAdminService_CreatePricingPlanPeriod_Call
func (*MockBillingAdminService_CreatePricingPlanPeriod_Call) Run ¶
func (_c *MockBillingAdminService_CreatePricingPlanPeriod_Call) Run(run func(ctx context.Context, req *admin.PricingPlanPeriodCreateRequest)) *MockBillingAdminService_CreatePricingPlanPeriod_Call
func (*MockBillingAdminService_CreatePricingPlanPeriod_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_CreatePricingPlanPeriod_Call) RunAndReturn(run func(ctx context.Context, req *admin.PricingPlanPeriodCreateRequest) (*admin.PricingPlanPeriod, error)) *MockBillingAdminService_CreatePricingPlanPeriod_Call
type MockBillingAdminService_CreatePricingPlan_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 (_c *MockBillingAdminService_CreatePricingPlan_Call) Return(pricingPlan *admin.PricingPlan, err error) *MockBillingAdminService_CreatePricingPlan_Call
func (*MockBillingAdminService_CreatePricingPlan_Call) Run ¶
func (_c *MockBillingAdminService_CreatePricingPlan_Call) Run(run func(ctx context.Context, req *admin.PricingPlanCreateRequest)) *MockBillingAdminService_CreatePricingPlan_Call
func (*MockBillingAdminService_CreatePricingPlan_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_CreatePricingPlan_Call) RunAndReturn(run func(ctx context.Context, req *admin.PricingPlanCreateRequest) (*admin.PricingPlan, error)) *MockBillingAdminService_CreatePricingPlan_Call
type MockBillingAdminService_DeleteCredit_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 (_c *MockBillingAdminService_DeleteCredit_Call) Return(err error) *MockBillingAdminService_DeleteCredit_Call
func (*MockBillingAdminService_DeleteCredit_Call) Run ¶
func (_c *MockBillingAdminService_DeleteCredit_Call) Run(run func(ctx context.Context, creditID string)) *MockBillingAdminService_DeleteCredit_Call
func (*MockBillingAdminService_DeleteCredit_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_DeleteCredit_Call) RunAndReturn(run func(ctx context.Context, creditID string) error) *MockBillingAdminService_DeleteCredit_Call
type MockBillingAdminService_DeletePlanFromPriceLine_Call ¶
MockBillingAdminService_DeletePlanFromPriceLine_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePlanFromPriceLine'
func (*MockBillingAdminService_DeletePlanFromPriceLine_Call) Run ¶
func (_c *MockBillingAdminService_DeletePlanFromPriceLine_Call) Run(run func(ctx context.Context, priceLineID string, planID string)) *MockBillingAdminService_DeletePlanFromPriceLine_Call
func (*MockBillingAdminService_DeletePlanFromPriceLine_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_DeletePlanFromPriceLine_Call) RunAndReturn(run func(ctx context.Context, priceLineID string, planID string) error) *MockBillingAdminService_DeletePlanFromPriceLine_Call
type MockBillingAdminService_DeletePriceLine_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 (_c *MockBillingAdminService_DeletePriceLine_Call) Return(err error) *MockBillingAdminService_DeletePriceLine_Call
func (*MockBillingAdminService_DeletePriceLine_Call) Run ¶
func (_c *MockBillingAdminService_DeletePriceLine_Call) Run(run func(ctx context.Context, priceLineID string)) *MockBillingAdminService_DeletePriceLine_Call
func (*MockBillingAdminService_DeletePriceLine_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_DeletePriceLine_Call) RunAndReturn(run func(ctx context.Context, priceLineID string) error) *MockBillingAdminService_DeletePriceLine_Call
type MockBillingAdminService_DeletePricingPlanPeriod_Call ¶
MockBillingAdminService_DeletePricingPlanPeriod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePricingPlanPeriod'
func (*MockBillingAdminService_DeletePricingPlanPeriod_Call) Run ¶
func (_c *MockBillingAdminService_DeletePricingPlanPeriod_Call) Run(run func(ctx context.Context, periodID string)) *MockBillingAdminService_DeletePricingPlanPeriod_Call
func (*MockBillingAdminService_DeletePricingPlanPeriod_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_DeletePricingPlanPeriod_Call) RunAndReturn(run func(ctx context.Context, periodID string) error) *MockBillingAdminService_DeletePricingPlanPeriod_Call
type MockBillingAdminService_DeletePricingPlan_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 (_c *MockBillingAdminService_DeletePricingPlan_Call) Return(err error) *MockBillingAdminService_DeletePricingPlan_Call
func (*MockBillingAdminService_DeletePricingPlan_Call) Run ¶
func (_c *MockBillingAdminService_DeletePricingPlan_Call) Run(run func(ctx context.Context, planID string)) *MockBillingAdminService_DeletePricingPlan_Call
func (*MockBillingAdminService_DeletePricingPlan_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_DeletePricingPlan_Call) RunAndReturn(run func(ctx context.Context, planID string) error) *MockBillingAdminService_DeletePricingPlan_Call
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 ¶
func (_e *MockBillingAdminService_Expecter) ListPriceLines(ctx interface{}) *MockBillingAdminService_ListPriceLines_Call
ListPriceLines is a helper method to define mock.On call
- ctx context.Context
func (*MockBillingAdminService_Expecter) ListPricingPlanPeriods ¶
func (_e *MockBillingAdminService_Expecter) ListPricingPlanPeriods(ctx interface{}) *MockBillingAdminService_ListPricingPlanPeriods_Call
ListPricingPlanPeriods is a helper method to define mock.On call
- ctx context.Context
func (*MockBillingAdminService_Expecter) ListPricingPlans ¶
func (_e *MockBillingAdminService_Expecter) ListPricingPlans(ctx interface{}) *MockBillingAdminService_ListPricingPlans_Call
ListPricingPlans is a helper method to define mock.On call
- ctx context.Context
func (*MockBillingAdminService_Expecter) ListSubscribers ¶
func (_e *MockBillingAdminService_Expecter) ListSubscribers(ctx interface{}) *MockBillingAdminService_ListSubscribers_Call
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 ¶
func (_e *MockBillingAdminService_Expecter) RequireAuthenticated() *MockBillingAdminService_RequireAuthenticated_Call
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 ¶
func (_e *MockBillingAdminService_Expecter) SyncAllPricingPlans(ctx interface{}) *MockBillingAdminService_SyncAllPricingPlans_Call
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 ¶
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 (_c *MockBillingAdminService_GetCredit_Call) Return(credit *admin.Credit, err error) *MockBillingAdminService_GetCredit_Call
func (*MockBillingAdminService_GetCredit_Call) Run ¶
func (_c *MockBillingAdminService_GetCredit_Call) Run(run func(ctx context.Context, creditID string)) *MockBillingAdminService_GetCredit_Call
func (*MockBillingAdminService_GetCredit_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_GetCredit_Call) RunAndReturn(run func(ctx context.Context, creditID string) (*admin.Credit, error)) *MockBillingAdminService_GetCredit_Call
type MockBillingAdminService_GetPriceLine_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 (_c *MockBillingAdminService_GetPriceLine_Call) Return(priceLineDetailResponse *admin.PriceLineDetailResponse, err error) *MockBillingAdminService_GetPriceLine_Call
func (*MockBillingAdminService_GetPriceLine_Call) Run ¶
func (_c *MockBillingAdminService_GetPriceLine_Call) Run(run func(ctx context.Context, priceLineID string)) *MockBillingAdminService_GetPriceLine_Call
func (*MockBillingAdminService_GetPriceLine_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_GetPriceLine_Call) RunAndReturn(run func(ctx context.Context, priceLineID string) (*admin.PriceLineDetailResponse, error)) *MockBillingAdminService_GetPriceLine_Call
type MockBillingAdminService_GetPricingPlanPeriod_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 (_c *MockBillingAdminService_GetPricingPlanPeriod_Call) Return(pricingPlanPeriod *admin.PricingPlanPeriod, err error) *MockBillingAdminService_GetPricingPlanPeriod_Call
func (*MockBillingAdminService_GetPricingPlanPeriod_Call) Run ¶
func (_c *MockBillingAdminService_GetPricingPlanPeriod_Call) Run(run func(ctx context.Context, periodID string)) *MockBillingAdminService_GetPricingPlanPeriod_Call
func (*MockBillingAdminService_GetPricingPlanPeriod_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_GetPricingPlanPeriod_Call) RunAndReturn(run func(ctx context.Context, periodID string) (*admin.PricingPlanPeriod, error)) *MockBillingAdminService_GetPricingPlanPeriod_Call
type MockBillingAdminService_GetPricingPlan_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 (_c *MockBillingAdminService_GetPricingPlan_Call) Return(pricingPlan *admin.PricingPlan, err error) *MockBillingAdminService_GetPricingPlan_Call
func (*MockBillingAdminService_GetPricingPlan_Call) Run ¶
func (_c *MockBillingAdminService_GetPricingPlan_Call) Run(run func(ctx context.Context, planID string)) *MockBillingAdminService_GetPricingPlan_Call
func (*MockBillingAdminService_GetPricingPlan_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_GetPricingPlan_Call) RunAndReturn(run func(ctx context.Context, planID string) (*admin.PricingPlan, error)) *MockBillingAdminService_GetPricingPlan_Call
type MockBillingAdminService_GetSubscriber_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 (_c *MockBillingAdminService_GetSubscriber_Call) Return(subscriber *admin.Subscriber, err error) *MockBillingAdminService_GetSubscriber_Call
func (*MockBillingAdminService_GetSubscriber_Call) Run ¶
func (_c *MockBillingAdminService_GetSubscriber_Call) Run(run func(ctx context.Context, subscriberID string)) *MockBillingAdminService_GetSubscriber_Call
func (*MockBillingAdminService_GetSubscriber_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_GetSubscriber_Call) RunAndReturn(run func(ctx context.Context, subscriberID string) (*admin.Subscriber, error)) *MockBillingAdminService_GetSubscriber_Call
type MockBillingAdminService_GetUserBalance_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 (_c *MockBillingAdminService_GetUserBalance_Call) Return(userBalance *admin.UserBalance, err error) *MockBillingAdminService_GetUserBalance_Call
func (*MockBillingAdminService_GetUserBalance_Call) Run ¶
func (_c *MockBillingAdminService_GetUserBalance_Call) Run(run func(ctx context.Context, userID string)) *MockBillingAdminService_GetUserBalance_Call
func (*MockBillingAdminService_GetUserBalance_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_GetUserBalance_Call) RunAndReturn(run func(ctx context.Context, userID string) (*admin.UserBalance, error)) *MockBillingAdminService_GetUserBalance_Call
type MockBillingAdminService_GetUserDeletedCredits_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 (_c *MockBillingAdminService_GetUserDeletedCredits_Call) Return(creditItems []*admin.CreditItem, n int, err error) *MockBillingAdminService_GetUserDeletedCredits_Call
func (*MockBillingAdminService_GetUserDeletedCredits_Call) Run ¶
func (_c *MockBillingAdminService_GetUserDeletedCredits_Call) Run(run func(ctx context.Context, userID string, params *admin.GetApiBillingUsersUserIdDeletedCreditsParams)) *MockBillingAdminService_GetUserDeletedCredits_Call
func (*MockBillingAdminService_GetUserDeletedCredits_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_GetUserDeletedCredits_Call) RunAndReturn(run func(ctx context.Context, userID string, params *admin.GetApiBillingUsersUserIdDeletedCreditsParams) ([]*admin.CreditItem, int, error)) *MockBillingAdminService_GetUserDeletedCredits_Call
type MockBillingAdminService_GetUserSubscribers_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 (_c *MockBillingAdminService_GetUserSubscribers_Call) Return(subscribers []*admin.Subscriber, n int, err error) *MockBillingAdminService_GetUserSubscribers_Call
func (*MockBillingAdminService_GetUserSubscribers_Call) Run ¶
func (_c *MockBillingAdminService_GetUserSubscribers_Call) Run(run func(ctx context.Context, userID string)) *MockBillingAdminService_GetUserSubscribers_Call
func (*MockBillingAdminService_GetUserSubscribers_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_GetUserSubscribers_Call) RunAndReturn(run func(ctx context.Context, userID string) ([]*admin.Subscriber, int, error)) *MockBillingAdminService_GetUserSubscribers_Call
type MockBillingAdminService_ListCredits_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 (_c *MockBillingAdminService_ListCredits_Call) Return(creditItems []*admin.CreditItem, n int, err error) *MockBillingAdminService_ListCredits_Call
func (*MockBillingAdminService_ListCredits_Call) Run ¶
func (_c *MockBillingAdminService_ListCredits_Call) Run(run func(ctx context.Context, params *admin.GetApiBillingCreditsParams)) *MockBillingAdminService_ListCredits_Call
func (*MockBillingAdminService_ListCredits_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_ListCredits_Call) RunAndReturn(run func(ctx context.Context, params *admin.GetApiBillingCreditsParams) ([]*admin.CreditItem, int, error)) *MockBillingAdminService_ListCredits_Call
type MockBillingAdminService_ListGatewaySubscribers_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 (_c *MockBillingAdminService_ListGatewaySubscribers_Call) Return(subscribers []*admin.Subscriber, n int, err error) *MockBillingAdminService_ListGatewaySubscribers_Call
func (*MockBillingAdminService_ListGatewaySubscribers_Call) Run ¶
func (_c *MockBillingAdminService_ListGatewaySubscribers_Call) Run(run func(ctx context.Context, gatewayID string)) *MockBillingAdminService_ListGatewaySubscribers_Call
func (*MockBillingAdminService_ListGatewaySubscribers_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_ListGatewaySubscribers_Call) RunAndReturn(run func(ctx context.Context, gatewayID string) ([]*admin.Subscriber, int, error)) *MockBillingAdminService_ListGatewaySubscribers_Call
type MockBillingAdminService_ListPriceLines_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 (_c *MockBillingAdminService_ListPriceLines_Call) Return(priceLines []*admin.PriceLine, n int, err error) *MockBillingAdminService_ListPriceLines_Call
func (*MockBillingAdminService_ListPriceLines_Call) Run ¶
func (_c *MockBillingAdminService_ListPriceLines_Call) Run(run func(ctx context.Context)) *MockBillingAdminService_ListPriceLines_Call
func (*MockBillingAdminService_ListPriceLines_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_ListPriceLines_Call) RunAndReturn(run func(ctx context.Context) ([]*admin.PriceLine, int, error)) *MockBillingAdminService_ListPriceLines_Call
type MockBillingAdminService_ListPricingPlanPeriods_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 (_c *MockBillingAdminService_ListPricingPlanPeriods_Call) Return(pricingPlanPeriods []*admin.PricingPlanPeriod, n int, err error) *MockBillingAdminService_ListPricingPlanPeriods_Call
func (*MockBillingAdminService_ListPricingPlanPeriods_Call) Run ¶
func (_c *MockBillingAdminService_ListPricingPlanPeriods_Call) Run(run func(ctx context.Context)) *MockBillingAdminService_ListPricingPlanPeriods_Call
func (*MockBillingAdminService_ListPricingPlanPeriods_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_ListPricingPlanPeriods_Call) RunAndReturn(run func(ctx context.Context) ([]*admin.PricingPlanPeriod, int, error)) *MockBillingAdminService_ListPricingPlanPeriods_Call
type MockBillingAdminService_ListPricingPlans_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 (_c *MockBillingAdminService_ListPricingPlans_Call) Return(pricingPlanItems []*admin.PricingPlanItem, n int, err error) *MockBillingAdminService_ListPricingPlans_Call
func (*MockBillingAdminService_ListPricingPlans_Call) Run ¶
func (_c *MockBillingAdminService_ListPricingPlans_Call) Run(run func(ctx context.Context)) *MockBillingAdminService_ListPricingPlans_Call
func (*MockBillingAdminService_ListPricingPlans_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_ListPricingPlans_Call) RunAndReturn(run func(ctx context.Context) ([]*admin.PricingPlanItem, int, error)) *MockBillingAdminService_ListPricingPlans_Call
type MockBillingAdminService_ListSubscribers_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 (_c *MockBillingAdminService_ListSubscribers_Call) Return(subscribers []*admin.Subscriber, n int, err error) *MockBillingAdminService_ListSubscribers_Call
func (*MockBillingAdminService_ListSubscribers_Call) Run ¶
func (_c *MockBillingAdminService_ListSubscribers_Call) Run(run func(ctx context.Context)) *MockBillingAdminService_ListSubscribers_Call
func (*MockBillingAdminService_ListSubscribers_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_ListSubscribers_Call) RunAndReturn(run func(ctx context.Context) ([]*admin.Subscriber, int, error)) *MockBillingAdminService_ListSubscribers_Call
type MockBillingAdminService_PauseUserSubscription_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 (_c *MockBillingAdminService_PauseUserSubscription_Call) Return(managementResult *admin.ManagementResult, err error) *MockBillingAdminService_PauseUserSubscription_Call
func (*MockBillingAdminService_PauseUserSubscription_Call) Run ¶
func (_c *MockBillingAdminService_PauseUserSubscription_Call) Run(run func(ctx context.Context, userID string)) *MockBillingAdminService_PauseUserSubscription_Call
func (*MockBillingAdminService_PauseUserSubscription_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_PauseUserSubscription_Call) RunAndReturn(run func(ctx context.Context, userID string) (*admin.ManagementResult, error)) *MockBillingAdminService_PauseUserSubscription_Call
type MockBillingAdminService_PurgeCredits_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 (_c *MockBillingAdminService_PurgeCredits_Call) Return(n int, err error) *MockBillingAdminService_PurgeCredits_Call
func (*MockBillingAdminService_PurgeCredits_Call) Run ¶
func (_c *MockBillingAdminService_PurgeCredits_Call) Run(run func(ctx context.Context, req *admin.CreditPurgeRequest)) *MockBillingAdminService_PurgeCredits_Call
func (*MockBillingAdminService_PurgeCredits_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_PurgeCredits_Call) RunAndReturn(run func(ctx context.Context, req *admin.CreditPurgeRequest) (int, error)) *MockBillingAdminService_PurgeCredits_Call
type MockBillingAdminService_RequireAuthenticated_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 (_c *MockBillingAdminService_RequireAuthenticated_Call) Return(err error) *MockBillingAdminService_RequireAuthenticated_Call
func (*MockBillingAdminService_RequireAuthenticated_Call) Run ¶
func (_c *MockBillingAdminService_RequireAuthenticated_Call) Run(run func()) *MockBillingAdminService_RequireAuthenticated_Call
func (*MockBillingAdminService_RequireAuthenticated_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_RequireAuthenticated_Call) RunAndReturn(run func() error) *MockBillingAdminService_RequireAuthenticated_Call
type MockBillingAdminService_RestoreCredit_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 (_c *MockBillingAdminService_RestoreCredit_Call) Return(credit *admin.Credit, err error) *MockBillingAdminService_RestoreCredit_Call
func (*MockBillingAdminService_RestoreCredit_Call) Run ¶
func (_c *MockBillingAdminService_RestoreCredit_Call) Run(run func(ctx context.Context, creditID string)) *MockBillingAdminService_RestoreCredit_Call
func (*MockBillingAdminService_RestoreCredit_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_RestoreCredit_Call) RunAndReturn(run func(ctx context.Context, creditID string) (*admin.Credit, error)) *MockBillingAdminService_RestoreCredit_Call
type MockBillingAdminService_ResumeUserSubscription_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 (_c *MockBillingAdminService_ResumeUserSubscription_Call) Return(managementResult *admin.ManagementResult, err error) *MockBillingAdminService_ResumeUserSubscription_Call
func (*MockBillingAdminService_ResumeUserSubscription_Call) Run ¶
func (_c *MockBillingAdminService_ResumeUserSubscription_Call) Run(run func(ctx context.Context, userID string)) *MockBillingAdminService_ResumeUserSubscription_Call
func (*MockBillingAdminService_ResumeUserSubscription_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_ResumeUserSubscription_Call) RunAndReturn(run func(ctx context.Context, userID string) (*admin.ManagementResult, error)) *MockBillingAdminService_ResumeUserSubscription_Call
type MockBillingAdminService_SyncAllPricingPlans_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 (_c *MockBillingAdminService_SyncAllPricingPlans_Call) Return(err error) *MockBillingAdminService_SyncAllPricingPlans_Call
func (*MockBillingAdminService_SyncAllPricingPlans_Call) Run ¶
func (_c *MockBillingAdminService_SyncAllPricingPlans_Call) Run(run func(ctx context.Context)) *MockBillingAdminService_SyncAllPricingPlans_Call
func (*MockBillingAdminService_SyncAllPricingPlans_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_SyncAllPricingPlans_Call) RunAndReturn(run func(ctx context.Context) error) *MockBillingAdminService_SyncAllPricingPlans_Call
type MockBillingAdminService_SyncPricingPlan_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 (_c *MockBillingAdminService_SyncPricingPlan_Call) Return(err error) *MockBillingAdminService_SyncPricingPlan_Call
func (*MockBillingAdminService_SyncPricingPlan_Call) Run ¶
func (_c *MockBillingAdminService_SyncPricingPlan_Call) Run(run func(ctx context.Context, planID string)) *MockBillingAdminService_SyncPricingPlan_Call
func (*MockBillingAdminService_SyncPricingPlan_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_SyncPricingPlan_Call) RunAndReturn(run func(ctx context.Context, planID string) error) *MockBillingAdminService_SyncPricingPlan_Call
type MockBillingAdminService_UpdatePlanPosition_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 (_c *MockBillingAdminService_UpdatePlanPosition_Call) Return(priceLineDetailResponse *admin.PriceLineDetailResponse, err error) *MockBillingAdminService_UpdatePlanPosition_Call
func (*MockBillingAdminService_UpdatePlanPosition_Call) Run ¶
func (_c *MockBillingAdminService_UpdatePlanPosition_Call) Run(run func(ctx context.Context, priceLineID string, planID string, req *admin.UpdatePlanPositionRequest)) *MockBillingAdminService_UpdatePlanPosition_Call
func (*MockBillingAdminService_UpdatePlanPosition_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_UpdatePlanPosition_Call) RunAndReturn(run func(ctx context.Context, priceLineID string, planID string, req *admin.UpdatePlanPositionRequest) (*admin.PriceLineDetailResponse, error)) *MockBillingAdminService_UpdatePlanPosition_Call
type MockBillingAdminService_UpdatePriceLine_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 (_c *MockBillingAdminService_UpdatePriceLine_Call) Return(priceLine *admin.PriceLine, err error) *MockBillingAdminService_UpdatePriceLine_Call
func (*MockBillingAdminService_UpdatePriceLine_Call) Run ¶
func (_c *MockBillingAdminService_UpdatePriceLine_Call) Run(run func(ctx context.Context, priceLineID string, req *admin.PriceLineUpdateRequest)) *MockBillingAdminService_UpdatePriceLine_Call
func (*MockBillingAdminService_UpdatePriceLine_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_UpdatePriceLine_Call) RunAndReturn(run func(ctx context.Context, priceLineID string, req *admin.PriceLineUpdateRequest) (*admin.PriceLine, error)) *MockBillingAdminService_UpdatePriceLine_Call
type MockBillingAdminService_UpdatePricingPlanPeriod_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 (_c *MockBillingAdminService_UpdatePricingPlanPeriod_Call) Return(pricingPlanPeriod *admin.PricingPlanPeriod, err error) *MockBillingAdminService_UpdatePricingPlanPeriod_Call
func (*MockBillingAdminService_UpdatePricingPlanPeriod_Call) Run ¶
func (_c *MockBillingAdminService_UpdatePricingPlanPeriod_Call) Run(run func(ctx context.Context, periodID string, req *admin.PricingPlanPeriodUpdateRequest)) *MockBillingAdminService_UpdatePricingPlanPeriod_Call
func (*MockBillingAdminService_UpdatePricingPlanPeriod_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_UpdatePricingPlanPeriod_Call) RunAndReturn(run func(ctx context.Context, periodID string, req *admin.PricingPlanPeriodUpdateRequest) (*admin.PricingPlanPeriod, error)) *MockBillingAdminService_UpdatePricingPlanPeriod_Call
type MockBillingAdminService_UpdatePricingPlan_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 (_c *MockBillingAdminService_UpdatePricingPlan_Call) Return(pricingPlan *admin.PricingPlan, err error) *MockBillingAdminService_UpdatePricingPlan_Call
func (*MockBillingAdminService_UpdatePricingPlan_Call) Run ¶
func (_c *MockBillingAdminService_UpdatePricingPlan_Call) Run(run func(ctx context.Context, planID string, req *admin.PricingPlanUpdateRequest)) *MockBillingAdminService_UpdatePricingPlan_Call
func (*MockBillingAdminService_UpdatePricingPlan_Call) RunAndReturn ¶
func (_c *MockBillingAdminService_UpdatePricingPlan_Call) RunAndReturn(run func(ctx context.Context, planID string, req *admin.PricingPlanUpdateRequest) (*admin.PricingPlan, error)) *MockBillingAdminService_UpdatePricingPlan_Call
type MockPinningService ¶
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 (_m *MockPinningService) EXPECT() *MockPinningService_Expecter
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) 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
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 ¶
func (_e *MockPinningService_Expecter) RequireAuthenticated() *MockPinningService_RequireAuthenticated_Call
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) 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
type MockPinningService_List_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 (_c *MockPinningService_List_Call) Return(pins []Pin, err error) *MockPinningService_List_Call
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 ¶
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 (_c *MockPinningService_PinBatch_Call) Return(batchResult *BatchResult, err error) *MockPinningService_PinBatch_Call
func (*MockPinningService_PinBatch_Call) Run ¶
func (_c *MockPinningService_PinBatch_Call) Run(run func(ctx context.Context, cids []string, name string, opts BatchOptions)) *MockPinningService_PinBatch_Call
func (*MockPinningService_PinBatch_Call) RunAndReturn ¶
func (_c *MockPinningService_PinBatch_Call) RunAndReturn(run func(ctx context.Context, cids []string, name string, opts BatchOptions) (*BatchResult, error)) *MockPinningService_PinBatch_Call
type MockPinningService_Pin_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 (_c *MockPinningService_Pin_Call) Return(pinResult *PinResult, err error) *MockPinningService_Pin_Call
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 ¶
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 (_c *MockPinningService_RequireAuthenticated_Call) Return(err error) *MockPinningService_RequireAuthenticated_Call
func (*MockPinningService_RequireAuthenticated_Call) Run ¶
func (_c *MockPinningService_RequireAuthenticated_Call) Run(run func()) *MockPinningService_RequireAuthenticated_Call
func (*MockPinningService_RequireAuthenticated_Call) RunAndReturn ¶
func (_c *MockPinningService_RequireAuthenticated_Call) RunAndReturn(run func() error) *MockPinningService_RequireAuthenticated_Call
type MockPinningService_Status_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 (_c *MockPinningService_Status_Call) Return(pinStatus *PinStatus, err error) *MockPinningService_Status_Call
func (*MockPinningService_Status_Call) Run ¶
func (_c *MockPinningService_Status_Call) Run(run func(ctx context.Context, cid string, watch bool)) *MockPinningService_Status_Call
func (*MockPinningService_Status_Call) RunAndReturn ¶
func (_c *MockPinningService_Status_Call) RunAndReturn(run func(ctx context.Context, cid string, watch bool) (*PinStatus, error)) *MockPinningService_Status_Call
type MockPinningService_UnpinBatch_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 (_c *MockPinningService_UnpinBatch_Call) Return(batchResult *BatchResult, err error) *MockPinningService_UnpinBatch_Call
func (*MockPinningService_UnpinBatch_Call) Run ¶
func (_c *MockPinningService_UnpinBatch_Call) Run(run func(ctx context.Context, cids []string, opts BatchOptions)) *MockPinningService_UnpinBatch_Call
func (*MockPinningService_UnpinBatch_Call) RunAndReturn ¶
func (_c *MockPinningService_UnpinBatch_Call) RunAndReturn(run func(ctx context.Context, cids []string, opts BatchOptions) (*BatchResult, error)) *MockPinningService_UnpinBatch_Call
type MockPinningService_Unpin_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 (_c *MockPinningService_Unpin_Call) Return(unpinResult *UnpinResult, err error) *MockPinningService_Unpin_Call
func (*MockPinningService_Unpin_Call) Run ¶
func (_c *MockPinningService_Unpin_Call) Run(run func(ctx context.Context, cid string, confirm bool)) *MockPinningService_Unpin_Call
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 ¶
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 (_c *MockPinningService_UpdateMetadata_Call) Return(err error) *MockPinningService_UpdateMetadata_Call
func (*MockPinningService_UpdateMetadata_Call) Run ¶
func (_c *MockPinningService_UpdateMetadata_Call) Run(run func(ctx context.Context, cid string, set []string, clear bool)) *MockPinningService_UpdateMetadata_Call
func (*MockPinningService_UpdateMetadata_Call) RunAndReturn ¶
func (_c *MockPinningService_UpdateMetadata_Call) RunAndReturn(run func(ctx context.Context, cid string, set []string, clear bool) error) *MockPinningService_UpdateMetadata_Call
type MockQuotaAdminService ¶
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 ¶
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 (_m *MockQuotaAdminService) EXPECT() *MockQuotaAdminService_Expecter
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 ¶
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 ¶
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 (_c *MockQuotaAdminService_Cleanup_Call) Return(n int, err error) *MockQuotaAdminService_Cleanup_Call
func (*MockQuotaAdminService_Cleanup_Call) Run ¶
func (_c *MockQuotaAdminService_Cleanup_Call) Run(run func(ctx context.Context, retentionDays int)) *MockQuotaAdminService_Cleanup_Call
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 ¶
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 (_c *MockQuotaAdminService_CreateAllowance_Call) Return(quotaAllowance *admin.QuotaAllowance, err error) *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 ¶
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 (_c *MockQuotaAdminService_CreatePlan_Call) Return(quotaPlan *admin.QuotaPlan, err error) *MockQuotaAdminService_CreatePlan_Call
func (*MockQuotaAdminService_CreatePlan_Call) Run ¶
func (_c *MockQuotaAdminService_CreatePlan_Call) Run(run func(ctx context.Context, plan *admin.QuotaPlan)) *MockQuotaAdminService_CreatePlan_Call
func (*MockQuotaAdminService_CreatePlan_Call) RunAndReturn ¶
func (_c *MockQuotaAdminService_CreatePlan_Call) RunAndReturn(run func(ctx context.Context, plan *admin.QuotaPlan) (*admin.QuotaPlan, error)) *MockQuotaAdminService_CreatePlan_Call
type MockQuotaAdminService_DeleteAllowance_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 (_c *MockQuotaAdminService_DeleteAllowance_Call) Return(err error) *MockQuotaAdminService_DeleteAllowance_Call
func (*MockQuotaAdminService_DeleteAllowance_Call) Run ¶
func (_c *MockQuotaAdminService_DeleteAllowance_Call) Run(run func(ctx context.Context, grantID string)) *MockQuotaAdminService_DeleteAllowance_Call
func (*MockQuotaAdminService_DeleteAllowance_Call) RunAndReturn ¶
func (_c *MockQuotaAdminService_DeleteAllowance_Call) RunAndReturn(run func(ctx context.Context, grantID string) error) *MockQuotaAdminService_DeleteAllowance_Call
type MockQuotaAdminService_DeletePlan_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 (_c *MockQuotaAdminService_DeletePlan_Call) Return(err error) *MockQuotaAdminService_DeletePlan_Call
func (*MockQuotaAdminService_DeletePlan_Call) Run ¶
func (_c *MockQuotaAdminService_DeletePlan_Call) Run(run func(ctx context.Context, planID string)) *MockQuotaAdminService_DeletePlan_Call
func (*MockQuotaAdminService_DeletePlan_Call) RunAndReturn ¶
func (_c *MockQuotaAdminService_DeletePlan_Call) RunAndReturn(run func(ctx context.Context, planID string) error) *MockQuotaAdminService_DeletePlan_Call
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 ¶
func (_e *MockQuotaAdminService_Expecter) GetStats(ctx interface{}) *MockQuotaAdminService_GetStats_Call
GetStats is a helper method to define mock.On call
- ctx context.Context
func (*MockQuotaAdminService_Expecter) ListAllowances ¶
func (_e *MockQuotaAdminService_Expecter) ListAllowances(ctx interface{}) *MockQuotaAdminService_ListAllowances_Call
ListAllowances is a helper method to define mock.On call
- ctx context.Context
func (*MockQuotaAdminService_Expecter) ListPlans ¶
func (_e *MockQuotaAdminService_Expecter) ListPlans(ctx interface{}) *MockQuotaAdminService_ListPlans_Call
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 ¶
func (_e *MockQuotaAdminService_Expecter) RequireAuthenticated() *MockQuotaAdminService_RequireAuthenticated_Call
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 ¶
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 (_c *MockQuotaAdminService_GetPlan_Call) Return(quotaPlan *admin.QuotaPlan, err error) *MockQuotaAdminService_GetPlan_Call
func (*MockQuotaAdminService_GetPlan_Call) Run ¶
func (_c *MockQuotaAdminService_GetPlan_Call) Run(run func(ctx context.Context, planID string)) *MockQuotaAdminService_GetPlan_Call
func (*MockQuotaAdminService_GetPlan_Call) RunAndReturn ¶
func (_c *MockQuotaAdminService_GetPlan_Call) RunAndReturn(run func(ctx context.Context, planID string) (*admin.QuotaPlan, error)) *MockQuotaAdminService_GetPlan_Call
type MockQuotaAdminService_GetStats_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 (_c *MockQuotaAdminService_GetStats_Call) Return(systemStats *admin.SystemStats, err error) *MockQuotaAdminService_GetStats_Call
func (*MockQuotaAdminService_GetStats_Call) Run ¶
func (_c *MockQuotaAdminService_GetStats_Call) Run(run func(ctx context.Context)) *MockQuotaAdminService_GetStats_Call
func (*MockQuotaAdminService_GetStats_Call) RunAndReturn ¶
func (_c *MockQuotaAdminService_GetStats_Call) RunAndReturn(run func(ctx context.Context) (*admin.SystemStats, error)) *MockQuotaAdminService_GetStats_Call
type MockQuotaAdminService_ListAllowances_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 (_c *MockQuotaAdminService_ListAllowances_Call) Return(quotaAllowances []*admin.QuotaAllowance, n int, err error) *MockQuotaAdminService_ListAllowances_Call
func (*MockQuotaAdminService_ListAllowances_Call) Run ¶
func (_c *MockQuotaAdminService_ListAllowances_Call) Run(run func(ctx context.Context)) *MockQuotaAdminService_ListAllowances_Call
func (*MockQuotaAdminService_ListAllowances_Call) RunAndReturn ¶
func (_c *MockQuotaAdminService_ListAllowances_Call) RunAndReturn(run func(ctx context.Context) ([]*admin.QuotaAllowance, int, error)) *MockQuotaAdminService_ListAllowances_Call
type MockQuotaAdminService_ListPlans_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 (_c *MockQuotaAdminService_ListPlans_Call) Return(quotaPlans []*admin.QuotaPlan, n int, err error) *MockQuotaAdminService_ListPlans_Call
func (*MockQuotaAdminService_ListPlans_Call) Run ¶
func (_c *MockQuotaAdminService_ListPlans_Call) Run(run func(ctx context.Context)) *MockQuotaAdminService_ListPlans_Call
func (*MockQuotaAdminService_ListPlans_Call) RunAndReturn ¶
func (_c *MockQuotaAdminService_ListPlans_Call) RunAndReturn(run func(ctx context.Context) ([]*admin.QuotaPlan, int, error)) *MockQuotaAdminService_ListPlans_Call
type MockQuotaAdminService_ListUserConfigs_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 (_c *MockQuotaAdminService_ListUserConfigs_Call) Return(userQuotaConfigs []*admin.UserQuotaConfig, n int, err error) *MockQuotaAdminService_ListUserConfigs_Call
func (*MockQuotaAdminService_ListUserConfigs_Call) Run ¶
func (_c *MockQuotaAdminService_ListUserConfigs_Call) Run(run func(ctx context.Context)) *MockQuotaAdminService_ListUserConfigs_Call
func (*MockQuotaAdminService_ListUserConfigs_Call) RunAndReturn ¶
func (_c *MockQuotaAdminService_ListUserConfigs_Call) RunAndReturn(run func(ctx context.Context) ([]*admin.UserQuotaConfig, int, error)) *MockQuotaAdminService_ListUserConfigs_Call
type MockQuotaAdminService_Reconcile_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 (_c *MockQuotaAdminService_Reconcile_Call) Return(s string, n int, err error) *MockQuotaAdminService_Reconcile_Call
func (*MockQuotaAdminService_Reconcile_Call) Run ¶
func (_c *MockQuotaAdminService_Reconcile_Call) Run(run func(ctx context.Context, userID *int)) *MockQuotaAdminService_Reconcile_Call
func (*MockQuotaAdminService_Reconcile_Call) RunAndReturn ¶
func (_c *MockQuotaAdminService_Reconcile_Call) RunAndReturn(run func(ctx context.Context, userID *int) (string, int, error)) *MockQuotaAdminService_Reconcile_Call
type MockQuotaAdminService_RequireAuthenticated_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 (_c *MockQuotaAdminService_RequireAuthenticated_Call) Return(err error) *MockQuotaAdminService_RequireAuthenticated_Call
func (*MockQuotaAdminService_RequireAuthenticated_Call) Run ¶
func (_c *MockQuotaAdminService_RequireAuthenticated_Call) Run(run func()) *MockQuotaAdminService_RequireAuthenticated_Call
func (*MockQuotaAdminService_RequireAuthenticated_Call) RunAndReturn ¶
func (_c *MockQuotaAdminService_RequireAuthenticated_Call) RunAndReturn(run func() error) *MockQuotaAdminService_RequireAuthenticated_Call
type MockQuotaAdminService_ResetUserPlan_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 (_c *MockQuotaAdminService_ResetUserPlan_Call) Return(err error) *MockQuotaAdminService_ResetUserPlan_Call
func (*MockQuotaAdminService_ResetUserPlan_Call) Run ¶
func (_c *MockQuotaAdminService_ResetUserPlan_Call) Run(run func(ctx context.Context, userID int)) *MockQuotaAdminService_ResetUserPlan_Call
func (*MockQuotaAdminService_ResetUserPlan_Call) RunAndReturn ¶
func (_c *MockQuotaAdminService_ResetUserPlan_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockQuotaAdminService_ResetUserPlan_Call
type MockQuotaAdminService_SetDefaultPlan_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 (_c *MockQuotaAdminService_SetDefaultPlan_Call) Return(err error) *MockQuotaAdminService_SetDefaultPlan_Call
func (*MockQuotaAdminService_SetDefaultPlan_Call) Run ¶
func (_c *MockQuotaAdminService_SetDefaultPlan_Call) Run(run func(ctx context.Context, planID string)) *MockQuotaAdminService_SetDefaultPlan_Call
func (*MockQuotaAdminService_SetDefaultPlan_Call) RunAndReturn ¶
func (_c *MockQuotaAdminService_SetDefaultPlan_Call) RunAndReturn(run func(ctx context.Context, planID string) error) *MockQuotaAdminService_SetDefaultPlan_Call
type MockQuotaAdminService_UpdateAllowance_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 (_c *MockQuotaAdminService_UpdateAllowance_Call) Return(quotaAllowance *admin.QuotaAllowance, err error) *MockQuotaAdminService_UpdateAllowance_Call
func (*MockQuotaAdminService_UpdateAllowance_Call) RunAndReturn ¶
type MockQuotaAdminService_UpdatePlan_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 (_c *MockQuotaAdminService_UpdatePlan_Call) Return(quotaPlan *admin.QuotaPlan, err error) *MockQuotaAdminService_UpdatePlan_Call
func (*MockQuotaAdminService_UpdatePlan_Call) Run ¶
func (_c *MockQuotaAdminService_UpdatePlan_Call) Run(run func(ctx context.Context, planID string, plan *admin.QuotaPlan)) *MockQuotaAdminService_UpdatePlan_Call
func (*MockQuotaAdminService_UpdatePlan_Call) RunAndReturn ¶
func (_c *MockQuotaAdminService_UpdatePlan_Call) RunAndReturn(run func(ctx context.Context, planID string, plan *admin.QuotaPlan) (*admin.QuotaPlan, error)) *MockQuotaAdminService_UpdatePlan_Call
type MockQuotaAdminService_UpdateUserConfig_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 (_c *MockQuotaAdminService_UpdateUserConfig_Call) Return(userQuotaConfig *admin.UserQuotaConfig, err error) *MockQuotaAdminService_UpdateUserConfig_Call
func (*MockQuotaAdminService_UpdateUserConfig_Call) Run ¶
func (_c *MockQuotaAdminService_UpdateUserConfig_Call) Run(run func(ctx context.Context, userID int, config *admin.UserQuotaConfigUpdate)) *MockQuotaAdminService_UpdateUserConfig_Call
func (*MockQuotaAdminService_UpdateUserConfig_Call) RunAndReturn ¶
func (_c *MockQuotaAdminService_UpdateUserConfig_Call) RunAndReturn(run func(ctx context.Context, userID int, config *admin.UserQuotaConfigUpdate) (*admin.UserQuotaConfig, error)) *MockQuotaAdminService_UpdateUserConfig_Call
type MockSetupUI ¶
type MockSetupUI struct {
// Track method calls
Calls []string
// Track execution choices
AuthChoice AuthStepChoice
ConfigChoice ConfigStepChoice
CustomConfig CustomConfig
Email string
Password string
OTPCode string
PromptError error
// Control behavior
ReturnError error
ContinueError error
// Track state
WelcomeShown bool
CompletionShown bool
AuthExecuted bool
ConfigExecuted bool
TutorialExecuted bool
// Track config changes for testing
EndpointSet string
SecureSet *bool
// contains filtered or unexported fields
}
MockSetupUI is a mock implementation of SetupUI for testing. Tests verify method calls and state, not display strings.
func (*MockSetupUI) CallCount ¶
func (m *MockSetupUI) CallCount(method string) int
CallCount returns the number of times a method was called.
func (*MockSetupUI) ClearCalls ¶
func (m *MockSetupUI) ClearCalls()
ClearCalls clears the call history.
func (*MockSetupUI) ExecuteAuthStep ¶
func (m *MockSetupUI) ExecuteAuthStep(ctx context.Context, wizard *SetupWizard) error
ExecuteAuthStep implements SetupUI.
func (*MockSetupUI) ExecuteCompletionStep ¶
func (m *MockSetupUI) ExecuteCompletionStep(wizard *SetupWizard) error
ExecuteCompletionStep implements SetupUI.
func (*MockSetupUI) ExecuteConfigStep ¶
func (m *MockSetupUI) ExecuteConfigStep(ctx context.Context, wizard *SetupWizard) error
ExecuteConfigStep implements SetupUI.
func (*MockSetupUI) ExecuteTutorialStep ¶
func (m *MockSetupUI) ExecuteTutorialStep(wizard *SetupWizard) error
ExecuteTutorialStep implements SetupUI.
func (*MockSetupUI) GetCalls ¶
func (m *MockSetupUI) GetCalls() []string
GetCalls returns a copy of the method calls.
func (*MockSetupUI) SetAuthChoice ¶
func (m *MockSetupUI) SetAuthChoice(choice AuthStepChoice)
SetAuthChoice sets the mock's auth choice response.
func (*MockSetupUI) SetConfigChoice ¶
func (m *MockSetupUI) SetConfigChoice(choice ConfigStepChoice)
SetConfigChoice sets the mock's config choice response.
func (*MockSetupUI) SetCredentials ¶
func (m *MockSetupUI) SetCredentials(email, password string)
SetCredentials sets the mock's email/password response.
func (*MockSetupUI) SetCustomConfig ¶
func (m *MockSetupUI) SetCustomConfig(config CustomConfig)
SetCustomConfig sets the mock's custom config response.
func (*MockSetupUI) SetOTPCode ¶
func (m *MockSetupUI) SetOTPCode(code string)
SetOTPCode sets the mock's OTP code response.
func (*MockSetupUI) SetReturnError ¶
func (m *MockSetupUI) SetReturnError(err error)
SetReturnError sets an error to return from the next UI call.
func (*MockSetupUI) ShowCompletion ¶
func (m *MockSetupUI) ShowCompletion() error
ShowCompletion implements SetupUI.
func (*MockSetupUI) ShowStepProgress ¶
func (m *MockSetupUI) ShowStepProgress(ctx context.Context, current, total int, stepName string) error
ShowStepProgress implements SetupUI.
func (*MockSetupUI) ShowStepSkipped ¶
func (m *MockSetupUI) ShowStepSkipped(ctx context.Context, stepName string) error
ShowStepSkipped implements SetupUI.
func (*MockSetupUI) ShowWelcome ¶
func (m *MockSetupUI) ShowWelcome() error
ShowWelcome implements SetupUI.
func (*MockSetupUI) VerifyCalls ¶
func (m *MockSetupUI) VerifyCalls(expected []string) bool
VerifyCalls verifies that methods were called in the expected order.
func (*MockSetupUI) WasCalled ¶
func (m *MockSetupUI) WasCalled(method string) bool
WasCalled checks if a specific method was called.
type MockUploadService ¶
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 (_m *MockUploadService) EXPECT() *MockUploadService_Expecter
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 ¶
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 (_c *MockUploadService_Upload_Call) Return(uploadResult *UploadResult, err error) *MockUploadService_Upload_Call
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 OperationError ¶
OperationError represents a failed operation in a batch
type OperationResult ¶
OperationResult represents a successful operation in a batch
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)
// 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 ¶
NewOutputFormatter creates a new output formatter based on configuration.
type PTermSetupUI ¶
type PTermSetupUI struct {
// 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) ShowStepProgress ¶
func (ui *PTermSetupUI) ShowStepProgress(ctx context.Context, current, total int, stepName string) error
ShowStepProgress displays progress for the current step.
func (*PTermSetupUI) ShowStepSkipped ¶
func (ui *PTermSetupUI) ShowStepSkipped(ctx context.Context, stepName string) error
ShowStepSkipped indicates a step was skipped.
func (*PTermSetupUI) ShowWelcome ¶
func (ui *PTermSetupUI) ShowWelcome() error
ShowWelcome displays the welcome screen.
type PinResult ¶
PinResult represents the result of a pin operation
func NewPinResult ¶
NewPinResult creates a new PinResult with the given details.
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)
// Update metadata for a pin
UpdateMetadata(ctx context.Context, cid string, set []string, clear 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) 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.
type PinningServiceFactory ¶
type PinningServiceFactory func(cfgMgr config.Manager, output Output) 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 ¶
func (d *PowerShellCompletionDetector) Name() string
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 ¶
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 SetupOptions ¶
SetupOptions configures the wizard behavior.
type SetupStep ¶
type SetupStep interface {
// Name returns the step name.
Name() string
// ShouldSkip returns true if the step should be skipped.
ShouldSkip(wizard *SetupWizard) bool
// Execute runs the step logic.
Execute(ctx context.Context, wizard *SetupWizard) error
}
SetupStep represents a single step in the setup process.
type SetupUI ¶
type SetupUI interface {
// Welcome screen
ShowWelcome() error
// Progress tracking
ShowStepProgress(ctx context.Context, current, total int, stepName string) error
ShowStepSkipped(ctx context.Context, stepName string) error
// Completion
ShowCompletion() error
// 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) CurrentStep ¶
func (w *SetupWizard) CurrentStep() int
CurrentStep returns the current step index.
func (*SetupWizard) IsCompleted ¶
func (w *SetupWizard) IsCompleted() bool
IsCompleted returns whether the wizard completed successfully.
func (*SetupWizard) Options ¶
func (w *SetupWizard) Options() SetupOptions
Options returns the setup options.
type StdinSource ¶
type StdinSource struct{}
StdinSource is a ValueSource that reads from stdin. It implements the urfave/cli ValueSource interface.
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 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 TutorialStep ¶
type TutorialStep struct{}
TutorialStep shows quick tutorial.
func (*TutorialStep) Execute ¶
func (s *TutorialStep) Execute(ctx context.Context, wizard *SetupWizard) error
func (*TutorialStep) Name ¶
func (s *TutorialStep) Name() string
func (*TutorialStep) ShouldSkip ¶
func (s *TutorialStep) ShouldSkip(wizard *SetupWizard) bool
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 ¶
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 ¶
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, apiEndpoint string, opts ...UploadServiceOption) UploadService
NewUploadService creates a new UploadService with the given dependencies.
type UploadServiceConfig ¶
type UploadServiceConfig struct {
HTTPClient *http.Client
AccountClient portalsdk.AccountAPI
}
UploadServiceConfig holds configuration options for UploadService.
type UploadServiceDefault ¶
type UploadServiceDefault struct {
// contains filtered or unexported fields
}
UploadServiceDefault provides upload operations using the Pinner.xyz API.
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 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 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.
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)
Get(ctx context.Context, id string) (*ipfs.WebsiteItem, error)
Update(ctx context.Context, id, domain, targetHash, targetType string) (*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)
}
WebsitesService defines the interface for website operations.
func NewWebsitesService ¶
func NewWebsitesService(cfgMgr config.Manager, output Output, apiEndpoint string) WebsitesService
NewWebsitesService creates a new WebsitesService instance.
type WebsitesServiceFactory ¶
type WebsitesServiceFactory func(cfgMgr config.Manager, output Output) WebsitesService
WebsitesServiceFactory creates a WebsitesService with dependencies.
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
Source Files
¶
- account.go
- admin.go
- admin_billing_credits.go
- admin_billing_overview.go
- admin_billing_price_lines.go
- admin_billing_pricing_plans.go
- admin_billing_subscribers.go
- admin_quota.go
- admin_service.go
- admin_token_provider.go
- auth.go
- auth_service.go
- command_docs.go
- command_helper.go
- command_wrapper.go
- config.go
- confirm_email.go
- dns.go
- dns_service.go
- doctor.go
- error_formatter.go
- flags.go
- ipns.go
- ipns_service.go
- list.go
- metadata.go
- mock_AuthPrompter.go
- mock_AuthService.go
- mock_BillingAdminService.go
- mock_PinningService.go
- mock_QuotaAdminService.go
- mock_UploadService.go
- output.go
- pin.go
- pinning_client.go
- pinning_service.go
- progress.go
- register.go
- root.go
- setup.go
- setup_mock.go
- setup_pterm.go
- setup_ui.go
- setup_wizard.go
- sources.go
- status.go
- testutils.go
- unpin.go
- upload.go
- upload_client.go
- upload_service.go
- utils.go
- version.go
- websites.go
- websites_service.go
- websites_ssl.go