project

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const SourceProjectPrefix = "__"

Variables

This section is empty.

Functions

This section is empty.

Types

type Project

type Project struct {
	Key         string         `json:"-"`
	Title       string         `json:"title,omitempty"`
	Icon        string         `json:"icon,omitempty"`
	Description string         `json:"description,omitempty"`
	Sources     []string       `json:"sources,omitempty"`
	Actions     action.Actions `json:"actions"`
}

func (*Project) IconWithFallback

func (p *Project) IconWithFallback() string

func (*Project) Name

func (p *Project) Name() string

func (*Project) WebPath

func (p *Project) WebPath() string

type Projects

type Projects []*Project

func (Projects) Get

func (p Projects) Get(key string) *Project

func (Projects) Replace

func (p Projects) Replace(n *Project) Projects

func (Projects) Sort

func (p Projects) Sort()

type Service

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

func NewService

func NewService(files filesystem.FileLoader, sources *source.Service, ld *loader.Service, logger *zap.SugaredLogger) *Service

func (*Service) Clear

func (s *Service) Clear()

func (*Service) Delete

func (s *Service) Delete(key string) error

func (*Service) List

func (s *Service) List(_ context.Context) (Projects, error)

func (*Service) Load

func (s *Service) Load(key string, force bool) (*Project, error)

func (*Service) LoadRequired

func (s *Service) LoadRequired(key string, force bool) (*Project, error)

func (*Service) LoadSourceProject

func (s *Service) LoadSourceProject(srcKey string) (*View, error)

func (*Service) LoadView

func (s *Service) LoadView(key string) (*View, error)

func (*Service) ReloadProject

func (s *Service) ReloadProject(key string) error

func (*Service) Save

func (s *Service) Save(prj *Project, overwrite bool) error

func (*Service) Search

func (s *Service) Search(ctx context.Context, q string) (result.Results, error)

type View

type View struct {
	Project  *Project        `json:"project"`
	Sources  source.Sources  `json:"sources,omitempty"`
	Schemata schema.Schemata `json:"schemata,omitempty"`
}

Jump to

Keyboard shortcuts

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