features

package
v0.0.0-...-f1c6d0e Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CoreCorporationFeatureId = "core-corporation"
	CoreCalendarFeatureId    = "core-calendar"
	CoreMailFeatureId        = "core-mail"
)

Functions

This section is empty.

Types

type Engine

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

func New

func New(b *i18n.Bundle) *Engine

func (*Engine) DiffScopes

func (e *Engine) DiffScopes(currentIDs, enableIDs, disableIDs []string, langs ...language.Tag) (added, removed []Scope, err error)

func (*Engine) GetAllFeatures

func (e *Engine) GetAllFeatures(langs ...language.Tag) ([]Feature, error)

func (*Engine) GetFeatures

func (e *Engine) GetFeatures(ids []string, langs ...language.Tag) ([]Feature, error)

func (*Engine) GetRequiredFeatures

func (e *Engine) GetRequiredFeatures(langs ...language.Tag) ([]Feature, error)

func (*Engine) ValidateFeatureIDs

func (e *Engine) ValidateFeatureIDs(ids []string) error

type Feature

type Feature struct {
	ID          string
	Name        string
	Description string
	Scopes      []ScopeExplanation
	Required    bool
}

type List

type List []Feature

func (List) IDs

func (l List) IDs() []string

func (List) ScopeExplanations

func (l List) ScopeExplanations() []ScopeExplanations

func (List) Scopes

func (l List) Scopes() []Scope

type Scope

type Scope string

type ScopeExplanation

type ScopeExplanation struct {
	Scope       Scope
	Explanation string
}

type ScopeExplanations

type ScopeExplanations struct {
	Scope        Scope
	Explanations []string
}

type ScopeExplanationsList

type ScopeExplanationsList []ScopeExplanations

func (ScopeExplanationsList) Len

func (s ScopeExplanationsList) Len() int

func (ScopeExplanationsList) Less

func (s ScopeExplanationsList) Less(i, j int) bool

func (ScopeExplanationsList) Swap

func (s ScopeExplanationsList) Swap(i, j int)

type Scopes

type Scopes []Scope

func (Scopes) Len

func (s Scopes) Len() int

func (Scopes) Less

func (s Scopes) Less(i, j int) bool

func (Scopes) Swap

func (s Scopes) Swap(i, j int)

Jump to

Keyboard shortcuts

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