options

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 2 Imported by: 4

README

options

import "github.com/carousell/Orion/utils/options"

Overview

Imported Packages

No packages beyond the Go standard library are imported.

Index

Package files

options.go

func AddToOptions

func AddToOptions(ctx context.Context, key string, value interface{}) context.Context

AddToOptions adds options to context

type Options

type Options map[string]interface{}

Options are request options passed from Orion to server

func FromContext
func FromContext(ctx context.Context) Options

FromContext fetchs options from provided context

func (Options) Add
func (o Options) Add(key string, value interface{})

Add to Options

func (Options) Del
func (o Options) Del(key string)

Del an options

func (Options) Get
func (o Options) Get(key string) (interface{}, bool)

Get an options


Generated by godoc2ghmd

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToOptions

func AddToOptions(ctx context.Context, key string, value interface{}) context.Context

AddToOptions adds options to context

Types

type Options

type Options map[string]interface{}

Options are request options passed from Orion to server

func FromContext

func FromContext(ctx context.Context) Options

FromContext fetchs options from provided context

func (Options) Add

func (o Options) Add(key string, value interface{})

Add to Options

func (Options) Del

func (o Options) Del(key string)

Del an options

func (Options) Get

func (o Options) Get(key string) (interface{}, bool)

Get an options

Jump to

Keyboard shortcuts

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