pcrcrud

package
v0.0.0-...-902682f Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 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 Domain

type Domain struct {
	Id        int
	PcrValue  float64
	UpdatedAt time.Time
}

type PcrUsecase

type PcrUsecase struct {
	Repo Repository
	// contains filtered or unexported fields
}

func (*PcrUsecase) GetPCR

func (usecase *PcrUsecase) GetPCR(ctx context.Context) (Domain, error)

func (*PcrUsecase) Update

func (uc *PcrUsecase) Update(ctx context.Context, domain Domain) (Domain, error)

type Repository

type Repository interface {
	Create(ctx context.Context, domain *Domain) (Domain, error)
	Update(ctx context.Context, domain Domain) (Domain, error)
	GetPCR(ctx context.Context) (Domain, error)
}

type Usecase

type Usecase interface {
	Update(ctx context.Context, domain Domain) (Domain, error)
	GetPCR(ctx context.Context) (Domain, error)
}

func NewPcrcase

func NewPcrcase(repo Repository, timeout time.Duration) Usecase

Jump to

Keyboard shortcuts

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