Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Commit

Permalink
Add QueryParam for API calls
Browse files Browse the repository at this point in the history
  • Loading branch information
exekias committed Apr 10, 2017
1 parent c43ac68 commit 28fccef
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,23 @@ type Option interface {
queryParam() (key, val string)
}

type queryParam struct {
paramName string
paramValue string
}

func (o queryParam) queryParam() (string, string) {
return o.paramName, o.paramValue
}

// QueryParam lets you define any filter for watch operations.
func QueryParam(name, value string) Option {
return queryParam{
paramName: name,
paramValue: value,
}
}

type resourceVersionOption string

func (r resourceVersionOption) queryParam() (string, string) {
Expand Down

0 comments on commit 28fccef

Please sign in to comment.