domain

package
v0.0.0-...-e8cbfdd Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ElementModel

type ElementModel struct {
	ID        int
	IDProject int
	Ordernum  int
	Type      string
	Body      string
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt sql.NullTime
}

ElementModel ElementModel

type ElementRepository

type ElementRepository interface {
	CreateElement(ctx context.Context, element ElementModel) error
	GetByIDProject(ctx context.Context, idProject int) ([]ElementModel, error)
}

ElementRepository ElementRepository

type ElementUsecase

type ElementUsecase interface {
	CreateElement(
		ctx context.Context,
		idProject int,
		ordernum int,
		elementType string,
		elementBody string,
		createdAt time.Time,
		updatedAt time.Time,
	) (bool, error)
	GetElementsByIDProject(ctx context.Context, idProject int) ([]ElementModel, error)
}

ElementUsecase ElementUsecase

type ProjectModel

type ProjectModel struct {
	ID             int
	IDUser         int
	URL            string
	ProfilePicture string
	Title          string
	Description    string
	CreatedAt      time.Time
	UpdatedAt      time.Time
	DeletedAt      sql.NullTime
}

ProjectModel ProjectModel

type ProjectRepository

type ProjectRepository interface {
	CreateProject(ctx context.Context, project ProjectModel) error
	Get(ctx context.Context, id int) ([]ProjectModel, error)
}

ProjectRepository ProjectRepository

type ProjectUsecase

type ProjectUsecase interface {
	CreateProject(
		ctx context.Context,
		idUser int, url string,
		profilePicture string,
		title string,
		description string,
	) (bool, error)
	Get(ctx context.Context, id int) ([]ProjectModel, error)
}

ProjectUsecase ProjectUsecase

type UserModel

type UserModel struct {
	ID        int
	Name      string
	Email     string
	Password  string
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt sql.NullTime
}

UserModel UserModel

type UserRepository

type UserRepository interface {
	CreateUser(ctx context.Context, user UserModel) error
	GetUserByEmail(ctx context.Context, email string) (UserModel, error)
}

UserRepository UserRepository

type UserUsecase

type UserUsecase interface {
	Login(ctx context.Context, username string, password string) (string, string, error)
	RefreshToken(ctc context.Context, refreshToken string) (string, string, error)
	CreateUser(ctx context.Context, name string, email string, password string) (bool, error)
}

UserUsecase AuthUsecase

Directories

Path Synopsis
element
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
project
user

Jump to

Keyboard shortcuts

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