issuesstore

package
v0.0.0-...-dcf5b65 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Issue

type Issue struct {
	StoryID             string            `bson:"story_id"`
	UserID              string            `bson:"user_id"`
	Body                string            `bson:"body,omitempty"`
	CommentCount        int64             `bson:"comment_count,omitempty"`
	Id                  string            `bson:"_id"`
	IssueType           string            `bson:"issue_type,omitempty"`
	Labels              []*string         `bson:"labels,omitempty"`
	Repository          string            `bson:"repository,omitempty"`
	RepositoryAvatar    string            `bson:"repository_avatar,omitempty"`
	RepositoryUpdatedAt time.Time         `bson:"repository_updated_at,omitempty"`
	Title               string            `bson:"title,omitempty"`
	Url                 string            `bson:"url,omitempty"`
	Ownership           *authorizer.Scope `bson:"ownership,omitempty"`
}

func NewIssue

func NewIssue() *Issue

func (*Issue) Get

func (issue *Issue) Get(field string) interface{}

type IssueFilters

type IssueFilters struct {
	Ids       []string
	IssueType *string
	Story     *storiesstore.Story
	User      *usersstore.User
}

type IssueSortBy

type IssueSortBy uint8
const (
	IssueSortByDefault IssueSortBy = iota
	IssueSortByRepositoryUpdatedAt
)

func GetIssueSortByFromString

func GetIssueSortByFromString(s string) IssueSortBy

func (IssueSortBy) CursorType

func (s IssueSortBy) CursorType() cursor.ValueType

func (IssueSortBy) String

func (s IssueSortBy) String() string

type Store

type Store interface {
	// issue methods
	GetIssueByID(ctx context.Context, id string) (*Issue, error)
	GetOneIssue(ctx context.Context, filters *IssueFilters) (*Issue, error)
	GetIssues(ctx context.Context, filters *IssueFilters, after *string, before *string, first *int64, last *int64, sortBy IssueSortBy, sortOrder *string) ([]*Issue, bool, bool, []string, error)
	CountIssues(ctx context.Context, filters *IssueFilters) (int64, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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