-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
382 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output: "{{.Dir}}/README.md" | ||
header: |+ | ||
[![GoDoc](https://img.shields.io/badge/pkg.go.dev-doc-blue)](http://pkg.go.dev/github.com/go-coldbrew/options) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.PHONY: build test doc | ||
build: | ||
go build ./... | ||
|
||
test: | ||
go test ./... | ||
|
||
doc: | ||
go get github.com/princjef/gomarkdoc/cmd/gomarkdoc | ||
gomarkdoc ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,71 @@ | ||
# options | ||
<!-- Code generated by gomarkdoc. DO NOT EDIT --> | ||
|
||
[![GoDoc](https://img.shields.io/badge/pkg.go.dev-doc-blue)](http://pkg.go.dev/github.com/go-coldbrew/options) | ||
|
||
# options | ||
|
||
```go | ||
import "github.com/go-coldbrew/options" | ||
``` | ||
|
||
## Index | ||
|
||
- [func AddToOptions(ctx context.Context, key string, value interface{}) context.Context](<#func-addtooptions>) | ||
- [type Options](<#type-options>) | ||
- [func FromContext(ctx context.Context) Options](<#func-fromcontext>) | ||
- [func (o Options) Add(key string, value interface{})](<#func-options-add>) | ||
- [func (o Options) Del(key string)](<#func-options-del>) | ||
- [func (o Options) Get(key string) (interface{}, bool)](<#func-options-get>) | ||
|
||
|
||
## func [AddToOptions](<https://github.com/go-coldbrew/options/blob/main/options.go#L28>) | ||
|
||
```go | ||
func AddToOptions(ctx context.Context, key string, value interface{}) context.Context | ||
``` | ||
|
||
AddToOptions adds options to context | ||
|
||
## type [Options](<https://github.com/go-coldbrew/options/blob/main/options.go#L15>) | ||
|
||
Options are request options passed from Orion to server | ||
|
||
```go | ||
type Options map[string]interface{} | ||
``` | ||
|
||
### func [FromContext](<https://github.com/go-coldbrew/options/blob/main/options.go#L18>) | ||
|
||
```go | ||
func FromContext(ctx context.Context) Options | ||
``` | ||
|
||
FromContext fetchs options from provided context | ||
|
||
### func \(Options\) [Add](<https://github.com/go-coldbrew/options/blob/main/options.go#L41>) | ||
|
||
```go | ||
func (o Options) Add(key string, value interface{}) | ||
``` | ||
|
||
Add to Options | ||
|
||
### func \(Options\) [Del](<https://github.com/go-coldbrew/options/blob/main/options.go#L46>) | ||
|
||
```go | ||
func (o Options) Del(key string) | ||
``` | ||
|
||
Del an options | ||
|
||
### func \(Options\) [Get](<https://github.com/go-coldbrew/options/blob/main/options.go#L51>) | ||
|
||
```go | ||
func (o Options) Get(key string) (interface{}, bool) | ||
``` | ||
|
||
Get an options | ||
|
||
|
||
|
||
Generated by [gomarkdoc](<https://github.com/princjef/gomarkdoc>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.