repostore

package
v0.0.0-...-b0fec18 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoReadmeFound = errors.New("no readme found")

Functions

This section is empty.

Types

type ArtifactType

type ArtifactType string
const (
	ArtifactTypeReadme ArtifactType = "repo.readme"
)

func (ArtifactType) String

func (a ArtifactType) String() string

type RepoStore

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

func New

func New(s *sql.DB) (*RepoStore, error)

func (*RepoStore) GetAll

func (s *RepoStore) GetAll(ctx context.Context) ([]repos.Repository, error)

func (*RepoStore) GetReadme

func (s *RepoStore) GetReadme(ctx context.Context, repoID int) ([]byte, error)

func (*RepoStore) SetReadme

func (s *RepoStore) SetReadme(ctx context.Context, repoID int, data []byte) error

func (*RepoStore) UpsertMany

func (s *RepoStore) UpsertMany(ctx context.Context, items []repos.Repository) error

func (*RepoStore) UpsertOne

func (s *RepoStore) UpsertOne(ctx context.Context, item repos.Repository) error

Jump to

Keyboard shortcuts

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