one_password

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// 1Password API endpoint for Business Plan
	// See https://developer.1password.com/docs/events-api/reference/
	APIEndpoint = "https://events.1password.com/api/v1/auditevents"
)

Variables

This section is empty.

Functions

func New

func New(apiToken secret.String, opts ...Option) hatchery.Source

New creates a source to load audit logs from 1Password API.

Types

type Option

type Option func(*config)

func WithDuration

func WithDuration(d time.Duration) Option

WithDuration sets the duration of logs to load. Default is 10 minutes.

func WithHTTPClient

func WithHTTPClient(httpClient interfaces.HTTPClient) Option

WithHTTPClient sets the HTTP client to send requests. Default is http.DefaultClient. This option is mainly for testing.

func WithLimit

func WithLimit(n int) Option

WithLimit sets the number of logs to load per page. Default is 100.

func WithMaxPages

func WithMaxPages(n int) Option

WithMaxPages sets the maximum number of pages to load. If 0, it loads all pages. Default is 0.

Jump to

Keyboard shortcuts

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