repository

package
v0.0.0-...-32bbb43 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountRepository

type AccountRepository struct {
	Conn *gorm.DB
}

func NewAccountRepository

func NewAccountRepository(conn *gorm.DB) *AccountRepository

func (*AccountRepository) Create

func (repo *AccountRepository) Create(account domain.Account) error

func (*AccountRepository) FindByEmail

func (repo *AccountRepository) FindByEmail(email string) (domain.Account, error)

func (*AccountRepository) FindByLogin

func (repo *AccountRepository) FindByLogin(login string) (domain.Account, error)

func (*AccountRepository) List

func (repo *AccountRepository) List() ([]domain.Account, error)

func (*AccountRepository) UpdateIcon

func (repo *AccountRepository) UpdateIcon(login, icon string) error

func (*AccountRepository) UpdateRole

func (repo *AccountRepository) UpdateRole(login, role string) error

type DescriptionRepository

type DescriptionRepository struct {
	Conn *gorm.DB
}

func NewDescriptionRepository

func NewDescriptionRepository(conn *gorm.DB) *DescriptionRepository

func (*DescriptionRepository) Create

func (repo *DescriptionRepository) Create(description domain.Description) error

func (*DescriptionRepository) Delete

func (repo *DescriptionRepository) Delete(id uint) error

func (*DescriptionRepository) ListByAuthor

func (repo *DescriptionRepository) ListByAuthor(author uint) ([]domain.Description, error)

func (*DescriptionRepository) ListByImplementation

func (repo *DescriptionRepository) ListByImplementation(impl string) ([]domain.Description, error)

func (*DescriptionRepository) Update

func (repo *DescriptionRepository) Update(id uint, content string) error

type ImplementationRepository

type ImplementationRepository struct {
	Conn *gorm.DB
}

func NewImplementationRepository

func NewImplementationRepository(conn *gorm.DB) *ImplementationRepository

func (*ImplementationRepository) AddArgument

func (repo *ImplementationRepository) AddArgument(field, name, value string) error

func (*ImplementationRepository) CountArguments

func (repo *ImplementationRepository) CountArguments(field, name string) (uint, error)

func (*ImplementationRepository) Create

func (*ImplementationRepository) Find

func (*ImplementationRepository) FindRoot

func (repo *ImplementationRepository) FindRoot(name string) (domain.Version, error)

func (*ImplementationRepository) GetArguments

func (repo *ImplementationRepository) GetArguments(field, name string) ([]string, error)

func (*ImplementationRepository) List

func (*ImplementationRepository) RemoveArgument

func (repo *ImplementationRepository) RemoveArgument(field, name string, index uint) error

func (*ImplementationRepository) UpdateArgument

func (repo *ImplementationRepository) UpdateArgument(field, name string, index uint, value string) error

type LanguageRepository

type LanguageRepository struct {
	Conn *gorm.DB
}

func NewLanguageRepository

func NewLanguageRepository(conn *gorm.DB) *LanguageRepository

func (*LanguageRepository) Create

func (repo *LanguageRepository) Create(language domain.Language) error

func (*LanguageRepository) Delete

func (repo *LanguageRepository) Delete(name, version string) error

func (*LanguageRepository) Find

func (repo *LanguageRepository) Find(name, version string) (domain.Language, error)

func (*LanguageRepository) List

func (repo *LanguageRepository) List() ([]string, error)

func (*LanguageRepository) VersionsOfLanguage

func (repo *LanguageRepository) VersionsOfLanguage(name string) ([]string, error)

type LibraryRepository

type LibraryRepository struct {
	Conn *gorm.DB
}

func NewLibraryRepository

func NewLibraryRepository(conn *gorm.DB) *LibraryRepository

func (*LibraryRepository) Create

func (repo *LibraryRepository) Create(library domain.Library) error

func (*LibraryRepository) Delete

func (repo *LibraryRepository) Delete(name, version string) error

func (*LibraryRepository) Find

func (repo *LibraryRepository) Find(name, version string) (domain.Library, error)

func (*LibraryRepository) FindByLanguage

func (repo *LibraryRepository) FindByLanguage(name, version string) ([]string, error)

func (*LibraryRepository) VersionsOfLibrary

func (repo *LibraryRepository) VersionsOfLibrary(name string) ([]string, error)

type TagRepository

type TagRepository struct {
	Conn *gorm.DB
}

func NewTagRepository

func NewTagRepository(conn *gorm.DB) *TagRepository

func (*TagRepository) Delete

func (repo *TagRepository) Delete(id uint) error

func (*TagRepository) Find

func (repo *TagRepository) Find(category, content string) (domain.Tag, error)

func (*TagRepository) FindOrCreate

func (repo *TagRepository) FindOrCreate(category, content string) (domain.Tag, error)

func (*TagRepository) Update

func (repo *TagRepository) Update(id uint, content string) error

type TestRepository

type TestRepository struct {
	Conn *gorm.DB
}

func NewTestRepository

func NewTestRepository(conn *gorm.DB) *TestRepository

func (*TestRepository) Create

func (repo *TestRepository) Create(test domain.Test) error

func (*TestRepository) Delete

func (repo *TestRepository) Delete(id uint) error

func (*TestRepository) List

func (repo *TestRepository) List(impl string) ([]domain.Test, error)

func (*TestRepository) ListByAuthor

func (repo *TestRepository) ListByAuthor(author uint) ([]domain.Test, error)

func (*TestRepository) UpdateArgument

func (repo *TestRepository) UpdateArgument(field string, id, index uint, value string) error

func (*TestRepository) UpdateDescription

func (repo *TestRepository) UpdateDescription(id uint, description string) error

type TreeRepository

type TreeRepository struct {
	Conn *gorm.DB
}

func NewTreeRepository

func NewTreeRepository(conn *gorm.DB) *TreeRepository

func (*TreeRepository) Create

func (repo *TreeRepository) Create(tree domain.Tree) error

func (*TreeRepository) Delete

func (repo *TreeRepository) Delete(name string) error

func (*TreeRepository) FindParent

func (repo *TreeRepository) FindParent(name string) (domain.Version, error)

func (*TreeRepository) ListChildren

func (repo *TreeRepository) ListChildren(name string) ([]domain.Version, error)

func (*TreeRepository) ListTreeBFS

func (repo *TreeRepository) ListTreeBFS(name string) ([]domain.TreeMinimized, error)

type VersionRepository

type VersionRepository struct {
	Conn *gorm.DB
}

func NewVersionRepository

func NewVersionRepository(conn *gorm.DB) *VersionRepository

func (*VersionRepository) AddLibrary

func (repo *VersionRepository) AddLibrary(name string, library domain.Library) error

func (*VersionRepository) AddTag

func (repo *VersionRepository) AddTag(name string, tag domain.Tag) error

func (*VersionRepository) ClearLibraries

func (repo *VersionRepository) ClearLibraries(name string) error

func (*VersionRepository) ClearTags

func (repo *VersionRepository) ClearTags(name string) error

func (*VersionRepository) Create

func (repo *VersionRepository) Create(version domain.Version) error

func (*VersionRepository) Delete

func (repo *VersionRepository) Delete(name string) error

func (*VersionRepository) DeleteLibrary

func (repo *VersionRepository) DeleteLibrary(name string, library domain.Library) error

func (*VersionRepository) DeleteTag

func (repo *VersionRepository) DeleteTag(name string, tag domain.Tag) error

func (*VersionRepository) Find

func (repo *VersionRepository) Find(name string) (domain.Version, error)

func (*VersionRepository) LibraryIsValid

func (repo *VersionRepository) LibraryIsValid(name string, library domain.Library) bool

func (*VersionRepository) ListByAuthor

func (repo *VersionRepository) ListByAuthor(author uint) ([]domain.Version, error)

func (*VersionRepository) ListLibraries

func (repo *VersionRepository) ListLibraries(name string) ([]domain.Library, error)

func (*VersionRepository) ListTags

func (repo *VersionRepository) ListTags(name string) ([]domain.Tag, error)

func (*VersionRepository) UpdateCode

func (repo *VersionRepository) UpdateCode(name, code string) error

Jump to

Keyboard shortcuts

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