Discover Packages
code.europa.eu/healthdataeu-nodes/hdeupoc
api
services
api-gateway
core
user
package
Version:
v0.0.0-...-57b3f38
Opens a new window with list of versions in this module.
Published: Jun 28, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package user provides a core business API of a user.
Core manages the set of APIs for permit.
NewCore constructs the permit acces api.
APIKeyValidation hash the API key and checks if this API Key have is authorized.
Create generates an API key and creates the user.
Returns the api key of the user.
DeleteAll deletes all users.
IsUsersEmpty checks if the table users is empty.
type NewUser struct {
Name string
}
NewUser contains information needed to create a new user.
type User struct {
ID uuid .UUID `json:"user_id"`
Name string `json:"user_name"`
APIKey string `json:"api_key"`
DateCreated time .Time `json:"date_created"`
}
User represents individual user.
Source Files
¶
Directories
¶
Package userdb contains user related CRUD functionality.
Package userdb contains user related CRUD functionality.
Click to show internal directories.
Click to hide internal directories.