smallstep-certificates/authority/mgmt/admin.go
max furman 4f3e5ef64d wip
2021-05-19 15:20:16 -07:00

24 lines
532 B
Go

package mgmt
import (
"github.com/smallstep/certificates/authority/admin"
)
// AdminType specifies the type of the admin. e.g. SUPER_ADMIN, REGULAR
type AdminType admin.Type
var (
// AdminTypeSuper superadmin
AdminTypeSuper = admin.TypeSuper
// AdminTypeRegular regular
AdminTypeRegular = admin.TypeRegular
)
// Admin type.
type Admin admin.Admin
// ToCertificates converts an Admin to the Admin type expected by the authority.
func (adm *Admin) ToCertificates() (*admin.Admin, error) {
return (*admin.Admin)(adm), nil
}