Documentation ¶
Index ¶
- func PasswordHash(plaintext string) ([]byte, error)
- func ValidateHash(payload []byte, plaintext string) bool
- type Database
- func (d *Database) AuthorizeUser(ctx context.Context, username string, plaintext string) (bool, error)
- func (d *Database) CreateUser(ctx context.Context, data *User) (*ent.User, error)
- func (d *Database) CreateZone(ctx context.Context, inp *Zone, ownerId int) (*ent.Zone, error)
- func (d *Database) QueryUser(ctx context.Context, username string) (*ent.User, error)
- func (d *Database) QueryZone(ctx context.Context, domain string) (*ent.Zone, error)
- func (d *Database) QueryZones(ctx context.Context, username string) ([]*ent.Zone, error)
- type User
- type Zone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PasswordHash ¶
func ValidateHash ¶
Types ¶
type Database ¶
func (*Database) AuthorizeUser ¶
func (*Database) CreateUser ¶
creates an user
func (*Database) CreateZone ¶
creates a zone
Click to show internal directories.
Click to hide internal directories.