database

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitEntry

type CommitEntry struct {
	gorm.Model
	RepoName    string
	UserName    string
	AuthorName  string
	AuthorEmail string
	Message     string
	SHA         string
}

type Database

type Database interface {
	Insert(CommitEntry)
	Connect() error
}

type Mysql

type Mysql struct {
	Dsn string
	// contains filtered or unexported fields
}

implements interface database

func (*Mysql) Connect

func (d *Mysql) Connect() error

func (*Mysql) Insert

func (d *Mysql) Insert(c CommitEntry)

type Postgres

type Postgres struct {
	Dsn string
	// contains filtered or unexported fields
}

implements interface database

func (*Postgres) Connect

func (d *Postgres) Connect() error

func (*Postgres) Insert

func (d *Postgres) Insert(c CommitEntry)

type Sqlite

type Sqlite struct {
	SqLiteDB string
	// contains filtered or unexported fields
}

func (*Sqlite) BatchInsert

func (d *Sqlite) BatchInsert(c CommitEntry)

func (*Sqlite) Connect

func (d *Sqlite) Connect() error

func (*Sqlite) Insert

func (d *Sqlite) Insert(c CommitEntry)

Jump to

Keyboard shortcuts

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