domain

package
v0.0.0-...-faef437 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	UserID    uuid.UUID
	Name      string
	Email     string
	Password  string
	CreatedAt time.Time
	UpdatedAt time.Time
}

Account ...

type AccountRepository

type AccountRepository interface {
	Create(*Account) error
	Find(email string) (*Account, error)
}

AccountRepository ...

type AccountService

type AccountService interface {
	Create(*Account) error
	Login(email string, password string) (uuid.UUID, error)
}

AccountService ...

type Redirect

type Redirect struct {
	URL        string    `json:"url"`
	Code       string    `json:"code"`
	CreatedAt  time.Time `json:"-"`
	UpdatedAt  time.Time `json:"-"`
	TotalClick int       `json:"-"`
	UserID     uuid.UUID `json:"-"`
}

Redirect ...

type RedirectRepository

type RedirectRepository interface {
	Find(code string) (*Redirect, error)
	Store(*Redirect) error
	FindByURL(url string) (*Redirect, error)
}

RedirectRepository ...

type RedirectService

type RedirectService interface {
	Redirect(code string) (string, error)
	Store(*Redirect) error
}

RedirectService ...

type UserURL

type UserURL struct {
	ID         int
	URL        string
	Code       string
	CreatedAt  time.Time
	UpdatedAt  time.Time
	DeletedAt  time.Time
	TotalClick int
	UserID     uuid.UUID
}

type UserURLRepository

type UserURLRepository interface {
	Find(code string) (string, error)
	FetchAll(userID uuid.UUID) ([]*UserURL, error)
	AddTotalClick(code string) error
	AddURL(*UserURL) error
}

UserURLRepository ...

type UserURLService

type UserURLService interface {
	FetchAll(userID uuid.UUID) ([]*UserURL, error)
	AddURL(*UserURL) error
}

UserURLService ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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