user

package
v0.0.0-...-f02a2e5 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	DB  *sql.DB
	Log *zap.Logger
}

Repository is a struct to store DB and logger connection

func (*Repository) Create

Create new entity in storage

func (*Repository) Retrieve

func (r *Repository) Retrieve(email string, ctx context.Context) (internal.Identifiable, error)

Retrieve entity from storage

func (*Repository) RetrievePrivileges

func (r *Repository) RetrievePrivileges(id int64) ([]string, error)

RetrievePrivileges entity from storage

func (*Repository) RetrieveTickets

func (r *Repository) RetrieveTickets(ticket int64, user int64) (bool, error)

RetrieveTickets entity from storage

type Resource

type Resource struct {
	ID       int64  `json:"ID"`
	EMail    string `json:"email"`
	Password string `json:"password,omitempty"`
}

Resource is a struct to store data about entity

func (*Resource) GID

func (r *Resource) GID() int64

Jump to

Keyboard shortcuts

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