credentials

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package credentials is a helper to load credentials for respective email providers

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrFailedToLoadCredentials is returned when credentials fail to load
	ErrFailedToLoadCredentials = errors.New("failed to load credentials")
	// ErrFailedToParseToken is returned when a token fails to parse
	ErrFailedToParseToken = errors.New("failed to parse token")
)

Functions

func ParseCredentials

func ParseCredentials(credentialsJSON []byte) (*oauth2.Config, error)

ParseCredentials parses the OAuth2 credentials JSON byte slice and returns an *oauth2.Config

func ParseToken

func ParseToken(tokenJSON []byte) (*oauth2.Token, error)

ParseToken parses the OAuth2 token JSON byte slice and returns an *oauth2.Token

Types

This section is empty.

Jump to

Keyboard shortcuts

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