persistence

package
v0.0.0-...-0a7f23c Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMongo

func NewMongo() (*mongo, error)

NewMongo returns a DAO implementation for mongo

Types

type Analysis

type Analysis struct {
	Leaks []*Leak `json:"leaks"`
	Hash  string  `json:"hash"`
	Time  int64   `json:"timestamp"`
}

Analysis represents a leak analysis

type DAO

type DAO interface {
	UpdateRepo(repository Repository) error
	InsertRepo(repository Repository) error
	FindRepo(url string) (Repository, error)
	FindAll(skip int, limit int) ([]Repository, error)
}

DAO defines the interface for a repository DAO

type Infos

type Infos struct {
	Projects int `json:"projects"`
	Leaks    int `json:"leaks"`
}

type Leak

type Leak struct {
	File    string `json:"file"`
	Line    int    `json:"line"`
	Column  int    `json:"column"`
	Message string `json:"message"`
}

Leak represents one dependency leak

type Repository

type Repository struct {
	URL      string      `json:"url"`
	Analysis []*Analysis `json:"analysis"`
	Language string
}

Repository represents an analyzed repository

Jump to

Keyboard shortcuts

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