graph

package
v0.0.0-...-6899a91 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2019 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerGraph

func HandlerGraph(repo *Repository, depRepo *deployment.Repository) gin.HandlerFunc

HandlerGraph returns a dependency graph for a given deployment

Types

type Repository

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

Repository is a repository manager

func NewRepository

func NewRepository(db *gorm.DB) *Repository

NewRepository creates a repository

func (*Repository) FindAll

func (repo *Repository) FindAll() (*graphapi.Graph, error)

FindAll fetch a collection of nodes matching each criteria criteria are not used now

func (*Repository) FindAllActive

func (repo *Repository) FindAllActive(criteria map[string]interface{}) (*graphapi.Graph, error)

FindAllActive fetch a collection of nodes matching each criteria

func (*Repository) FindByDeployment

func (repo *Repository) FindByDeployment(publicID string) (*graphapi.Graph, error)

FindByDeployment find all inbound and outbound dependencies for a deployment

func (*Repository) GetType

func (repo *Repository) GetType() reflect.Type

GetType returns the entity type managed by this repository

func (*Repository) Map

func (repo *Repository) Map(entity interface{}, mappers map[string]graphapi.ImplementNode) graphapi.ImplementNode

Map api entity

func (*Repository) Resolve

func (repo *Repository) Resolve(entity interface{}, mappers map[string]graphapi.ImplementNode)

Resolve resolve dependencies

Source Files

  • handlers.go
  • repository.go

Jump to

Keyboard shortcuts

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