utils

module
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0

README

Build status Go Reference Go Report Card Quality Gate Status

utils

Utilities for working within the openlane ecosystem, high level overview of packages:

  • cache: redis client interface
  • cli: cli helper utilities for printing rows, tables
  • contextx: The contextx package provides helper functions for managing context values, particularly for request-scoped data. It uses generics to simplify the handling of context keys.
  • dumper: The dumper package is a utility for dumping HTTP request contents, useful for debugging and logging purposes.
  • envparse: struct default parsing utility
  • gravatar: create sweet robot avatars based on your email
  • keygen: The keygen package provides utilities for generating and validating keys. It includes a key generator that can generate keys of any length and a key validator that can validate keys of any length.
  • keyring: package keyring allows for quick and easy access to the system keyring service
  • marionette: The marionette package is a task manager with scheduling, backoff, and future scheduling capabilities. It is designed as a temporary solution until an external state management system is implemented.
  • passwd: The passwd package provides cryptographic utilities for handling passwords.
  • rout: rout is a semi-centralized method of handling and surfacing user facing errors
  • slack: very minimal slack functions for sending messages
  • slice: a nice big juicy slice of functions for working with slices
  • sqlite: sqlite client interface
  • testutils: test utilities!
  • ulids: The ulids package is a lightweight wrapper around the github.com/oklog/ulid package. It provides common functionality such as checking if a ULID is null or zero and includes a process-global, cryptographically random, monotonic, and thread-safe ULID generation mechanism.

Contributing

See the contributing guide for more information.

Directories

Path Synopsis
Package cache holds the library for interacting with redis
Package cache holds the library for interacting with redis
cli
rows
Package rows makes CLI output pretty
Package rows makes CLI output pretty
tables
Package tables is a collection of functions that generate tables for the CLI
Package tables is a collection of functions that generate tables for the CLI
Package contextx is a helper package for managing context values Most **request-scoped data** is a singleton per request That is, it doesn't make sense for a request to carry around multiple loggers, users, traces you want to carry the _same one_ with you from function call to function call the way we've handled this historically is a separate context key per type you want to carry in the struct but with generics, instead of having to make a new zero-sized type for every struct we can just make a single generic type and use it for everything which is what this helper package is intended to do
Package contextx is a helper package for managing context values Most **request-scoped data** is a singleton per request That is, it doesn't make sense for a request to carry around multiple loggers, users, traces you want to carry the _same one_ with you from function call to function call the way we've handled this historically is a separate context key per type you want to carry in the struct but with generics, instead of having to make a new zero-sized type for every struct we can just make a single generic type and use it for everything which is what this helper package is intended to do
Package envparse provides a way to parse environment variables from a struct
Package envparse provides a way to parse environment variables from a struct
Package gravatar generates random avatar images for users or organizations on sign up which they can override with their own avatars
Package gravatar generates random avatar images for users or organizations on sign up which they can override with their own avatars
Package keygen provides functionality for generating API client IDs and secrets
Package keygen provides functionality for generating API client IDs and secrets
package keyring allows for quick and easy access to the system keyring service.
package keyring allows for quick and easy access to the system keyring service.
Package passwd provides fancy crypto shit for passwords
Package passwd provides fancy crypto shit for passwords
Package rout is a semi-centralized method of handling and surfacing user facing errors
Package rout is a semi-centralized method of handling and surfacing user facing errors
Package slack holds slack integration clients and message definitions
Package slack holds slack integration clients and message definitions
Package testutils provides utilities for use in tests
Package testutils provides utilities for use in tests
Package ulids is a lightweight wrapper around the github.com/oklog/ulid package that provides some common functionality (like checking if a ULID is null or is zero) as well as a process-global, cryptographically random, monotonic, and thread-safe ulid generation mechanism that can be used from external packages
Package ulids is a lightweight wrapper around the github.com/oklog/ulid package that provides some common functionality (like checking if a ULID is null or is zero) as well as a process-global, cryptographically random, monotonic, and thread-safe ulid generation mechanism that can be used from external packages

Jump to

Keyboard shortcuts

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