helpers

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Languages = []string{
	"Unknown",
	"English",
	"French",
	"Spanish",
	"German",
	"Italian",
	"Danish",
	"Dutch",
	"Japanese",
	"Icelandic",
	"Chinese",
	"Russian",
	"Polish",
	"Vietnamese",
	"Swedish",
	"Norwegian",
	"Finnish",
	"Turkish",
	"Portuguese",
	"Flemish",
	"Greek",
	"Korean",
	"Hungarian",
	"Hebrew",
	"Lithuanian",
	"Czech",
	"Arabic",
	"Hindi",
	"Bulgarian",
	"Malayalam",
	"Ukrainian",
}

Languages is the available language list. var Languages, _ = GetLanguages().

Functions

func GetLanguageID

func GetLanguageID(language string) int64

GetLanguageID retrieve language ID of a given language.

func GetLanguages

func GetLanguages() ([]string, error)

GetLanguages pull languages from Sonarr source code and converts it to slice. using static slice to avoid github dependency.

Types

type StringLowercaseValidator

type StringLowercaseValidator struct{}

func StringLowercase

func StringLowercase() StringLowercaseValidator

StringLowercase checks that a string is lowercase.

func (StringLowercaseValidator) Description

func (v StringLowercaseValidator) Description(ctx context.Context) string

Description returns a plain text description of the validator's behavior, suitable for a practitioner to understand its impact.

func (StringLowercaseValidator) MarkdownDescription

func (v StringLowercaseValidator) MarkdownDescription(ctx context.Context) string

MarkdownDescription returns a markdown formatted description of the validator's behavior, suitable for a practitioner to understand its impact.

func (StringLowercaseValidator) Validate

Validate runs the main validation logic of the validator, reading configuration data out of `req` and updating `resp` with diagnostics.

type StringMatchValidator

type StringMatchValidator struct {
	Slice []string
}

func StringMatch

func StringMatch(match []string) StringMatchValidator

StringMatch check that a string is contained in a given slice.

func (StringMatchValidator) Description

func (v StringMatchValidator) Description(ctx context.Context) string

Description returns a plain text description of the validator's behavior, suitable for a practitioner to understand its impact.

func (StringMatchValidator) MarkdownDescription

func (v StringMatchValidator) MarkdownDescription(ctx context.Context) string

MarkdownDescription returns a markdown formatted description of the validator's behavior, suitable for a practitioner to understand its impact.

func (StringMatchValidator) Validate

Validate runs the main validation logic of the validator, reading configuration data out of `req` and updating `resp` with diagnostics.

Jump to

Keyboard shortcuts

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