gopherci

package
v0.0.0-...-cc0b965 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2017 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package gopherci is a client library for GopherCI, it should be refactored into GopherCI itself, and used as a library but offer no backwards compatibility guarantees.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a GopherCI client used to interact with internal GopherCI database.

func New

func New(db *sqlx.DB) *Client

New returns a GopherCI client given a db and driver.

func (*Client) DisableInstallation

func (c *Client) DisableInstallation(installationID int) error

DisableInstallation disables an installationID in GopherCI's DB.

func (*Client) EnableInstallation

func (c *Client) EnableInstallation(installationID int) error

EnableInstallation enables an installationID in GopherCI's DB.

func (*Client) ListInstallations

func (c *Client) ListInstallations(accountIDs ...int) ([]Installation, error)

ListInstallations returns a slice of installations matching accountIDs, if no rows matched, installations is nil.

type Installation

type Installation struct {
	InstallationID int `db:"installation_id"`
	AccountID      int `db:"account_id"`
}

Installation represents a row from the gh_installations table.

Jump to

Keyboard shortcuts

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