* See how Boundary would look with https://github.com/mvdan/gofumpt applied Results of running `gofumpt -w -s .` * Update tools file and Makefile for gofumpt Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
35 lines
915 B
Go
35 lines
915 B
Go
package authtoken
|
|
|
|
const (
|
|
defaultAuthTokenTableName = "auth_token_account"
|
|
defaultWritableAuthTokenTableName = "auth_token"
|
|
)
|
|
|
|
// TableName returns the table name for the auth token.
|
|
func (s *AuthToken) TableName() string {
|
|
if s.tableName != "" {
|
|
return s.tableName
|
|
}
|
|
return defaultAuthTokenTableName
|
|
}
|
|
|
|
// 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 *AuthToken) SetTableName(n string) {
|
|
s.tableName = n
|
|
}
|
|
|
|
// 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) {
|
|
s.tableName = n
|
|
}
|