Move Columnate to Lister
This commit broke Lister to add Columnate, and the method is removed from Server, because only Lister gets nested.
This commit is contained in:
parent
d40f221221
commit
c2fb784dbf
21
cchat.go
21
cchat.go
|
@ -392,6 +392,16 @@ type Lister interface {
|
||||||
// servers. This function can do IO, and the frontend should run this in a
|
// servers. This function can do IO, and the frontend should run this in a
|
||||||
// goroutine.
|
// goroutine.
|
||||||
Servers(ServersContainer) (stop func(), err error)
|
Servers(ServersContainer) (stop func(), err error)
|
||||||
|
// Columnate is optionally used by servers to give different nested servers its
|
||||||
|
// own nesting values. Top-level servers must start at 1. The zero-value (0)
|
||||||
|
// indicates that the server that implements this interface is inherently the
|
||||||
|
// children of its parent server.
|
||||||
|
//
|
||||||
|
// For example, in Discord, guilds can be placed in guild folders, but guilds
|
||||||
|
// and guild folders are put in the same column while guilds are actually
|
||||||
|
// children of the folders. To replicate this behavior, both guild and guild
|
||||||
|
// folders can return 1.
|
||||||
|
Columnate() int
|
||||||
}
|
}
|
||||||
|
|
||||||
// MemberDynamicSection represents a dynamically loaded member list section. The
|
// MemberDynamicSection represents a dynamically loaded member list section. The
|
||||||
|
@ -669,17 +679,6 @@ type Server interface {
|
||||||
Identifier
|
Identifier
|
||||||
Namer
|
Namer
|
||||||
|
|
||||||
// Columnate is optionally used by servers to give different nested servers its
|
|
||||||
// own nesting values. Top-level servers must start at 1. The zero-value (0)
|
|
||||||
// indicates that the server that implements this interface is inherently the
|
|
||||||
// children of its parent server.
|
|
||||||
//
|
|
||||||
// For example, in Discord, guilds can be placed in guild folders, but guilds
|
|
||||||
// and guild folders are put in the same column while guilds are actually
|
|
||||||
// children of the folders. To replicate this behavior, both guild and guild
|
|
||||||
// folders can return 1.
|
|
||||||
Columnate() int
|
|
||||||
|
|
||||||
// Asserters.
|
// Asserters.
|
||||||
|
|
||||||
AsLister() Lister // Optional
|
AsLister() Lister // Optional
|
||||||
|
|
Binary file not shown.
|
@ -981,26 +981,6 @@ var Main = Packages{
|
||||||
{InterfaceName: "Namer"},
|
{InterfaceName: "Namer"},
|
||||||
},
|
},
|
||||||
Methods: []Method{
|
Methods: []Method{
|
||||||
GetterMethod{
|
|
||||||
method: method{
|
|
||||||
Comment: Comment{`
|
|
||||||
Columnate is optionally used by servers to give
|
|
||||||
different nested servers its own nesting values.
|
|
||||||
Top-level servers must start at 1. The zero-value
|
|
||||||
(0) indicates that the server that implements this
|
|
||||||
interface is inherently the children of its parent
|
|
||||||
server.
|
|
||||||
|
|
||||||
For example, in Discord, guilds can be placed in
|
|
||||||
guild folders, but guilds and guild folders are put
|
|
||||||
in the same column while guilds are actually
|
|
||||||
children of the folders. To replicate this behavior,
|
|
||||||
both guild and guild folders can return 1.
|
|
||||||
`},
|
|
||||||
Name: "Columnate",
|
|
||||||
},
|
|
||||||
Returns: []NamedType{{"", "int"}},
|
|
||||||
},
|
|
||||||
AsserterMethod{ChildType: "Lister"},
|
AsserterMethod{ChildType: "Lister"},
|
||||||
AsserterMethod{ChildType: "Messenger"},
|
AsserterMethod{ChildType: "Messenger"},
|
||||||
AsserterMethod{ChildType: "Commander"},
|
AsserterMethod{ChildType: "Commander"},
|
||||||
|
@ -1021,6 +1001,26 @@ var Main = Packages{
|
||||||
`},
|
`},
|
||||||
Name: "Lister",
|
Name: "Lister",
|
||||||
Methods: []Method{
|
Methods: []Method{
|
||||||
|
GetterMethod{
|
||||||
|
method: method{
|
||||||
|
Comment: Comment{`
|
||||||
|
Columnate is optionally used by servers to give
|
||||||
|
different nested servers its own nesting values.
|
||||||
|
Top-level servers must start at 1. The zero-value
|
||||||
|
(0) indicates that the server that implements this
|
||||||
|
interface is inherently the children of its parent
|
||||||
|
server.
|
||||||
|
|
||||||
|
For example, in Discord, guilds can be placed in
|
||||||
|
guild folders, but guilds and guild folders are put
|
||||||
|
in the same column while guilds are actually
|
||||||
|
children of the folders. To replicate this behavior,
|
||||||
|
both guild and guild folders can return 1.
|
||||||
|
`},
|
||||||
|
Name: "Columnate",
|
||||||
|
},
|
||||||
|
Returns: []NamedType{{"", "int"}},
|
||||||
|
},
|
||||||
ContainerMethod{
|
ContainerMethod{
|
||||||
method: method{
|
method: method{
|
||||||
Comment: Comment{`
|
Comment: Comment{`
|
||||||
|
|
Loading…
Reference in New Issue