config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package config holds configuration structs used across the application. Defined configs:

  • AuthConfig: holds authentication configuration.
  • SenderConfig: holds sender configuration.
  • CacheConfig: holds caching configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	ClientID   string
	Tenant     string
	Email      string
	Scopes     []string
	AuthMethod Method
}

AuthConfig holds configuration for authentication. All fields are required - they are needed to acquire tokens via MSAL.

type CacheConfig

type CacheConfig struct {
	Mode     CacheMode
	Provider CacheProvider
	Path     *string
}

CacheConfig holds configuration for caching.

type CacheMode

type CacheMode string

CacheMode defines the caching strategy used by the application.

const (
	// CacheDisabled indicates that caching is turned off.
	CacheDisabled CacheMode = "DISABLED"

	// CacheSync indicates that cache operations are performed synchronously.
	CacheSync CacheMode = "SYNC"

	// CacheAsync indicates that cache operations are performed asynchronously.
	CacheAsync CacheMode = "ASYNC"
)

type CacheProvider

type CacheProvider string

CacheProvider defines the backend used for caching.

const (
	// CacheProviderJSONFile indicates that json-file cache is used.
	CacheProviderJSONFile CacheProvider = "JSON_FILE"
)

type Method

type Method string

Method defines the authentication flow used when acquiring tokens.

const (
	// Interactive opens a browser window for user authentication.
	Interactive Method = "INTERACTIVE"

	// DeviceCode prints a device code to the console and prompts the user to visit a URL to authenticate.
	DeviceCode Method = "DEVICE_CODE"
)

type SenderConfig

type SenderConfig struct {
	MaxRetries     int
	NextRetryDelay int
	Timeout        int
}

SenderConfig defines configuration for the request sender which connects with the Microsoft Graph API. MaxRetryDelay and Timeout are in seconds.

Jump to

Keyboard shortcuts

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