mirror of
https://github.com/diamondburned/cchat-discord.git
synced 2024-11-22 06:02:59 +00:00
changed auth ctors to return concrete types
This commit is contained in:
parent
31c378db5a
commit
37165658e1
|
@ -20,7 +20,7 @@ var ErrDLNotFound = errors.New("DiscordLogin not found. Please install it from t
|
|||
// application if possible. If not, it'll try and exec up a browser.
|
||||
type DiscordLoginAuth struct{}
|
||||
|
||||
func NewDiscordLogin() cchat.Authenticator {
|
||||
func NewDiscordLogin() DiscordLoginAuth {
|
||||
return DiscordLoginAuth{}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ type LoginAuthenticator struct {
|
|||
client *api.Client
|
||||
}
|
||||
|
||||
func NewLoginAuthenticator() cchat.Authenticator {
|
||||
func NewLoginAuthenticator() *LoginAuthenticator {
|
||||
return &LoginAuthenticator{
|
||||
client: api.NewClient(""),
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
// authenticate directly using a token.
|
||||
type TokenAuthenticator struct{}
|
||||
|
||||
func NewTokenAuthenticator() cchat.Authenticator {
|
||||
func NewTokenAuthenticator() TokenAuthenticator {
|
||||
return TokenAuthenticator{}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ type TOTPAuthenticator struct {
|
|||
ticket string
|
||||
}
|
||||
|
||||
func NewTOTPAuthenticator(ticket string) cchat.Authenticator {
|
||||
func NewTOTPAuthenticator(ticket string) *TOTPAuthenticator {
|
||||
return &TOTPAuthenticator{
|
||||
client: api.NewClient(""),
|
||||
ticket: ticket,
|
||||
|
|
Loading…
Reference in a new issue