Documentation
¶
Index ¶
- func ReadMultipartFiles(form *multipart.Form) (map[string][]byte, error)
- type PublishRequest
- type SkillService
- func (s *SkillService) Download(ctx context.Context, slug, version string, identityHash string) (io.ReadCloser, string, error)
- func (s *SkillService) GetFile(ctx context.Context, slug, version, path string) ([]byte, error)
- func (s *SkillService) GetSkill(ctx context.Context, slug string) (*model.SkillWithOwner, error)
- func (s *SkillService) GetVersion(ctx context.Context, slug, version string) (*model.SkillVersion, error)
- func (s *SkillService) GetVersions(ctx context.Context, slug string) ([]model.SkillVersion, error)
- func (s *SkillService) ListSkills(ctx context.Context, limit int, cursor, sort string) ([]model.SkillWithOwner, string, error)
- func (s *SkillService) PublishVersion(ctx context.Context, user *model.User, req PublishRequest) (*model.SkillWithOwner, *model.SkillVersion, error)
- func (s *SkillService) ResolveFingerprint(ctx context.Context, fingerprint string) (*model.SkillVersion, *model.SkillWithOwner, error)
- func (s *SkillService) SoftDelete(ctx context.Context, user *model.User, slug string) error
- func (s *SkillService) Star(ctx context.Context, userID uuid.UUID, slug string) error
- func (s *SkillService) Undelete(ctx context.Context, user *model.User, slug string) error
- func (s *SkillService) Unstar(ctx context.Context, userID uuid.UUID, slug string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PublishRequest ¶
type SkillService ¶
type SkillService struct {
// contains filtered or unexported fields
}
func NewSkillService ¶
func NewSkillService( skillRepo *repository.SkillRepo, versionRepo *repository.VersionRepo, userRepo *repository.UserRepo, downloadRepo *repository.DownloadRepo, starRepo *repository.StarRepo, gs *gitstore.GitStore, sc *search.Client, ms *gitstore.MirrorService, ) *SkillService
func (*SkillService) Download ¶
func (s *SkillService) Download(ctx context.Context, slug, version string, identityHash string) (io.ReadCloser, string, error)
Download returns a zip archive for a skill version.
func (*SkillService) GetSkill ¶
func (s *SkillService) GetSkill(ctx context.Context, slug string) (*model.SkillWithOwner, error)
GetSkill returns a skill by slug.
func (*SkillService) GetVersion ¶
func (s *SkillService) GetVersion(ctx context.Context, slug, version string) (*model.SkillVersion, error)
GetVersion returns a specific version.
func (*SkillService) GetVersions ¶
func (s *SkillService) GetVersions(ctx context.Context, slug string) ([]model.SkillVersion, error)
GetVersions returns all versions for a skill.
func (*SkillService) ListSkills ¶
func (s *SkillService) ListSkills(ctx context.Context, limit int, cursor, sort string) ([]model.SkillWithOwner, string, error)
ListSkills returns a paginated list of skills.
func (*SkillService) PublishVersion ¶
func (s *SkillService) PublishVersion(ctx context.Context, user *model.User, req PublishRequest) (*model.SkillWithOwner, *model.SkillVersion, error)
func (*SkillService) ResolveFingerprint ¶
func (s *SkillService) ResolveFingerprint(ctx context.Context, fingerprint string) (*model.SkillVersion, *model.SkillWithOwner, error)
ResolveFingerprint finds a version by its fingerprint.
func (*SkillService) SoftDelete ¶
SoftDelete soft-deletes a skill.
Click to show internal directories.
Click to hide internal directories.