project

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 13 Imported by: 0

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) *Service

func (*Service) Clear

func (s *Service) Clear()

func (*Service) Delete

func (s *Service) Delete(key string, logger util.Logger) error

func (*Service) List

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

func (*Service) Load

func (s *Service) Load(key string, force bool, logger util.Logger) (*Project, error)

func (*Service) LoadRequired

func (s *Service) LoadRequired(key string, force bool, logger util.Logger) (*Project, error)

func (*Service) LoadSourceProject

func (s *Service) LoadSourceProject(srcKey string, logger util.Logger) (*View, error)

func (*Service) LoadView

func (s *Service) LoadView(key string, logger util.Logger) (*View, error)

func (*Service) ReloadProject

func (s *Service) ReloadProject(key string, logger util.Logger) error

func (*Service) Save

func (s *Service) Save(prj *Project, overwrite bool, logger util.Logger) error

func (*Service) Search

func (s *Service) Search(ctx context.Context, q string, logger util.Logger) (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