provider

package
v0.0.0-...-c91c6ab Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	ID       string `json:"id" gorm:"type:char(36);primaryKey"`
	Name     string `json:"name" gorm:"size:60" validate:"required,gte=2,lte=60"`
	IsActive bool   `json:"isActive,omitempty"`
}

type Repository

type Repository interface {
	Create(provider *Provider) (*Provider, error)
	GetByID(id string) (*Provider, error)
	GetByName(name string) (*Provider, error)
	GetAll() ([]*Provider, error)
	Update(provider *Provider) (*Provider, error)
	Delete(provider *Provider) error
}

type Usecase

type Usecase interface {
	Repository
}

func NewUsecase

func NewUsecase(repo Repository) Usecase

Jump to

Keyboard shortcuts

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