Documentation ¶
Index ¶
- Constants
- func CreateJSONLDDocumentLoader(ldStore ldStoreProvider, client httpClient, providerURLs []string) (jsonld.DocumentLoader, error)
- func Flags(cmd *cobra.Command)
- func InitStore(params *DBParameters, logger log.Logger) (storage.Provider, error)
- func SetDefaultLogLevel(logger log.Logger, userLogLevel string)
- type DBParameters
- type LDStoreProvider
Constants ¶
View Source
const ( // LogLevelFlagName is the flag name used for setting the default log level. LogLevelFlagName = "log-level" // LogLevelEnvKey is the env var name used for setting the default log level. LogLevelEnvKey = "LOG_LEVEL" // LogLevelFlagShorthand is the shorthand flag name used for setting the default log level. LogLevelFlagShorthand = "l" // LogLevelPrefixFlagUsage is the usage text for the log level flag. LogLevelPrefixFlagUsage = "Logging level to set. Supported options: CRITICAL, ERROR, WARNING, INFO, DEBUG." + `Defaults to info if not set. Setting to debug may adversely impact performance. Alternatively, this can be ` + "set with the following environment variable: " + LogLevelEnvKey )
View Source
const ( // DatabaseURLFlagName is the database url. DatabaseURLFlagName = "database-url" // DatabaseURLFlagUsage describes the usage. DatabaseURLFlagUsage = "Database URL with credentials if required." + " Format must be <driver>:[//]<driver-specific-dsn>." + " Examples: 'mysql://root:secret@tcp(localhost:3306)/adapter', 'mem://test'," + " 'mongodb://mongodb.example.com:27017'." + " Supported drivers are [mem, mysql, couchdb, mongodb]." + " Alternatively, this can be set with the following environment variable: " + DatabaseURLEnvKey // DatabaseURLEnvKey is the databaes url. DatabaseURLEnvKey = "DATABASE_URL" // DatabaseTimeoutFlagName is the database timeout. DatabaseTimeoutFlagName = "database-timeout" // DatabaseTimeoutFlagUsage describes the usage. DatabaseTimeoutFlagUsage = "Total time in seconds to wait until the datasource is available before giving up." + " Default: " + string(rune(DatabaseTimeoutDefault)) + " seconds." + " Alternatively, this can be set with the following environment variable: " + DatabaseTimeoutEnvKey // DatabaseTimeoutEnvKey is the database timeout. DatabaseTimeoutEnvKey = "DATABASE_TIMEOUT" // DatabasePrefixFlagName is the storage prefix. DatabasePrefixFlagName = "database-prefix" // DatabasePrefixEnvKey is the storage prefix. DatabasePrefixEnvKey = "DATABASE_PREFIX" // DatabasePrefixFlagUsage describes the usage. DatabasePrefixFlagUsage = "An optional prefix to be used when creating and retrieving underlying databases. " + "Alternatively, this can be set with the following environment variable: " + DatabasePrefixEnvKey // DatabaseTimeoutDefault is the default storage timeout. DatabaseTimeoutDefault = 30 )
Variables ¶
This section is empty.
Functions ¶
func CreateJSONLDDocumentLoader ¶
func CreateJSONLDDocumentLoader(ldStore ldStoreProvider, client httpClient, providerURLs []string, ) (jsonld.DocumentLoader, error)
CreateJSONLDDocumentLoader creates a new JSON-LD document loader. nolint:ireturn
func SetDefaultLogLevel ¶
SetDefaultLogLevel sets the default log level.
Types ¶
type DBParameters ¶
DBParameters holds database configuration.
type LDStoreProvider ¶
type LDStoreProvider struct { ContextStore ldstore.ContextStore RemoteProviderStore ldstore.RemoteProviderStore }
LDStoreProvider provides stores for JSON-LD contexts and remote providers.
func CreateLDStoreProvider ¶
func CreateLDStoreProvider(storageProvider storage.Provider) (*LDStoreProvider, error)
CreateLDStoreProvider creates a new LDStoreProvider.
func (*LDStoreProvider) JSONLDContextStore ¶
func (p *LDStoreProvider) JSONLDContextStore() ldstore.ContextStore
JSONLDContextStore returns a JSON-LD context store.
func (*LDStoreProvider) JSONLDRemoteProviderStore ¶
func (p *LDStoreProvider) JSONLDRemoteProviderStore() ldstore.RemoteProviderStore
JSONLDRemoteProviderStore returns a JSON-LD remote provider store.
Click to show internal directories.
Click to hide internal directories.