Skip to content

Commit 4d36d60

Browse files
committed
readme: goreportcard updates
1 parent 081a379 commit 4d36d60

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# gcp-jwt-go (v2) [![GoDoc](https://godoc.org/gopkg.in/someone1/gcp-jwt-go.v2?status.svg)](https://godoc.org/gopkg.in/someone1/gcp-jwt-go.v2) [![Go Report Card](https://goreportcard.com/badge/github.com/someone1/gcp-jwt-go)](https://goreportcard.com/report/github.com/someone1/gcp-jwt-go) [![Build Status](https://travis-ci.org/someone1/gcp-jwt-go.svg?branch=v2)](https://travis-ci.org/someone1/gcp-jwt-go) [![Coverage Status](https://coveralls.io/repos/github/someone1/gcp-jwt-go/badge.svg?branch=v2)](https://coveralls.io/github/someone1/gcp-jwt-go?branch=v2)
1+
# gcp-jwt-go (v2) [![GoDoc](https://godoc.org/gopkg.in/someone1/gcp-jwt-go.v2?status.svg)](https://godoc.org/gopkg.in/someone1/gcp-jwt-go.v2) [![Go Report Card](https://goreportcard.com/badge/gopkg.in/someone1/gcp-jwt-go.v2)](https://goreportcard.com/report/gopkg.in/someone1/gcp-jwt-go.v2) [![Build Status](https://travis-ci.org/someone1/gcp-jwt-go.svg?branch=v2)](https://travis-ci.org/someone1/gcp-jwt-go) [![Coverage Status](https://coveralls.io/repos/github/someone1/gcp-jwt-go/badge.svg?branch=v2)](https://coveralls.io/github/someone1/gcp-jwt-go?branch=v2)
22

33
Google Cloud Platform (KMS, IAM & AppEngine) jwt-go implementations
44

config.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ import (
1212
type iamType int
1313

1414
const (
15+
// IAMBlobType is used as a hint in the config to let various parts of the library know you intend to use the
16+
// signBlob IAM API.
1517
IAMBlobType iamType = iota + 1
18+
// IAMJwtType is used as a hint in the config to let various parts of the library know you intend to use the
19+
// signJwt IAM API.
1620
IAMJwtType
1721
)
1822

@@ -59,12 +63,12 @@ type IAMConfig struct {
5963
gcpConfig
6064
}
6165

62-
// NewContext returns a new context.Context that carries a provided IAMConfig value
66+
// NewIAMContext returns a new context.Context that carries a provided IAMConfig value
6367
func NewIAMContext(parent context.Context, val *IAMConfig) context.Context {
6468
return context.WithValue(parent, iamConfigKey{}, val)
6569
}
6670

67-
// FromContext extracts a IAMConfig from a context.Context
71+
// IAMFromContext extracts a IAMConfig from a context.Context
6872
func IAMFromContext(ctx context.Context) (*IAMConfig, bool) {
6973
val, ok := ctx.Value(iamConfigKey{}).(*IAMConfig)
7074
return val, ok

iam.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (s *signingMethodIAM) Sign(signingString string, key interface{}) (string,
7373
return s.sign(iamService, config, signingString)
7474
}
7575

76-
// Keyfunc is a helper meant that returns a jwt.Keyfunc. It will handle pulling and selecting the certificates
76+
// VerfiyKeyfunc is a helper meant that returns a jwt.Keyfunc. It will handle pulling and selecting the certificates
7777
// to verify signatures with, caching when enabled.
7878
func VerfiyKeyfunc(ctx context.Context, config *IAMConfig) jwt.Keyfunc {
7979
return func(token *jwt.Token) (interface{}, error) {

0 commit comments

Comments
 (0)