auth-api/src/db/types.go

34 lines
665 B
Go
Raw Normal View History

2020-12-29 13:46:58 +01:00
package db
import (
"github.com/google/uuid"
2021-01-02 11:56:24 +01:00
"github.com/jackc/pgx/v4/pgxpool"
2020-12-29 13:46:58 +01:00
)
2021-01-02 11:56:24 +01:00
// Account is an account in the system
type Account struct {
ID uuid.UUID `json:"id"`
AccountName string `json:"accountName"`
APIKey string `json:"apiKey"`
}
// AccountCreateInputFields yes
type AccountCreateInputFields struct {
Name string
Values []string
}
// AccountCreateInput is used as input struct for database creation of account
type AccountCreateInput struct {
ID uuid.UUID
AccountName string
APIKey string
Fields []AccountCreateInputFields
Password string
}
// Db struct
type Db struct {
DbPool *pgxpool.Pool
2020-12-29 13:46:58 +01:00
}