models

package
v0.0.0-...-7da44d4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BookmarkGroup

type BookmarkGroup struct {
	ID   int64
	Name string
}

type BookmarkGroupRepository

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

func NewBookmarkGroupRepository

func NewBookmarkGroupRepository(db *sql.DB) *BookmarkGroupRepository

func (*BookmarkGroupRepository) Create

Create a new bookmark group and set it as the current bookmark group

func (*BookmarkGroupRepository) Delete

func (r *BookmarkGroupRepository) Delete(bookmarkGroupName string) error

func (*BookmarkGroupRepository) GetByName

func (r *BookmarkGroupRepository) GetByName(name string) (*BookmarkGroup, error)

func (*BookmarkGroupRepository) GetCurrent

func (r *BookmarkGroupRepository) GetCurrent() (*BookmarkGroup, error)

Get current bookmark group

func (*BookmarkGroupRepository) List

List all bookmark groups

type Branch

type Branch struct {
	ID              int64
	BookmarkGroupID int64
	Name            string
	Alias           string
	CreatedAt       time.Time
	UpdatedAt       time.Time
}

type BranchCheckout

type BranchCheckout struct {
	ID               int64
	Name             string
	CheckoutCount    int64
	LastCheckedOutAt time.Time
	LatestCommitMsg  string
}

type BranchCheckoutRepository

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

func NewBranchCheckoutRepository

func NewBranchCheckoutRepository(db *sql.DB) *BranchCheckoutRepository

func (*BranchCheckoutRepository) DeleteAll

func (r *BranchCheckoutRepository) DeleteAll() error

func (*BranchCheckoutRepository) GetFrequent

func (r *BranchCheckoutRepository) GetFrequent(limit int, isReverse bool) ([]BranchCheckout, error)

func (*BranchCheckoutRepository) GetRecent

func (r *BranchCheckoutRepository) GetRecent(limit int, isReverse bool) ([]BranchCheckout, error)

func (*BranchCheckoutRepository) GetRecentFrequent

func (r *BranchCheckoutRepository) GetRecentFrequent(limit int, isReverse bool) ([]BranchCheckout, error)

func (*BranchCheckoutRepository) Upsert

type BranchRepository

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

func NewBranchRepository

func NewBranchRepository(db *sql.DB) *BranchRepository

func (*BranchRepository) Create

func (r *BranchRepository) Create(b *Branch) error

func (*BranchRepository) GetByName

func (r *BranchRepository) GetByName(bookmarkGroupID int64, name string) (*Branch, error)

func (*BranchRepository) ListByBookmarkGroupId

func (r *BranchRepository) ListByBookmarkGroupId(bookmarkGroupID int64) ([]Branch, error)

func (*BranchRepository) Remove

func (r *BranchRepository) Remove(bookmarkGroupID int64, name string) error

type CurrentBookmarkGroup

type CurrentBookmarkGroup struct {
	BookmarkGroupID int64
}

type CurrentBookmarkGroupRepository

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

func NewCurrentBookmarkGroupRepository

func NewCurrentBookmarkGroupRepository(db *sql.DB) *CurrentBookmarkGroupRepository

func (*CurrentBookmarkGroupRepository) GetCurrentBookmarkGroupId

func (r *CurrentBookmarkGroupRepository) GetCurrentBookmarkGroupId() (int64, error)

func (*CurrentBookmarkGroupRepository) SetCurrentBookmarkGroupId

func (r *CurrentBookmarkGroupRepository) SetCurrentBookmarkGroupId(bookmarkGroupID int64) error

You might also want to add a method to set the current bookmark group

Jump to

Keyboard shortcuts

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