ping

package
v0.18.2-0...-57123b4 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package ping implements a directory provider for Ping.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEnvironmentIDRequired = errors.New("ping: environment id is required")
	ErrClientIDRequired      = errors.New("ping: client id is required")
	ErrClientSecretRequired  = errors.New("ping: client secret is required")
)

Errors

Functions

This section is empty.

Types

type Option

type Option func(cfg *config)

An Option updates the Ping configuration.

func WithAPIURL

func WithAPIURL(apiURL *url.URL) Option

WithAPIURL sets the api url in the config.

func WithAuthURL

func WithAuthURL(authURL *url.URL) Option

WithAuthURL sets the auth url in the config.

func WithClientID

func WithClientID(clientID string) Option

WithClientID sets the client id in the config.

func WithClientSecret

func WithClientSecret(clientSecret string) Option

WithClientSecret sets the client secret in the config.

func WithEnvironmentID

func WithEnvironmentID(environmentID string) Option

WithEnvironmentID sets the environment ID in the config.

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) Option

WithHTTPClient sets the http client option.

func WithLogger

func WithLogger(logger zerolog.Logger) Option

WithLogger sets the logger in the config.

func WithProviderURL

func WithProviderURL(providerURL *url.URL) Option

WithProviderURL sets the environment ID from the provider URL set in the config.

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider implements a directory provider using the Ping API.

func New

func New(options ...Option) *Provider

New creates a new Ping Provider.

func (*Provider) GetDirectory

func (p *Provider) GetDirectory(ctx context.Context) ([]directory.Group, []directory.User, error)

GetDirectory returns all the users and groups in the directory.

Jump to

Keyboard shortcuts

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