auth

package
v0.0.0-...-fb81480 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package auth provides authentication-related functionality, including user creation and retrieval from the database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	MainAPI
}

Auth is the main struct for handling authentication logic and implements the MainAPI interface.

func New

func New(db database.DataBase) *Auth

New creates and returns a new instance of Auth.

type MainAPI

type MainAPI interface {
	// CreateUser creates a new user
	CreateUser(user model.User) error

	// GetUser retrieves a user by username and password
	GetUser(username, password string) (*model.User, error)
}

MainAPI defines the methods related to authentication, such as creating and retrieving users.

Jump to

Keyboard shortcuts

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