common

package
v0.2.7-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2016 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() (*config.Config, *gocql.Session)

Init initializes a gophr backend component. Returns all the pre-requisites to starting up successfully.

Types

type Refs

type Refs struct {
	Data                 []byte
	DataStr              string
	DataLen              int
	DataStrLen           int
	Candidates           semver.SemverCandidateList
	MasterRefHash        string
	IndexHeadLineEnd     int
	IndexHeadLineStart   int
	IndexMasterLineEnd   int
	IndexMasterLineStart int
}

Refs collects information about git references for one specific repository.

func FetchRefs

func FetchRefs(author, repo string) (Refs, error)

FetchRefs downloads and processes refs data from Github and ultimately contructs a Refs instance with it.

func NewRefs

func NewRefs(data []byte) (Refs, error)

NewRefs creates a new Refs instance from raw refs data fetched from Github (or elsewhere).

func (Refs) Reserialize

func (refsData Refs) Reserialize(versionRefName, versionRefHash string) []byte

Reserialize changes the refs data to incorporate the selected version as the HEAD instead of the default HEAD.

This code was written by Gustavo Niemeyer, Nathan Youngman and Geert-Johan Riemer.

type RequestContext

type RequestContext struct {
	DB        *gocql.Session
	RequestID string
}

RequestContext is a struct that keeps track of information that is relevant to one specific request.

func NewRequestContext

func NewRequestContext(dbSession *gocql.Session) RequestContext

NewRequestContext creates a new RequestContext.

Directories

Path Synopsis
db

Jump to

Keyboard shortcuts

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