logic

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourceLogic

type ResourceLogic struct {
	// contains filtered or unexported fields
}

func NewResourceLogic

func NewResourceLogic(logger *zap.Logger, resourceRepo *repo.Resource) *ResourceLogic

func (*ResourceLogic) Create

func (l *ResourceLogic) Create(ctx context.Context, param CreateResourceParam) (*ent.Resource, error)

func (*ResourceLogic) Exists added in v0.2.0

func (l *ResourceLogic) Exists(ctx context.Context, id string) (bool, error)

type VersionLogic

type VersionLogic struct {
	// contains filtered or unexported fields
}

func NewVersionLogic

func NewVersionLogic(
	logger *zap.Logger,
	versionRepo *repo.Version,
	storageRepo *repo.Storage,
	tempDownloadInfoRepo *repo.TempDownloadInfo,
	storage *stg.Storage,
) *VersionLogic

func (*VersionLogic) Create

func (l *VersionLogic) Create(ctx context.Context, param CreateVersionParam) (*ent.Version, error)

func (*VersionLogic) GetByName

func (l *VersionLogic) GetByName(ctx context.Context, param GetVersionByNameParam) (*ent.Version, error)

func (*VersionLogic) GetLatest

func (l *VersionLogic) GetLatest(ctx context.Context, resourceID string) (*ent.Version, error)

func (*VersionLogic) GetPatchPath added in v0.2.0

func (l *VersionLogic) GetPatchPath(ctx context.Context, param GetVersionPatchParam) (string, error)

func (*VersionLogic) GetResourcePath added in v0.2.0

func (l *VersionLogic) GetResourcePath(param GetResourcePathParam) string

func (*VersionLogic) GetTempDownloadInfo added in v0.2.0

func (l *VersionLogic) GetTempDownloadInfo(ctx context.Context, key string) (*TempDownloadInfo, error)

func (*VersionLogic) NameExists added in v0.2.0

func (l *VersionLogic) NameExists(ctx context.Context, param VersionNameExistsParam) (bool, error)

func (*VersionLogic) StoreTempDownloadInfo added in v0.2.0

func (l *VersionLogic) StoreTempDownloadInfo(ctx context.Context, param StoreTempDownloadInfoParam) (string, error)

Jump to

Keyboard shortcuts

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