Back to godoc.org
github.com/DevMine/api-server/util/apiutil

package apiutil

v0.0.0 (d26fc85)
Latest Go to latest
Published: May 2, 2015 | License: BSD-3-Clause | Module: github.com/DevMine/api-server

Overview

Package apiutil provides various functions meant to be used by handlers from the api package.

Index

func CreateGhOrgsFromPGArray

func CreateGhOrgsFromPGArray(pgArray string) []*model.GhOrganization

CreateGhOrgsFromPGArray generates a slice of GhOrganization from a PostgresSQL array from gh_organizations table. Elements MUST be in table order. FIXME Find a safer way to deal with this

func FetchRepository

func FetchRepository(db *sql.DB, id *int64) *model.Repository

FetchRepository retrieves a repository from the database.

func FetchUser

func FetchUser(db *sql.DB, id *int64) *model.User

FetchUser retrieves a user from the database.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier