env

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteParams

type DeleteParams struct {
	Key string `json:"key"`
}

DeleteParams is the params for env.delete.

type GetParams

type GetParams struct {
	Key string `json:"key"`
}

GetParams is the params for env.get.

type SetParams

type SetParams struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

SetParams is the params for env.set.

type Store

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

Store is a thread-safe in-memory key-value store for environment variables.

func NewStore

func NewStore() *Store

NewStore returns a new empty environment store.

func (*Store) Delete

func (s *Store) Delete(raw json.RawMessage) (interface{}, error)

Delete removes a key.

func (*Store) Get

func (s *Store) Get(raw json.RawMessage) (interface{}, error)

Get returns the value for a key, or nil if not set.

func (*Store) List

func (s *Store) List(_ json.RawMessage) (interface{}, error)

List returns all stored variables.

func (*Store) Set

func (s *Store) Set(raw json.RawMessage) (interface{}, error)

Set stores a key-value pair.

Jump to

Keyboard shortcuts

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