-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: no dependency on strongo/strongoapp
- Loading branch information
1 parent
694f404
commit 8149b0a
Showing
4 changed files
with
20 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,29 @@ | ||
package botsfwmodels | ||
|
||
import "github.com/strongo/strongoapp/appuser" | ||
|
||
// AppUserData holds information about bot app user | ||
type AppUserData interface { | ||
appuser.BaseUserData | ||
|
||
// LocaleSettings is an interface to set and get preferred locale | ||
LocaleSettings | ||
|
||
// SetBotUserID associates bot user ID with an app user record | ||
SetBotUserID(platform, botID, botUserID string) | ||
|
||
// UserNamesHolder is an interface to set and get user's names. | ||
UserNamesHolder | ||
|
||
// PreferredLocaleHolder is an interface to set and get preferred locale | ||
PreferredLocaleHolder | ||
} | ||
|
||
type UserNamesHolder interface { | ||
// SetName sets a name of a user. It is used to store first name, last name, etc. | ||
// Parameters: | ||
// - field: name of a field to set: "firstName", "lastName", "nickName", "fullName" | ||
SetName(field, value string) error | ||
|
||
// GetName returns a name of a user. It is used to store first name, last name, etc. | ||
// Parameters: | ||
// - field: name of a field to set: "firstName", "lastName", "nickName", "fullName" | ||
GetName(field string) string | ||
|
||
// GetFullName returns full name of a user | ||
GetFullName() string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
github.com/strongo/strongoapp v0.9.1 h1:M3JqRZtqftTHGqnekW3ncNYYqLv2B1weye7yhPIG9ms= | ||
github.com/strongo/strongoapp v0.9.1/go.mod h1:UWRe4rYG7val1PRumvd+V1TbCHmckfHr3DQ+OzvYnqo= | ||
github.com/strongo/validation v0.0.6 h1:RskXD45ILagVW3jmuKUiq7WshE4kmoQEiUbgfigqHzw= | ||
github.com/strongo/validation v0.0.6/go.mod h1:V4Nu8b8CPsLNwYLKmMHN2ghkoabOpiOW8NNcUczuCWE= |