Bump github.com/hansmi/paperhooks from 0.0.3 to 0.0.4
This commit is contained in:
parent
f2cc188833
commit
8f89afbf45
10 changed files with 19 additions and 13 deletions
|
@ -9,7 +9,7 @@ import (
|
|||
)
|
||||
|
||||
type correspondentClient interface {
|
||||
ListAllCorrespondents(context.Context, *client.ListCorrespondentsOptions, func(context.Context, client.Correspondent) error) error
|
||||
ListAllCorrespondents(context.Context, client.ListCorrespondentsOptions, func(context.Context, client.Correspondent) error) error
|
||||
}
|
||||
|
||||
type correspondentCollector struct {
|
||||
|
@ -43,7 +43,8 @@ func (c *correspondentCollector) describe(ch chan<- *prometheus.Desc) {
|
|||
}
|
||||
|
||||
func (c *correspondentCollector) collect(ctx context.Context, ch chan<- prometheus.Metric) error {
|
||||
opts := &client.ListCorrespondentsOptions{}
|
||||
var opts client.ListCorrespondentsOptions
|
||||
|
||||
opts.Ordering.Field = "name"
|
||||
|
||||
return c.cl.ListAllCorrespondents(ctx, opts, func(_ context.Context, correspondent client.Correspondent) error {
|
||||
|
|
|
@ -18,7 +18,7 @@ type fakeCorrespondentClient struct {
|
|||
err error
|
||||
}
|
||||
|
||||
func (c *fakeCorrespondentClient) ListAllCorrespondents(ctx context.Context, opts *client.ListCorrespondentsOptions, handler func(context.Context, client.Correspondent) error) error {
|
||||
func (c *fakeCorrespondentClient) ListAllCorrespondents(ctx context.Context, opts client.ListCorrespondentsOptions, handler func(context.Context, client.Correspondent) error) error {
|
||||
for _, i := range c.items {
|
||||
if err := handler(ctx, i); err != nil {
|
||||
return err
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
)
|
||||
|
||||
type documentTypeClient interface {
|
||||
ListAllDocumentTypes(context.Context, *client.ListDocumentTypesOptions, func(context.Context, client.DocumentType) error) error
|
||||
ListAllDocumentTypes(context.Context, client.ListDocumentTypesOptions, func(context.Context, client.DocumentType) error) error
|
||||
}
|
||||
|
||||
type documentTypeCollector struct {
|
||||
|
@ -38,7 +38,8 @@ func (c *documentTypeCollector) describe(ch chan<- *prometheus.Desc) {
|
|||
}
|
||||
|
||||
func (c *documentTypeCollector) collect(ctx context.Context, ch chan<- prometheus.Metric) error {
|
||||
opts := &client.ListDocumentTypesOptions{}
|
||||
var opts client.ListDocumentTypesOptions
|
||||
|
||||
opts.Ordering.Field = "name"
|
||||
|
||||
return c.cl.ListAllDocumentTypes(ctx, opts, func(_ context.Context, doctype client.DocumentType) error {
|
||||
|
|
|
@ -16,7 +16,7 @@ type fakeDocumentTypeClient struct {
|
|||
err error
|
||||
}
|
||||
|
||||
func (c *fakeDocumentTypeClient) ListAllDocumentTypes(ctx context.Context, opts *client.ListDocumentTypesOptions, handler func(context.Context, client.DocumentType) error) error {
|
||||
func (c *fakeDocumentTypeClient) ListAllDocumentTypes(ctx context.Context, opts client.ListDocumentTypesOptions, handler func(context.Context, client.DocumentType) error) error {
|
||||
for _, i := range c.items {
|
||||
if err := handler(ctx, i); err != nil {
|
||||
return err
|
||||
|
|
2
go.mod
2
go.mod
|
@ -6,7 +6,7 @@ require (
|
|||
github.com/alecthomas/kingpin/v2 v2.3.2
|
||||
github.com/go-kit/log v0.2.1
|
||||
github.com/google/go-cmp v0.5.9
|
||||
github.com/hansmi/paperhooks v0.0.3
|
||||
github.com/hansmi/paperhooks v0.0.4
|
||||
github.com/prometheus/client_golang v1.16.0
|
||||
github.com/prometheus/common v0.44.0
|
||||
github.com/prometheus/exporter-toolkit v0.10.0
|
||||
|
|
2
go.sum
2
go.sum
|
@ -33,6 +33,8 @@ github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD
|
|||
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
|
||||
github.com/hansmi/paperhooks v0.0.3 h1:0RgPHZaEG790kjtA9iYks+4pxLOkq4UHf2oNquA8aXk=
|
||||
github.com/hansmi/paperhooks v0.0.3/go.mod h1:OQVL9560CVYa3lLVYPQ0WrRzGMs9ibyY3HSPrLRXEz4=
|
||||
github.com/hansmi/paperhooks v0.0.4 h1:mEBikpMrNt8rQ5VI304r8FzcxH8515F+r9aMT+HfF4s=
|
||||
github.com/hansmi/paperhooks v0.0.4/go.mod h1:OQVL9560CVYa3lLVYPQ0WrRzGMs9ibyY3HSPrLRXEz4=
|
||||
github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc=
|
||||
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
|
||||
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
)
|
||||
|
||||
type storagePathClient interface {
|
||||
ListAllStoragePaths(context.Context, *client.ListStoragePathsOptions, func(context.Context, client.StoragePath) error) error
|
||||
ListAllStoragePaths(context.Context, client.ListStoragePathsOptions, func(context.Context, client.StoragePath) error) error
|
||||
}
|
||||
|
||||
type storagePathCollector struct {
|
||||
|
@ -38,7 +38,8 @@ func (c *storagePathCollector) describe(ch chan<- *prometheus.Desc) {
|
|||
}
|
||||
|
||||
func (c *storagePathCollector) collect(ctx context.Context, ch chan<- prometheus.Metric) error {
|
||||
opts := &client.ListStoragePathsOptions{}
|
||||
var opts client.ListStoragePathsOptions
|
||||
|
||||
opts.Ordering.Field = "name"
|
||||
|
||||
return c.cl.ListAllStoragePaths(ctx, opts, func(_ context.Context, sp client.StoragePath) error {
|
||||
|
|
|
@ -16,7 +16,7 @@ type fakeStoragePathClient struct {
|
|||
err error
|
||||
}
|
||||
|
||||
func (c *fakeStoragePathClient) ListAllStoragePaths(ctx context.Context, opts *client.ListStoragePathsOptions, handler func(context.Context, client.StoragePath) error) error {
|
||||
func (c *fakeStoragePathClient) ListAllStoragePaths(ctx context.Context, opts client.ListStoragePathsOptions, handler func(context.Context, client.StoragePath) error) error {
|
||||
for _, i := range c.items {
|
||||
if err := handler(ctx, i); err != nil {
|
||||
return err
|
||||
|
|
5
tag.go
5
tag.go
|
@ -9,7 +9,7 @@ import (
|
|||
)
|
||||
|
||||
type tagClient interface {
|
||||
ListAllTags(context.Context, *client.ListTagsOptions, func(context.Context, client.Tag) error) error
|
||||
ListAllTags(context.Context, client.ListTagsOptions, func(context.Context, client.Tag) error) error
|
||||
}
|
||||
|
||||
type tagCollector struct {
|
||||
|
@ -38,7 +38,8 @@ func (c *tagCollector) describe(ch chan<- *prometheus.Desc) {
|
|||
}
|
||||
|
||||
func (c *tagCollector) collect(ctx context.Context, ch chan<- prometheus.Metric) error {
|
||||
opts := &client.ListTagsOptions{}
|
||||
var opts client.ListTagsOptions
|
||||
|
||||
opts.Ordering.Field = "name"
|
||||
|
||||
return c.cl.ListAllTags(ctx, opts, func(_ context.Context, tag client.Tag) error {
|
||||
|
|
|
@ -16,7 +16,7 @@ type fakeTagClient struct {
|
|||
err error
|
||||
}
|
||||
|
||||
func (c *fakeTagClient) ListAllTags(ctx context.Context, opts *client.ListTagsOptions, handler func(context.Context, client.Tag) error) error {
|
||||
func (c *fakeTagClient) ListAllTags(ctx context.Context, opts client.ListTagsOptions, handler func(context.Context, client.Tag) error) error {
|
||||
for _, i := range c.items {
|
||||
if err := handler(ctx, i); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue