Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a Signer type with more convenient methods #13

Open
kr opened this issue Jul 15, 2013 · 0 comments
Open

Provide a Signer type with more convenient methods #13

kr opened this issue Jul 15, 2013 · 0 comments

Comments

@kr
Copy link
Owner

kr commented Jul 15, 2013

It's common to use one set of keys for all requests, so put the keys
into the receiver. Possible interface:

type Signer struct {
    Keys

    Service *Service // if nil, DefaultService is used

    Time func() time.Time // if nil, time.Now is used
}

func (s *Signer) Sign(*http.Request) error

With addition of an underlying http transport, this type could also
satisfy #12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant