interactor

package
v0.0.0-...-1c02ac9 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOrganization

func NewOrganization(r *repo.Container) interfaces.Organization

func NewPlugin

func NewPlugin(r *repo.Container, gr *gateway.Container) interfaces.Plugin

func NewUser

func NewUser(r *repo.Container) interfaces.User

Types

type Organization

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

func (*Organization) Create

type Plugin

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

func (*Plugin) Create

func (p *Plugin) Create(ctx context.Context, publisher *user.User, r io.Reader) (*plugin.VersionedPlugin, error)

func (*Plugin) CreateFromRepo

func (p *Plugin) CreateFromRepo(ctx context.Context, publisher *user.User, repo *string) (*plugin.VersionedPlugin, error)

func (*Plugin) Download

func (p *Plugin) Download(ctx context.Context, id id.PluginID, version string) (io.ReadCloser, error)

func (*Plugin) DownloadLatest

func (p *Plugin) DownloadLatest(ctx context.Context, id id.PluginID) (io.ReadCloser, error)

func (*Plugin) FindByID

func (p *Plugin) FindByID(ctx context.Context, id id.PluginID, user *id.UserID) (*plugin.VersionedPlugin, error)

func (*Plugin) FindByIDs

func (i *Plugin) FindByIDs(ctx context.Context, uids []id.PluginID, user *id.UserID) ([]*plugin.VersionedPlugin, error)

func (*Plugin) FindByVersion

func (p *Plugin) FindByVersion(ctx context.Context, id id.PluginID, version string) (*plugin.VersionedPlugin, error)

func (*Plugin) ImageURL

func (p *Plugin) ImageURL(ctx context.Context, name string) string

func (*Plugin) IncreaseDownloadCount

func (p *Plugin) IncreaseDownloadCount(ctx context.Context, id id.PluginID, version string) error

func (*Plugin) Like

func (p *Plugin) Like(ctx context.Context, user *user.User, id id.PluginID) (_ *plugin.VersionedPlugin, err error)

func (*Plugin) Liked

func (p *Plugin) Liked(ctx context.Context, user *user.User, id id.PluginID) (bool, error)

func (*Plugin) List

func (*Plugin) Parse

func (p *Plugin) Parse(ctx context.Context, publisher *user.User, r io.Reader) (*plugin.VersionedPlugin, error)

func (*Plugin) ParseFromRepo

func (p *Plugin) ParseFromRepo(ctx context.Context, publisher *user.User, repo *string) (*plugin.VersionedPlugin, error)

func (*Plugin) Search

func (*Plugin) Unlike

func (p *Plugin) Unlike(ctx context.Context, user *user.User, id id.PluginID) (*plugin.VersionedPlugin, error)

func (*Plugin) Update

func (*Plugin) UpdateVersion

func (p *Plugin) UpdateVersion(ctx context.Context, user *user.User, param interfaces.UpdatePluginVersionParam) (_ *plugin.VersionedPlugin, err error)

func (*Plugin) Versions

func (p *Plugin) Versions(ctx context.Context, id id.PluginID) ([]*plugin.Version, error)

type User

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

func (*User) FindByID

func (i *User) FindByID(ctx context.Context, uid id.UserID) (*user.User, error)

func (*User) FindByIDs

func (i *User) FindByIDs(ctx context.Context, uids []id.UserID) ([]*user.User, error)

func (*User) Update

func (i *User) Update(ctx context.Context, u *user.User, param interfaces.UpdateUserParam) (*user.User, error)

Jump to

Keyboard shortcuts

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