Something went wrong. Try again.
Lightweight and easily self-hostable Git forge.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738package app
import ( "farga/db/types" "farga/lib"
"github.com/go-git/go-git/v6" "github.com/google/uuid")
type Store interface { LoginUser(email, password string) (*types.User, error) NewUser(user *types.User) error User(id uuid.UUID) (*types.User, error) NewSession(userID *uuid.UUID) (types.Session, error) Session(token uuid.UUID) (types.Session, error) RemoveSession(sessionID string) error UserRepos(userID *uuid.UUID) ([]types.Repo, error) SaveHackatimeToken(userID uuid.UUID, token string) error
NewRepo(user *types.User, repo *types.Repo) (*git.Repository, error) SetRepoHackatimeName(repoID uuid.UUID, name string) error RepoHandle(userHandle, repoName string) (types.Repo, error)
NewIssue(issue *types.Issue) error Issue(repo *types.Repo, issueNumber uint) (types.Issue, error) IssueComments(issueID uuid.UUID) ([]types.IssueComment, error) NewIssueComment(comment *types.IssueComment) error
UpdateUserConfig(userId uuid.UUID, config types.UserConfig) error NewPubKey(name string, pubKey lib.SSHPubKey, userID uuid.UUID) (types.SSHPubKey, error) DeletePubKey(keyID uuid.UUID, userID uuid.UUID) error
CreateOAuthState(id uuid.UUID) (*types.OAuthState, error) OAuthState(token string) (types.OAuthState, error) RemoveOAuthState(id uuid.UUID) error}