Files
threshold/internal/auth/password/public_ids.go
T

30 lines
638 B
Go
Raw Normal View History

package password
import (
2020-08-10 17:15:02 -04:00
"github.com/hashicorp/boundary/internal/db"
"github.com/hashicorp/boundary/internal/errors"
)
// PublicId prefixes for the resources in the password package.
const (
2020-08-25 00:21:08 -04:00
AuthMethodPrefix = "ampw"
AccountPrefix = "apw"
)
func newAuthMethodId() (string, error) {
const op = "password.newAuthMethodId"
id, err := db.NewPublicId(AuthMethodPrefix)
if err != nil {
return "", errors.Wrap(err, op)
}
2021-03-05 06:34:06 -08:00
return id, nil
}
func newAccountId() (string, error) {
const op = "password.newAccountId"
id, err := db.NewPublicId(AccountPrefix)
if err != nil {
return "", errors.Wrap(err, op)
}
2021-03-05 06:34:06 -08:00
return id, nil
}