database

package
v0.0.0-...-4f682fb Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 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 Database

type Database struct {
	MongoClient *mongo.Database
}

Database is the connection to the database.

func New

func New(opts *Opts) (*Database, error)

New initializes a database instance.

func (*Database) Create

func (d *Database) Create(build *build.Build) (string, error)

Create inserts a new build.

type Opts

type Opts struct {
	Host     string
	Port     string
	Database string
	URI      string
}

Opts is the information to connnect to the database. If URI is set, it overwrites all other connection configuration.

Jump to

Keyboard shortcuts

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