diff --git a/cchat.go b/cchat.go index 0d3816a..2afec08 100644 --- a/cchat.go +++ b/cchat.go @@ -731,9 +731,9 @@ type ServersContainer interface { SetServers([]Server) } -// A service is a complete service that's capable of multiple sessions. It has -// to implement the Authenticate() method, which returns multiple -// implementations of Authenticator. +// Service is a complete service that's capable of multiple sessions. It has to +// implement the Authenticate() method, which returns multiple implementations +// of Authenticator. // // A service can implement SessionRestorer, which would indicate the frontend // that it can restore past sessions. Sessions are saved using the SessionSaver @@ -745,6 +745,13 @@ type ServersContainer interface { // configurations must be optional, as frontends may not implement a // configurator UI. type Service interface { + // Identifier returns the unique identifier for the service. There is no + // enforced representation, but services are recommended to follow the Reverse + // Domain Name Notation for consistency. An example of that would be: + // + // com.github.diamondburned.cchat-discord + // com.github.username.service + Identifier // Namer returns the name of the service. Namer diff --git a/repository/gob/repository.gob b/repository/gob/repository.gob index 514f2e3..35935ee 100644 Binary files a/repository/gob/repository.gob and b/repository/gob/repository.gob differ diff --git a/repository/main.go b/repository/main.go index 19e1a55..83d9972 100644 --- a/repository/main.go +++ b/repository/main.go @@ -651,7 +651,7 @@ var Main = Packages{ }, }, { Comment: Comment{` - A service is a complete service that's capable of multiple + Service is a complete service that's capable of multiple sessions. It has to implement the Authenticate() method, which returns multiple implementations of Authenticator. @@ -668,6 +668,17 @@ var Main = Packages{ `}, Name: "Service", Embeds: []EmbeddedInterface{{ + Comment: Comment{` + Identifier returns the unique identifier for the service. There + is no enforced representation, but services are recommended to + follow the Reverse Domain Name Notation for consistency. An + example of that would be: + + com.github.diamondburned.cchat-discord + com.github.username.service + `}, + InterfaceName: "Identifier", + }, { Comment: Comment{` Namer returns the name of the service. `},