Changed Namer to a Name method in Authenticator
This commit removes the Namer interface and use a normal Name() method instead. This is because we don't want to add icons into Authenticators.
This commit is contained in:
parent
65273770ca
commit
997b156e2f
7
cchat.go
7
cchat.go
|
@ -202,10 +202,6 @@ type Attachments interface {
|
||||||
// break // success
|
// break // success
|
||||||
// }
|
// }
|
||||||
type Authenticator interface {
|
type Authenticator interface {
|
||||||
// Namer returns a short and concise name of this Authenticator method. The name
|
|
||||||
// should not include the name of the Service.
|
|
||||||
Namer
|
|
||||||
|
|
||||||
// Authenticate will be called with a list of values with indices correspond to
|
// Authenticate will be called with a list of values with indices correspond to
|
||||||
// the returned slice of AuthenticateEntry.
|
// the returned slice of AuthenticateEntry.
|
||||||
Authenticate([]string) (Session, error) // Blocking
|
Authenticate([]string) (Session, error) // Blocking
|
||||||
|
@ -214,6 +210,9 @@ type Authenticator interface {
|
||||||
AuthenticateForm() []AuthenticateEntry
|
AuthenticateForm() []AuthenticateEntry
|
||||||
// Description returns the description of this authenticator method.
|
// Description returns the description of this authenticator method.
|
||||||
Description() text.Rich
|
Description() text.Rich
|
||||||
|
// Name returns a short and concise name of this Authenticator method. The name
|
||||||
|
// should not include the name of the Service.
|
||||||
|
Name() text.Rich
|
||||||
}
|
}
|
||||||
|
|
||||||
// Author is the interface for an identifiable author. The interface defines
|
// Author is the interface for an identifiable author. The interface defines
|
||||||
|
|
|
@ -706,14 +706,20 @@ var Main = Packages{
|
||||||
}
|
}
|
||||||
`},
|
`},
|
||||||
Name: "Authenticator",
|
Name: "Authenticator",
|
||||||
Embeds: []EmbeddedInterface{{
|
|
||||||
Comment: Comment{`
|
|
||||||
Namer returns a short and concise name of this Authenticator
|
|
||||||
method. The name should not include the name of the Service.
|
|
||||||
`},
|
|
||||||
InterfaceName: "Namer",
|
|
||||||
}},
|
|
||||||
Methods: []Method{
|
Methods: []Method{
|
||||||
|
GetterMethod{
|
||||||
|
method: method{
|
||||||
|
Comment: Comment{`
|
||||||
|
Name returns a short and concise name of this
|
||||||
|
Authenticator method. The name should not include
|
||||||
|
the name of the Service.
|
||||||
|
`},
|
||||||
|
Name: "Name",
|
||||||
|
},
|
||||||
|
Returns: []NamedType{{
|
||||||
|
Type: MakeQual("text", "Rich"),
|
||||||
|
}},
|
||||||
|
},
|
||||||
GetterMethod{
|
GetterMethod{
|
||||||
method: method{
|
method: method{
|
||||||
Comment: Comment{`
|
Comment: Comment{`
|
||||||
|
|
Loading…
Reference in New Issue