domain

package
v0.0.0-...-37e2b78 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Meme

type Meme struct {
	Id        uuid.UUID
	Title     string
	Image     string
	CreatedBy uuid.UUID
	CreatedAt int64
	UpdatedAt int64
}

type MemeRepository

type MemeRepository interface {
	GetAll() ([]Meme, error)
	GetById(id uuid.UUID) (Meme, error)
	Insert(meme Meme) error
	Update(meme Meme, userId uuid.UUID) error
	Delete(id uuid.UUID) error
}

type User

type User struct {
	Id           uuid.UUID
	Username     string
	Name         string
	Admin        bool
	PasswordHash []byte
	CreatedAt    int64
	UpdatedAt    int64
}

type UserRepository

type UserRepository interface {
	GetById(id uuid.UUID) (User, error)
	GetByUsername(username string) (User, error)
	Insert(user User) error
}

Jump to

Keyboard shortcuts

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