Files
threshold/internal/authtoken/gorm.go
T

32 lines
907 B
Go
Raw Normal View History

2020-07-07 07:44:49 -07:00
package authtoken
const defaultAuthTokenTableName = "auth_token_account"
const defaultWritableAuthTokenTableName = "auth_token"
2020-07-07 07:44:49 -07:00
// TableName returns the table name for the auth token.
func (s *AuthToken) TableName() string {
if s.tableName != "" {
return s.tableName
}
return defaultAuthTokenTableName
2020-07-07 07:44:49 -07:00
}
// SetTableName sets the table name. If the caller attempts to
// set the name to "" the name will be reset to the default name.
2020-07-07 07:44:49 -07:00
func (s *AuthToken) SetTableName(n string) {
2020-07-23 17:58:41 -04:00
s.tableName = n
2020-07-07 07:44:49 -07:00
}
// TableName returns the table name for the auth token.
func (s *writableAuthToken) TableName() string {
if s.tableName != "" {
return s.tableName
}
return defaultWritableAuthTokenTableName
}
// SetTableName sets the table name. If the caller attempts to
// set the name to "" the name will be reset to the default name.
func (s *writableAuthToken) SetTableName(n string) {
2020-07-23 17:58:41 -04:00
s.tableName = n
}