digiconfig

package
v0.0.0-...-b78f4d7 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MPL-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ConfigAPIURL      = "api_url"      // Configuration key for API URL
	ConfigDocumentURL = "document_url" // Configuration key for document URL
	ConfigUsername    = "username"     // Configuration key for username
	ConfigPassword    = "password"     // Configuration key for password
	ConfigOTPSecret   = "otp"          // Configuration key for otp
	ConfigCookies     = "cookies"      // Configuration key for cookie
)

Variables

View Source
var Options []fs.Option = []fs.Option{{
	Name:    ConfigAPIURL,
	Default: digiposte.DefaultAPIURL,
	Help:    `This is the base URL for Digiposte API.`,
	Examples: []fs.OptionExample{{
		Value:    digiposte.StagingAPIURL,
		Help:     `Connect to the Digiposte API staging environment.`,
		Provider: "",
	}},
	Advanced:   true,
	Sensitive:  false,
	NoPrefix:   true,
	IsPassword: false,
	Required:   false,
}, {
	Name:       ConfigDocumentURL,
	Default:    digiposte.DefaultDocumentURL,
	Help:       `This is the base URL for Digiposte document viewer.`,
	Advanced:   true,
	Sensitive:  false,
	NoPrefix:   true,
	IsPassword: false,
	Required:   false,
	Examples: []fs.OptionExample{{
		Value:    digiposte.StagingDocumentURL,
		Help:     `Connect to the Digiposte API staging environment.`,
		Provider: "",
	}},
}, {
	Name:       ConfigUsername,
	Help:       `Username to use for authentication.`,
	Advanced:   false,
	Sensitive:  true,
	NoPrefix:   true,
	IsPassword: false,
	Required:   true,
}, {
	Name:       ConfigPassword,
	Help:       `Password to use for authentication.`,
	Advanced:   false,
	Sensitive:  true,
	NoPrefix:   true,
	IsPassword: true,
	Required:   true,
}, {
	Name:       ConfigOTPSecret,
	Help:       `otp secret to use for authentication.`,
	Advanced:   false,
	Sensitive:  true,
	NoPrefix:   true,
	IsPassword: true,
	Required:   false,
}}

Functions

func APIURL

func APIURL(m configmap.Getter) string

func Cookies

func Cookies(m configmap.Getter) []*http.Cookie

func DocumentURL

func DocumentURL(m configmap.Getter) string

func OTPSecret

func OTPSecret(m configmap.Getter) string

func Password

func Password(m configmap.Getter) string

func SetAPIURL

func SetAPIURL(m configmap.Setter, apiURL string)

func SetCookies

func SetCookies(setter configmap.Setter, cookies []*http.Cookie) error

func SetDocumentURL

func SetDocumentURL(m configmap.Setter, documentURL string)

func SetOTPSecret

func SetOTPSecret(m configmap.Setter, otpSecret string)

func SetPassword

func SetPassword(m configmap.Setter, password string)

func SetUsername

func SetUsername(m configmap.Setter, username string)

func Username

func Username(m configmap.Getter) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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