2020-08-26 13:58:46 -04:00
|
|
|
package target
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/hashicorp/boundary/internal/db"
|
2021-01-22 13:46:20 -08:00
|
|
|
"github.com/hashicorp/boundary/internal/errors"
|
2020-08-26 13:58:46 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
TcpTargetPrefix = "ttcp"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func newTcpTargetId() (string, error) {
|
2021-01-22 13:46:20 -08:00
|
|
|
const op = "target.newTcpTargetId"
|
2020-08-26 13:58:46 -04:00
|
|
|
id, err := db.NewPublicId(TcpTargetPrefix)
|
|
|
|
|
if err != nil {
|
2021-01-22 13:46:20 -08:00
|
|
|
return "", errors.Wrap(err, op)
|
2020-08-26 13:58:46 -04:00
|
|
|
}
|
|
|
|
|
return id, nil
|
|
|
|
|
}
|