repository

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClient

func GetClient(projectID string) *datastore.Client

Types

type GroupRepository

type GroupRepository interface {
	Put(teamID string, group *model.Group) error
	List(teamID string, cursor string, limit int) ([]*model.Group, string, error)
}

func NewGroupRepository

func NewGroupRepository(client *datastore.Client) GroupRepository

type InstallationRepository

type InstallationRepository interface {
	Put(ctx context.Context, installation *model.Installation) error
	Get(ctx context.Context, id int64) (*model.Installation, error)
}

func NewInstallationRepository

func NewInstallationRepository(client *datastore.Client) InstallationRepository

type RepoRepository

type RepoRepository interface {
	List(ctx context.Context, cursor string, limit int) ([]*model.Repo, string, error)
	Get(ctx context.Context, id int64) (*model.Repo, error)
	Put(ctx context.Context, repo *model.Repo) error
	Delete(ctx context.Context, id int64) error
}

func NewRepoRepository

func NewRepoRepository(client *datastore.Client) RepoRepository

type Reviewer

type Reviewer struct {
	SlackID string
}

type TaskRepository

type TaskRepository interface {
	List(ctx context.Context, cursor string, limit int) ([]*model.Task, string, error)
	Put(ctx context.Context, task *model.Task) error
	Get(ctx context.Context, id int64) (*model.Task, error)
	Delete(ctx context.Context, id int64) error
}

func NewTaskRepository

func NewTaskRepository(client *datastore.Client) TaskRepository

type TeamRepository

type TeamRepository interface {
	Put(ctx context.Context, team *model.Team) error
	Get(ctx context.Context, id int64) (*model.Team, error)
	// TODO: cursor
	List()
	GetBySlackTeamID(ctx context.Context, slackTeamID string) (*model.Team, error)
}

func NewTeamRepository

func NewTeamRepository(client *datastore.Client) TeamRepository

type UserRepository

type UserRepository interface {
	List(ctx context.Context, teamID int64, cursor string, limit int) ([]*model.User, string, error)
	Put(ctx context.Context, teamID int64, user *model.User) error
	Get(ctx context.Context, teamID int64, id int64) (*model.User, error)
	FindByGithubID(ctx context.Context, githubID string) (*model.User, error)
	FindBySlackID(ctx context.Context, slackID string) (*model.User, error)
	Delete(ctx context.Context, teamID int64, id int64) error
}

func NewUserRepository

func NewUserRepository(client *datastore.Client) UserRepository

Directories

Path Synopsis
Package mock_repository is a generated GoMock package.
Package mock_repository is a generated GoMock package.

Jump to

Keyboard shortcuts

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