proxy

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package proxy is a generated GoMock package.

Package proxy is a generated GoMock package.

Package proxy is a generated GoMock package.

Package proxy is a generated GoMock package.

Package proxy provides a proxy of go built-in, or third-party packages to make easier to test.

Package proxy is a generated GoMock package.

Package proxy is a generated GoMock package.

Package proxy is a generated GoMock package.

Package proxy is a generated GoMock package.

Package proxy is a generated GoMock package.

Package proxy is a generated GoMock package.

Package proxy is a generated GoMock package.

Package proxy is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	AuthURL(state string) string
	Client(ctx context.Context, tok *oauth2.Token) *http.Client
	Token(ctx context.Context, state string, r *http.Request) (*oauth2.Token, error)
}

Authenticator is an interface that provides a proxy of the methods of spotify.Authenticator.

type Buffer

type Buffer interface {
	ReadFrom(r io.Reader) (int64, error)
	Reset()
	String() string
}

Buffer is an interface that provides a proxy of the methods of bytes.Buffer.

func NewBuffer

func NewBuffer() Buffer

NewBuffer returns a new instance of the Buffer interface.

type Client

type Client interface {
	AddAlbumsToLibrary(ctx context.Context, ids ...spotify.ID) error
	AddTracksToLibrary(ctx context.Context, ids ...spotify.ID) error
	CurrentUserFollows(ctx context.Context, t string, ids ...spotify.ID) ([]bool, error)
	FollowArtist(ctx context.Context, id spotify.ID) error
	GetAlbum(ctx context.Context, id spotify.ID, opts ...spotify.RequestOption) (*spotify.FullAlbum, error)
	GetAlbumTracks(ctx context.Context, id spotify.ID, opts ...spotify.RequestOption) (*spotify.SimpleTrackPage, error)
	GetArtist(ctx context.Context, id spotify.ID) (*spotify.FullArtist, error)
	GetArtistAlbums(ctx context.Context, artistId spotify.ID, ts []spotify.AlbumType, opts ...spotify.RequestOption) (*spotify.SimpleAlbumPage, error)
	GetTrack(ctx context.Context, id spotify.ID, opts ...spotify.RequestOption) (*spotify.FullTrack, error)
	RemoveAlbumsFromLibrary(ctx context.Context, ids ...spotify.ID) error
	RemoveTracksFromLibrary(ctx context.Context, ids ...spotify.ID) error
	Search(ctx context.Context, query string, t spotify.SearchType, opts ...spotify.RequestOption) (*spotify.SearchResult, error)
	UnfollowArtist(ctx context.Context, id spotify.ID) error
	UserHasAlbums(ctx context.Context, ids ...spotify.ID) ([]bool, error)
	UserHasTracks(ctx context.Context, ids ...spotify.ID) ([]bool, error)
}

Client is an interface that provides a proxy of the methods of spotify.Client.

type Cobra

type Cobra interface {
	ExactArgs(n int) cobra.PositionalArgs
	NewCommand() Command
}

Cobra is an interface that provides a proxy of the methods of cobra.

func NewCobra

func NewCobra() Cobra

NewCobra returns a new instance of the Cobra interface.

type Command

type Command interface {
	AddCommand(cmds ...Command)
	ExecuteContext(ctx context.Context) error
	Flags() FlagSet
	GetCommand() *cobra.Command
	PersistentFlags() FlagSet
	RunE(cmd *cobra.Command, args []string) error
	SetAliases(s []string)
	SetArgs(f cobra.PositionalArgs)
	SetHelpTemplate(s string)
	SetRunE(f func(*cobra.Command, []string) error)
	SetSilenceErrors(b bool)
	SetUse(s string)
	SetUsageTemplate(s string)
}

Command is an interface that provides a proxy of the methods of cobra.Command.

type Debug

type Debug interface {
	ReadBuildInfo() (info *debug.BuildInfo, ok bool)
}

Debug is an interface that provides a proxy of the methods of debug.

func NewDebug

func NewDebug() Debug

NewDebug returns a new instance of the Debug interface.

type Envconfig

type Envconfig interface {
	Process(prefix string, spec any) error
}

Envconfig is an interface that provides a proxy of the methods of envconfig.

func NewEnvconfig

func NewEnvconfig() Envconfig

NewEnvconfig returns a new instance of the Envconfig interface.

type File

type File interface {
	AsOsFile() *os.File
	Close() error
	Read(b []byte) (n int, err error)
	Write(b []byte) (n int, err error)
}

File is an interface that provides a proxy of the methods of os.File.

type FlagSet

type FlagSet interface {
	BoolVarP(p *bool, name string, shorthand string, value bool, usage string)
	IntVarP(p *int, name string, shorthand string, value int, usage string)
	StringVarP(p *string, name string, shorthand string, value string, usage string)
}

FlagSet is an interface that provides a proxy of the methods of pflag.FlagSet.

type Http

type Http interface {
	HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
	NewServer(addr string) Server
	NotFound(w http.ResponseWriter, r *http.Request)
}

Http is an interface that provides a proxy of the methods of http.

func NewHttp

func NewHttp() Http

NewHttp returns a new instance of the Http interface.

type MockAuthenticator

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

MockAuthenticator is a mock of Authenticator interface.

func NewMockAuthenticator

func NewMockAuthenticator(ctrl *gomock.Controller) *MockAuthenticator

NewMockAuthenticator creates a new mock instance.

func (*MockAuthenticator) AuthURL

func (m *MockAuthenticator) AuthURL(state string) string

AuthURL mocks base method.

func (*MockAuthenticator) Client

func (m *MockAuthenticator) Client(ctx context.Context, tok *oauth2.Token) *http.Client

Client mocks base method.

func (*MockAuthenticator) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAuthenticator) Token

func (m *MockAuthenticator) Token(ctx context.Context, state string, r *http.Request) (*oauth2.Token, error)

Token mocks base method.

type MockAuthenticatorMockRecorder

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

MockAuthenticatorMockRecorder is the mock recorder for MockAuthenticator.

func (*MockAuthenticatorMockRecorder) AuthURL

func (mr *MockAuthenticatorMockRecorder) AuthURL(state any) *gomock.Call

AuthURL indicates an expected call of AuthURL.

func (*MockAuthenticatorMockRecorder) Client

func (mr *MockAuthenticatorMockRecorder) Client(ctx, tok any) *gomock.Call

Client indicates an expected call of Client.

func (*MockAuthenticatorMockRecorder) Token

func (mr *MockAuthenticatorMockRecorder) Token(ctx, state, r any) *gomock.Call

Token indicates an expected call of Token.

type MockBuffer

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

MockBuffer is a mock of Buffer interface.

func NewMockBuffer

func NewMockBuffer(ctrl *gomock.Controller) *MockBuffer

NewMockBuffer creates a new mock instance.

func (*MockBuffer) EXPECT

func (m *MockBuffer) EXPECT() *MockBufferMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockBuffer) ReadFrom

func (m *MockBuffer) ReadFrom(r io.Reader) (int64, error)

ReadFrom mocks base method.

func (*MockBuffer) Reset

func (m *MockBuffer) Reset()

Reset mocks base method.

func (*MockBuffer) String

func (m *MockBuffer) String() string

String mocks base method.

type MockBufferMockRecorder

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

MockBufferMockRecorder is the mock recorder for MockBuffer.

func (*MockBufferMockRecorder) ReadFrom

func (mr *MockBufferMockRecorder) ReadFrom(r any) *gomock.Call

ReadFrom indicates an expected call of ReadFrom.

func (*MockBufferMockRecorder) Reset

func (mr *MockBufferMockRecorder) Reset() *gomock.Call

Reset indicates an expected call of Reset.

func (*MockBufferMockRecorder) String

func (mr *MockBufferMockRecorder) String() *gomock.Call

String indicates an expected call of String.

type MockClient

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

MockClient is a mock of Client interface.

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance.

func (*MockClient) AddAlbumsToLibrary

func (m *MockClient) AddAlbumsToLibrary(ctx context.Context, ids ...spotify.ID) error

AddAlbumsToLibrary mocks base method.

func (*MockClient) AddTracksToLibrary

func (m *MockClient) AddTracksToLibrary(ctx context.Context, ids ...spotify.ID) error

AddTracksToLibrary mocks base method.

func (*MockClient) CurrentUserFollows

func (m *MockClient) CurrentUserFollows(ctx context.Context, t string, ids ...spotify.ID) ([]bool, error)

CurrentUserFollows mocks base method.

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClient) FollowArtist

func (m *MockClient) FollowArtist(ctx context.Context, id spotify.ID) error

FollowArtist mocks base method.

func (*MockClient) GetAlbum

func (m *MockClient) GetAlbum(ctx context.Context, id spotify.ID, opts ...spotify.RequestOption) (*spotify.FullAlbum, error)

GetAlbum mocks base method.

func (*MockClient) GetAlbumTracks

func (m *MockClient) GetAlbumTracks(ctx context.Context, id spotify.ID, opts ...spotify.RequestOption) (*spotify.SimpleTrackPage, error)

GetAlbumTracks mocks base method.

func (*MockClient) GetArtist

func (m *MockClient) GetArtist(ctx context.Context, id spotify.ID) (*spotify.FullArtist, error)

GetArtist mocks base method.

func (*MockClient) GetArtistAlbums

func (m *MockClient) GetArtistAlbums(ctx context.Context, artistId spotify.ID, ts []spotify.AlbumType, opts ...spotify.RequestOption) (*spotify.SimpleAlbumPage, error)

GetArtistAlbums mocks base method.

func (*MockClient) GetTrack

func (m *MockClient) GetTrack(ctx context.Context, id spotify.ID, opts ...spotify.RequestOption) (*spotify.FullTrack, error)

GetTrack mocks base method.

func (*MockClient) RemoveAlbumsFromLibrary

func (m *MockClient) RemoveAlbumsFromLibrary(ctx context.Context, ids ...spotify.ID) error

RemoveAlbumsFromLibrary mocks base method.

func (*MockClient) RemoveTracksFromLibrary

func (m *MockClient) RemoveTracksFromLibrary(ctx context.Context, ids ...spotify.ID) error

RemoveTracksFromLibrary mocks base method.

func (*MockClient) Search

Search mocks base method.

func (*MockClient) UnfollowArtist

func (m *MockClient) UnfollowArtist(ctx context.Context, id spotify.ID) error

UnfollowArtist mocks base method.

func (*MockClient) UserHasAlbums

func (m *MockClient) UserHasAlbums(ctx context.Context, ids ...spotify.ID) ([]bool, error)

UserHasAlbums mocks base method.

func (*MockClient) UserHasTracks

func (m *MockClient) UserHasTracks(ctx context.Context, ids ...spotify.ID) ([]bool, error)

UserHasTracks mocks base method.

type MockClientMockRecorder

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

MockClientMockRecorder is the mock recorder for MockClient.

func (*MockClientMockRecorder) AddAlbumsToLibrary

func (mr *MockClientMockRecorder) AddAlbumsToLibrary(ctx any, ids ...any) *gomock.Call

AddAlbumsToLibrary indicates an expected call of AddAlbumsToLibrary.

func (*MockClientMockRecorder) AddTracksToLibrary

func (mr *MockClientMockRecorder) AddTracksToLibrary(ctx any, ids ...any) *gomock.Call

AddTracksToLibrary indicates an expected call of AddTracksToLibrary.

func (*MockClientMockRecorder) CurrentUserFollows

func (mr *MockClientMockRecorder) CurrentUserFollows(ctx, t any, ids ...any) *gomock.Call

CurrentUserFollows indicates an expected call of CurrentUserFollows.

func (*MockClientMockRecorder) FollowArtist

func (mr *MockClientMockRecorder) FollowArtist(ctx, id any) *gomock.Call

FollowArtist indicates an expected call of FollowArtist.

func (*MockClientMockRecorder) GetAlbum

func (mr *MockClientMockRecorder) GetAlbum(ctx, id any, opts ...any) *gomock.Call

GetAlbum indicates an expected call of GetAlbum.

func (*MockClientMockRecorder) GetAlbumTracks

func (mr *MockClientMockRecorder) GetAlbumTracks(ctx, id any, opts ...any) *gomock.Call

GetAlbumTracks indicates an expected call of GetAlbumTracks.

func (*MockClientMockRecorder) GetArtist

func (mr *MockClientMockRecorder) GetArtist(ctx, id any) *gomock.Call

GetArtist indicates an expected call of GetArtist.

func (*MockClientMockRecorder) GetArtistAlbums

func (mr *MockClientMockRecorder) GetArtistAlbums(ctx, artistId, ts any, opts ...any) *gomock.Call

GetArtistAlbums indicates an expected call of GetArtistAlbums.

func (*MockClientMockRecorder) GetTrack

func (mr *MockClientMockRecorder) GetTrack(ctx, id any, opts ...any) *gomock.Call

GetTrack indicates an expected call of GetTrack.

func (*MockClientMockRecorder) RemoveAlbumsFromLibrary

func (mr *MockClientMockRecorder) RemoveAlbumsFromLibrary(ctx any, ids ...any) *gomock.Call

RemoveAlbumsFromLibrary indicates an expected call of RemoveAlbumsFromLibrary.

func (*MockClientMockRecorder) RemoveTracksFromLibrary

func (mr *MockClientMockRecorder) RemoveTracksFromLibrary(ctx any, ids ...any) *gomock.Call

RemoveTracksFromLibrary indicates an expected call of RemoveTracksFromLibrary.

func (*MockClientMockRecorder) Search

func (mr *MockClientMockRecorder) Search(ctx, query, t any, opts ...any) *gomock.Call

Search indicates an expected call of Search.

func (*MockClientMockRecorder) UnfollowArtist

func (mr *MockClientMockRecorder) UnfollowArtist(ctx, id any) *gomock.Call

UnfollowArtist indicates an expected call of UnfollowArtist.

func (*MockClientMockRecorder) UserHasAlbums

func (mr *MockClientMockRecorder) UserHasAlbums(ctx any, ids ...any) *gomock.Call

UserHasAlbums indicates an expected call of UserHasAlbums.

func (*MockClientMockRecorder) UserHasTracks

func (mr *MockClientMockRecorder) UserHasTracks(ctx any, ids ...any) *gomock.Call

UserHasTracks indicates an expected call of UserHasTracks.

type MockCobra

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

MockCobra is a mock of Cobra interface.

func NewMockCobra

func NewMockCobra(ctrl *gomock.Controller) *MockCobra

NewMockCobra creates a new mock instance.

func (*MockCobra) EXPECT

func (m *MockCobra) EXPECT() *MockCobraMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCobra) ExactArgs

func (m *MockCobra) ExactArgs(n int) cobra.PositionalArgs

ExactArgs mocks base method.

func (*MockCobra) NewCommand

func (m *MockCobra) NewCommand() Command

NewCommand mocks base method.

type MockCobraMockRecorder

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

MockCobraMockRecorder is the mock recorder for MockCobra.

func (*MockCobraMockRecorder) ExactArgs

func (mr *MockCobraMockRecorder) ExactArgs(n any) *gomock.Call

ExactArgs indicates an expected call of ExactArgs.

func (*MockCobraMockRecorder) NewCommand

func (mr *MockCobraMockRecorder) NewCommand() *gomock.Call

NewCommand indicates an expected call of NewCommand.

type MockCommand

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

MockCommand is a mock of Command interface.

func NewMockCommand

func NewMockCommand(ctrl *gomock.Controller) *MockCommand

NewMockCommand creates a new mock instance.

func (*MockCommand) AddCommand

func (m *MockCommand) AddCommand(cmds ...Command)

AddCommand mocks base method.

func (*MockCommand) EXPECT

func (m *MockCommand) EXPECT() *MockCommandMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCommand) ExecuteContext

func (m *MockCommand) ExecuteContext(ctx context.Context) error

ExecuteContext mocks base method.

func (*MockCommand) Flags

func (m *MockCommand) Flags() FlagSet

Flags mocks base method.

func (*MockCommand) GetCommand

func (m *MockCommand) GetCommand() *cobra.Command

GetCommand mocks base method.

func (*MockCommand) PersistentFlags

func (m *MockCommand) PersistentFlags() FlagSet

PersistentFlags mocks base method.

func (*MockCommand) RunE

func (m *MockCommand) RunE(cmd *cobra.Command, args []string) error

RunE mocks base method.

func (*MockCommand) SetAliases

func (m *MockCommand) SetAliases(s []string)

SetAliases mocks base method.

func (*MockCommand) SetArgs

func (m *MockCommand) SetArgs(f cobra.PositionalArgs)

SetArgs mocks base method.

func (*MockCommand) SetHelpTemplate

func (m *MockCommand) SetHelpTemplate(s string)

SetHelpTemplate mocks base method.

func (*MockCommand) SetRunE

func (m *MockCommand) SetRunE(f func(*cobra.Command, []string) error)

SetRunE mocks base method.

func (*MockCommand) SetSilenceErrors

func (m *MockCommand) SetSilenceErrors(b bool)

SetSilenceErrors mocks base method.

func (*MockCommand) SetUsageTemplate

func (m *MockCommand) SetUsageTemplate(s string)

SetUsageTemplate mocks base method.

func (*MockCommand) SetUse

func (m *MockCommand) SetUse(s string)

SetUse mocks base method.

type MockCommandMockRecorder

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

MockCommandMockRecorder is the mock recorder for MockCommand.

func (*MockCommandMockRecorder) AddCommand

func (mr *MockCommandMockRecorder) AddCommand(cmds ...any) *gomock.Call

AddCommand indicates an expected call of AddCommand.

func (*MockCommandMockRecorder) ExecuteContext

func (mr *MockCommandMockRecorder) ExecuteContext(ctx any) *gomock.Call

ExecuteContext indicates an expected call of ExecuteContext.

func (*MockCommandMockRecorder) Flags

func (mr *MockCommandMockRecorder) Flags() *gomock.Call

Flags indicates an expected call of Flags.

func (*MockCommandMockRecorder) GetCommand

func (mr *MockCommandMockRecorder) GetCommand() *gomock.Call

GetCommand indicates an expected call of GetCommand.

func (*MockCommandMockRecorder) PersistentFlags

func (mr *MockCommandMockRecorder) PersistentFlags() *gomock.Call

PersistentFlags indicates an expected call of PersistentFlags.

func (*MockCommandMockRecorder) RunE

func (mr *MockCommandMockRecorder) RunE(cmd, args any) *gomock.Call

RunE indicates an expected call of RunE.

func (*MockCommandMockRecorder) SetAliases

func (mr *MockCommandMockRecorder) SetAliases(s any) *gomock.Call

SetAliases indicates an expected call of SetAliases.

func (*MockCommandMockRecorder) SetArgs

func (mr *MockCommandMockRecorder) SetArgs(f any) *gomock.Call

SetArgs indicates an expected call of SetArgs.

func (*MockCommandMockRecorder) SetHelpTemplate

func (mr *MockCommandMockRecorder) SetHelpTemplate(s any) *gomock.Call

SetHelpTemplate indicates an expected call of SetHelpTemplate.

func (*MockCommandMockRecorder) SetRunE

func (mr *MockCommandMockRecorder) SetRunE(f any) *gomock.Call

SetRunE indicates an expected call of SetRunE.

func (*MockCommandMockRecorder) SetSilenceErrors

func (mr *MockCommandMockRecorder) SetSilenceErrors(b any) *gomock.Call

SetSilenceErrors indicates an expected call of SetSilenceErrors.

func (*MockCommandMockRecorder) SetUsageTemplate

func (mr *MockCommandMockRecorder) SetUsageTemplate(s any) *gomock.Call

SetUsageTemplate indicates an expected call of SetUsageTemplate.

func (*MockCommandMockRecorder) SetUse

func (mr *MockCommandMockRecorder) SetUse(s any) *gomock.Call

SetUse indicates an expected call of SetUse.

type MockDebug

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

MockDebug is a mock of Debug interface.

func NewMockDebug

func NewMockDebug(ctrl *gomock.Controller) *MockDebug

NewMockDebug creates a new mock instance.

func (*MockDebug) EXPECT

func (m *MockDebug) EXPECT() *MockDebugMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDebug) ReadBuildInfo

func (m *MockDebug) ReadBuildInfo() (*debug.BuildInfo, bool)

ReadBuildInfo mocks base method.

type MockDebugMockRecorder

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

MockDebugMockRecorder is the mock recorder for MockDebug.

func (*MockDebugMockRecorder) ReadBuildInfo

func (mr *MockDebugMockRecorder) ReadBuildInfo() *gomock.Call

ReadBuildInfo indicates an expected call of ReadBuildInfo.

type MockEnvconfig

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

MockEnvconfig is a mock of Envconfig interface.

func NewMockEnvconfig

func NewMockEnvconfig(ctrl *gomock.Controller) *MockEnvconfig

NewMockEnvconfig creates a new mock instance.

func (*MockEnvconfig) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockEnvconfig) Process

func (m *MockEnvconfig) Process(prefix string, spec any) error

Process mocks base method.

type MockEnvconfigMockRecorder

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

MockEnvconfigMockRecorder is the mock recorder for MockEnvconfig.

func (*MockEnvconfigMockRecorder) Process

func (mr *MockEnvconfigMockRecorder) Process(prefix, spec any) *gomock.Call

Process indicates an expected call of Process.

type MockFile

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

MockFile is a mock of File interface.

func NewMockFile

func NewMockFile(ctrl *gomock.Controller) *MockFile

NewMockFile creates a new mock instance.

func (*MockFile) AsOsFile

func (m *MockFile) AsOsFile() *os.File

AsOsFile mocks base method.

func (*MockFile) Close

func (m *MockFile) Close() error

Close mocks base method.

func (*MockFile) EXPECT

func (m *MockFile) EXPECT() *MockFileMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockFile) Read

func (m *MockFile) Read(b []byte) (int, error)

Read mocks base method.

func (*MockFile) Write

func (m *MockFile) Write(b []byte) (int, error)

Write mocks base method.

type MockFileMockRecorder

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

MockFileMockRecorder is the mock recorder for MockFile.

func (*MockFileMockRecorder) AsOsFile

func (mr *MockFileMockRecorder) AsOsFile() *gomock.Call

AsOsFile indicates an expected call of AsOsFile.

func (*MockFileMockRecorder) Close

func (mr *MockFileMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockFileMockRecorder) Read

func (mr *MockFileMockRecorder) Read(b any) *gomock.Call

Read indicates an expected call of Read.

func (*MockFileMockRecorder) Write

func (mr *MockFileMockRecorder) Write(b any) *gomock.Call

Write indicates an expected call of Write.

type MockFlagSet

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

MockFlagSet is a mock of FlagSet interface.

func NewMockFlagSet

func NewMockFlagSet(ctrl *gomock.Controller) *MockFlagSet

NewMockFlagSet creates a new mock instance.

func (*MockFlagSet) BoolVarP

func (m *MockFlagSet) BoolVarP(p *bool, name, shorthand string, value bool, usage string)

BoolVarP mocks base method.

func (*MockFlagSet) EXPECT

func (m *MockFlagSet) EXPECT() *MockFlagSetMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockFlagSet) IntVarP

func (m *MockFlagSet) IntVarP(p *int, name, shorthand string, value int, usage string)

IntVarP mocks base method.

func (*MockFlagSet) StringVarP

func (m *MockFlagSet) StringVarP(p *string, name, shorthand, value, usage string)

StringVarP mocks base method.

type MockFlagSetMockRecorder

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

MockFlagSetMockRecorder is the mock recorder for MockFlagSet.

func (*MockFlagSetMockRecorder) BoolVarP

func (mr *MockFlagSetMockRecorder) BoolVarP(p, name, shorthand, value, usage any) *gomock.Call

BoolVarP indicates an expected call of BoolVarP.

func (*MockFlagSetMockRecorder) IntVarP

func (mr *MockFlagSetMockRecorder) IntVarP(p, name, shorthand, value, usage any) *gomock.Call

IntVarP indicates an expected call of IntVarP.

func (*MockFlagSetMockRecorder) StringVarP

func (mr *MockFlagSetMockRecorder) StringVarP(p, name, shorthand, value, usage any) *gomock.Call

StringVarP indicates an expected call of StringVarP.

type MockHttp

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

MockHttp is a mock of Http interface.

func NewMockHttp

func NewMockHttp(ctrl *gomock.Controller) *MockHttp

NewMockHttp creates a new mock instance.

func (*MockHttp) EXPECT

func (m *MockHttp) EXPECT() *MockHttpMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockHttp) HandleFunc

func (m *MockHttp) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))

HandleFunc mocks base method.

func (*MockHttp) NewServer

func (m *MockHttp) NewServer(addr string) Server

NewServer mocks base method.

func (*MockHttp) NotFound

func (m *MockHttp) NotFound(w http.ResponseWriter, r *http.Request)

NotFound mocks base method.

type MockHttpMockRecorder

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

MockHttpMockRecorder is the mock recorder for MockHttp.

func (*MockHttpMockRecorder) HandleFunc

func (mr *MockHttpMockRecorder) HandleFunc(pattern, handler any) *gomock.Call

HandleFunc indicates an expected call of HandleFunc.

func (*MockHttpMockRecorder) NewServer

func (mr *MockHttpMockRecorder) NewServer(addr any) *gomock.Call

NewServer indicates an expected call of NewServer.

func (*MockHttpMockRecorder) NotFound

func (mr *MockHttpMockRecorder) NotFound(w, r any) *gomock.Call

NotFound indicates an expected call of NotFound.

type MockOs

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

MockOs is a mock of Os interface.

func NewMockOs

func NewMockOs(ctrl *gomock.Controller) *MockOs

NewMockOs creates a new mock instance.

func (*MockOs) EXPECT

func (m *MockOs) EXPECT() *MockOsMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockOs) Pipe

func (m *MockOs) Pipe() (File, File, error)

Pipe mocks base method.

type MockOsMockRecorder

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

MockOsMockRecorder is the mock recorder for MockOs.

func (*MockOsMockRecorder) Pipe

func (mr *MockOsMockRecorder) Pipe() *gomock.Call

Pipe indicates an expected call of Pipe.

type MockPrompt

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

MockPrompt is a mock of Prompt interface.

func NewMockPrompt

func NewMockPrompt(ctrl *gomock.Controller) *MockPrompt

NewMockPrompt creates a new mock instance.

func (*MockPrompt) EXPECT

func (m *MockPrompt) EXPECT() *MockPromptMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPrompt) Run

func (m *MockPrompt) Run() (string, error)

Run mocks base method.

func (*MockPrompt) SetLabel

func (m *MockPrompt) SetLabel(label string)

SetLabel mocks base method.

func (*MockPrompt) SetMask

func (m *MockPrompt) SetMask(mask rune)

SetMask mocks base method.

type MockPromptMockRecorder

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

MockPromptMockRecorder is the mock recorder for MockPrompt.

func (*MockPromptMockRecorder) Run

func (mr *MockPromptMockRecorder) Run() *gomock.Call

Run indicates an expected call of Run.

func (*MockPromptMockRecorder) SetLabel

func (mr *MockPromptMockRecorder) SetLabel(label any) *gomock.Call

SetLabel indicates an expected call of SetLabel.

func (*MockPromptMockRecorder) SetMask

func (mr *MockPromptMockRecorder) SetMask(mask any) *gomock.Call

SetMask indicates an expected call of SetMask.

type MockPromptui

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

MockPromptui is a mock of Promptui interface.

func NewMockPromptui

func NewMockPromptui(ctrl *gomock.Controller) *MockPromptui

NewMockPromptui creates a new mock instance.

func (*MockPromptui) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPromptui) NewPrompt

func (m *MockPromptui) NewPrompt() Prompt

NewPrompt mocks base method.

type MockPromptuiMockRecorder

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

MockPromptuiMockRecorder is the mock recorder for MockPromptui.

func (*MockPromptuiMockRecorder) NewPrompt

func (mr *MockPromptuiMockRecorder) NewPrompt() *gomock.Call

NewPrompt indicates an expected call of NewPrompt.

type MockRandstr

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

MockRandstr is a mock of Randstr interface.

func NewMockRandstr

func NewMockRandstr(ctrl *gomock.Controller) *MockRandstr

NewMockRandstr creates a new mock instance.

func (*MockRandstr) EXPECT

func (m *MockRandstr) EXPECT() *MockRandstrMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockRandstr) Hex

func (m *MockRandstr) Hex(length int) string

Hex mocks base method.

type MockRandstrMockRecorder

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

MockRandstrMockRecorder is the mock recorder for MockRandstr.

func (*MockRandstrMockRecorder) Hex

func (mr *MockRandstrMockRecorder) Hex(length any) *gomock.Call

Hex indicates an expected call of Hex.

type MockResponseWriter

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

MockResponseWriter is a mock of ResponseWriter interface.

func NewMockResponseWriter

func NewMockResponseWriter(ctrl *gomock.Controller) *MockResponseWriter

NewMockResponseWriter creates a new mock instance.

func (*MockResponseWriter) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockResponseWriter) Header

func (m *MockResponseWriter) Header() http.Header

Header mocks base method.

func (*MockResponseWriter) Write

func (m *MockResponseWriter) Write(arg0 []byte) (int, error)

Write mocks base method.

func (*MockResponseWriter) WriteHeader

func (m *MockResponseWriter) WriteHeader(statusCode int)

WriteHeader mocks base method.

type MockResponseWriterMockRecorder

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

MockResponseWriterMockRecorder is the mock recorder for MockResponseWriter.

func (*MockResponseWriterMockRecorder) Header

Header indicates an expected call of Header.

func (*MockResponseWriterMockRecorder) Write

func (mr *MockResponseWriterMockRecorder) Write(arg0 any) *gomock.Call

Write indicates an expected call of Write.

func (*MockResponseWriterMockRecorder) WriteHeader

func (mr *MockResponseWriterMockRecorder) WriteHeader(statusCode any) *gomock.Call

WriteHeader indicates an expected call of WriteHeader.

type MockServer

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

MockServer is a mock of Server interface.

func NewMockServer

func NewMockServer(ctrl *gomock.Controller) *MockServer

NewMockServer creates a new mock instance.

func (*MockServer) EXPECT

func (m *MockServer) EXPECT() *MockServerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockServer) ListenAndServe

func (m *MockServer) ListenAndServe() error

ListenAndServe mocks base method.

func (*MockServer) Shutdown

func (m *MockServer) Shutdown(ctx context.Context) error

Shutdown mocks base method.

type MockServerMockRecorder

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

MockServerMockRecorder is the mock recorder for MockServer.

func (*MockServerMockRecorder) ListenAndServe

func (mr *MockServerMockRecorder) ListenAndServe() *gomock.Call

ListenAndServe indicates an expected call of ListenAndServe.

func (*MockServerMockRecorder) Shutdown

func (mr *MockServerMockRecorder) Shutdown(ctx any) *gomock.Call

Shutdown indicates an expected call of Shutdown.

type MockSpotify

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

MockSpotify is a mock of Spotify interface.

func NewMockSpotify

func NewMockSpotify(ctrl *gomock.Controller) *MockSpotify

NewMockSpotify creates a new mock instance.

func (*MockSpotify) EXPECT

func (m *MockSpotify) EXPECT() *MockSpotifyMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockSpotify) NewAuthenticator

func (m *MockSpotify) NewAuthenticator(opts ...spotifyauth.AuthenticatorOption) Authenticator

NewAuthenticator mocks base method.

func (*MockSpotify) NewClient

func (m *MockSpotify) NewClient(client *http.Client, opts ...spotify.ClientOption) Client

NewClient mocks base method.

type MockSpotifyMockRecorder

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

MockSpotifyMockRecorder is the mock recorder for MockSpotify.

func (*MockSpotifyMockRecorder) NewAuthenticator

func (mr *MockSpotifyMockRecorder) NewAuthenticator(opts ...any) *gomock.Call

NewAuthenticator indicates an expected call of NewAuthenticator.

func (*MockSpotifyMockRecorder) NewClient

func (mr *MockSpotifyMockRecorder) NewClient(client any, opts ...any) *gomock.Call

NewClient indicates an expected call of NewClient.

type MockTable

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

MockTable is a mock of Table interface.

func NewMockTable

func NewMockTable(ctrl *gomock.Controller) *MockTable

NewMockTable creates a new mock instance.

func (*MockTable) Bulk

func (m *MockTable) Bulk(rows [][]string) error

Bulk mocks base method.

func (*MockTable) EXPECT

func (m *MockTable) EXPECT() *MockTableMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTable) Header

func (m *MockTable) Header(elements ...any)

Header mocks base method.

func (*MockTable) Render

func (m *MockTable) Render() error

Render mocks base method.

type MockTableMockRecorder

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

MockTableMockRecorder is the mock recorder for MockTable.

func (*MockTableMockRecorder) Bulk

func (mr *MockTableMockRecorder) Bulk(rows any) *gomock.Call

Bulk indicates an expected call of Bulk.

func (*MockTableMockRecorder) Header

func (mr *MockTableMockRecorder) Header(elements ...any) *gomock.Call

Header indicates an expected call of Header.

func (*MockTableMockRecorder) Render

func (mr *MockTableMockRecorder) Render() *gomock.Call

Render indicates an expected call of Render.

type MockTableWriter

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

MockTableWriter is a mock of TableWriter interface.

func NewMockTableWriter

func NewMockTableWriter(ctrl *gomock.Controller) *MockTableWriter

NewMockTableWriter creates a new mock instance.

func (*MockTableWriter) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTableWriter) NewTable

func (m *MockTableWriter) NewTable(writer io.Writer, opts ...tablewriter.Option) Table

NewTable mocks base method.

type MockTableWriterMockRecorder

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

MockTableWriterMockRecorder is the mock recorder for MockTableWriter.

func (*MockTableWriterMockRecorder) NewTable

func (mr *MockTableWriterMockRecorder) NewTable(writer any, opts ...any) *gomock.Call

NewTable indicates an expected call of NewTable.

type MockUrl

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

MockUrl is a mock of Url interface.

func NewMockUrl

func NewMockUrl(ctrl *gomock.Controller) *MockUrl

NewMockUrl creates a new mock instance.

func (*MockUrl) EXPECT

func (m *MockUrl) EXPECT() *MockUrlMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockUrl) Parse

func (m *MockUrl) Parse(rawurl string) (*url.URL, error)

Parse mocks base method.

type MockUrlMockRecorder

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

MockUrlMockRecorder is the mock recorder for MockUrl.

func (*MockUrlMockRecorder) Parse

func (mr *MockUrlMockRecorder) Parse(rawurl any) *gomock.Call

Parse indicates an expected call of Parse.

type Os

type Os interface {
	Pipe() (File, File, error)
}

Os is an interface that provides a proxy of the methods of os.

func NewOs

func NewOs() Os

NewOs returns a new instance of the Os interface.

type Prompt

type Prompt interface {
	Run() (string, error)
	SetLabel(label string)
	SetMask(mask rune)
}

Prompt is an interface that provides a proxy of the methods of promptui.Prompt.

type Promptui

type Promptui interface {
	NewPrompt() Prompt
}

Promptui is an interface that provides a proxy of the methods of promptui.

func NewPromptui

func NewPromptui() Promptui

NewPromptui returns a new instance of the Promptui interface.

type Randstr

type Randstr interface {
	Hex(length int) string
}

Randstr is an interface that provides a proxy of the methods of randstr.

func NewRandstr

func NewRandstr() Randstr

NewRandstr returns a new instance of the Randstr interface.

type ResponseWriter

type ResponseWriter interface {
	Header() http.Header
	Write([]byte) (int, error)
	WriteHeader(statusCode int)
}

ResponseWriter is an interface that provides a proxy of the methods of http.ResponseWriter.

func NewResponseWriter

func NewResponseWriter(w http.ResponseWriter) ResponseWriter

NewResponseWriter returns a new instance of the ResponseWriter interface.

type Server

type Server interface {
	ListenAndServe() error
	Shutdown(ctx context.Context) error
}

Server is an interface that provides a proxy of the methods of http.Server.

type Spotify

type Spotify interface {
	NewAuthenticator(opts ...spotifyauth.AuthenticatorOption) Authenticator
	NewClient(client *http.Client, opts ...spotify.ClientOption) Client
}

Spotify is an interface that provides a proxy of the methods of spotify.

func NewSpotify

func NewSpotify() Spotify

NewSpotify is a proxy method that returns the Spotify.

type Table

type Table interface {
	Header(elements ...any)
	Bulk(rows [][]string) error
	Render() error
}

Table is an interface that provides a proxy of the methods of tablewriter.Table.

type TableWriter

type TableWriter interface {
	NewTable(writer io.Writer, opts ...tablewriter.Option) Table
}

TableWriter is an interface that provides a proxy of the methods of tablewriter.

func NewTableWriter

func NewTableWriter() TableWriter

NewTableWriter returns a new instance of the TableWriter interface.

type Url

type Url interface {
	Parse(rawurl string) (*url.URL, error)
}

Url is an interface that provides a proxy of the methods of url.

func NewUrl

func NewUrl() Url

NewUrl returns a new instance of the Url interface.

Jump to

Keyboard shortcuts

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