collection

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection struct {
	Key          string   `json:"key"`
	Title        string   `json:"title,omitempty"`
	Description  string   `json:"description,omitempty"`
	Owner        string   `json:"owner,omitempty"`
	Path         string   `json:"path,omitempty"`
	RequestOrder []string `json:"requestOrder,omitempty"`
}

func (*Collection) Matches

func (c *Collection) Matches(q string) (bool, string, string, string)

func (*Collection) Normalize

func (c *Collection) Normalize(key string, p string) *Collection

func (*Collection) TitleWithFallback

func (c *Collection) TitleWithFallback() string

type Collections

type Collections []*Collection

type FullCollection

type FullCollection struct {
	Coll     *Collection      `json:"coll"`
	Requests request.Requests `json:"reqs"`
	Sess     *session.Session `json:"sess"`
}

type Service

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

func NewService

func NewService(multiuser bool, f npncore.FileLoader, logger *logrus.Logger) *Service

func (*Service) Counts

func (s *Service) Counts(userID *uuid.UUID) (Summaries, error)

func (*Service) Delete

func (s *Service) Delete(userID *uuid.UUID, key string) error

func (*Service) List

func (s *Service) List(userID *uuid.UUID) (Collections, error)

func (*Service) Load

func (s *Service) Load(userID *uuid.UUID, key string) (*Collection, error)

func (*Service) Save

func (s *Service) Save(userID *uuid.UUID, originalKey string, newKey string, title string, description string) error

type Summaries

type Summaries []*Summary

type Summary

type Summary struct {
	Coll  *Collection `json:"coll"`
	Count int         `json:"count"`
}

Jump to

Keyboard shortcuts

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