Documentation
¶
Overview ¶
Package session provides configuration for Workday service clients.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Environment *string Tenant *string Credentials credentials.Provider }
Config is used to manually configure a session via the FromConfig session option.
type Option ¶
Option defines the function signature used for session options.
func FromConfig ¶
FromConfig is a session option that loads session from a manual configuration object.
type Session ¶
type Session struct { Environment string Tenant string Credentials credentials.Provider }
Session provides configuration for Workday service clients.
A single session is meant to be shared by multiple Workday clients and threads. It is not safe to mutate a session after it has been passed to a client.
NewSession is the recommended way to create a new session.
func FromEnvironment ¶
FromEnvironment is a session option that loads session data from the environment.
WD_ENVIRONMENT WD_TENANT # Basic Auth WD_BASIC_AUTH_USERNAME WD_BASIC_AUTH_PASSWORD # OAuth Client Credentials WD_CLIENT_CREDENTIALS_CLIENT_ID WD_CLIENT_CREDENTIALS_CLIENT_SECRET WD_CLIENT_CREDENTIALS_REFRESH_TOKEN
func MustSession ¶
MustSession is like NewSession but panics in the cased where NewSession would return an error.
func NewSession ¶
NewSession creates a new session. If no options are provided the session will created from the environment. See the FromEnvironment option for details.