models

package
v1.0.0-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKey

type APIKey struct {
	ID              string    `json:"id"`
	SubjectID       string    `json:"subject_id"`
	PermissionLevel int       `json:"permission_level"`
	Usage           int       `json:"usage"`
	Limit           int       `json:"limit"`
	CreatedAt       time.Time `json:"created_at"`
	ExpiresAt       time.Time `json:"expires_at"`
	LastUsed        time.Time `json:"last_used"`
	Active          bool      `json:"active"`
}

APIKey struct that represents the API key table in the database

type APIKeyGenerateRequest

type APIKeyGenerateRequest struct {
	UUID string `json:"uuid"`
}

APIKeyGenerateRequest represents the request body for the register handler

type LoginRequest

type LoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

LoginRequest represents the request body for the login handler

type RegisterRequest

type RegisterRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

RegisterRequest represents the request body for the register handler

type Role

type Role int
const (
	Default Role = iota
	Standard
	Admin
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL