From 33e199c9939e110bd677e7b3e43547c6e55bb6e2 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Mon, 13 Sep 2021 13:26:06 +0200 Subject: fixed {st,stfe,system-transparency} -> sigsum --- pkg/instance/endpoint.go | 2 +- pkg/instance/endpoint_test.go | 10 +++++----- pkg/instance/instance.go | 14 +++++++------- pkg/instance/instance_test.go | 6 +++--- pkg/instance/metric.go | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) (limited to 'pkg/instance') diff --git a/pkg/instance/endpoint.go b/pkg/instance/endpoint.go index 5085c49..ec87303 100644 --- a/pkg/instance/endpoint.go +++ b/pkg/instance/endpoint.go @@ -1,4 +1,4 @@ -package stfe +package instance import ( "context" diff --git a/pkg/instance/endpoint_test.go b/pkg/instance/endpoint_test.go index fabf2e9..b138936 100644 --- a/pkg/instance/endpoint_test.go +++ b/pkg/instance/endpoint_test.go @@ -1,4 +1,4 @@ -package stfe +package instance import ( //"reflect" @@ -11,8 +11,8 @@ import ( "testing" "github.com/golang/mock/gomock" - "github.com/system-transparency/stfe/pkg/mocks" - "github.com/system-transparency/stfe/pkg/types" + "golang.sigsum.org/sigsum-log-go/pkg/mocks" + "golang.sigsum.org/sigsum-log-go/pkg/types" ) var ( @@ -60,7 +60,7 @@ func TestAddLeaf(t *testing.T) { "%s%s%s%s"+"%s%s%s%s"+"%s%s%s%s"+"%s%s%s%s"+"%s%s%s%s", types.ShardHint, types.Delim, "0", types.EOL, types.Checksum, types.Delim, "0000000000000000000000000000000000000000000000000000000000000000", types.EOL, - types.SignatureOverMessage, types.Delim, "4cb410a4d48f52f761a7c01abcc28fd71811b84ded5403caed5e21b374f6aac9637cecd36828f17529fd503413d30ab66d7bb37a31dbf09a90d23b9241c45009", types.EOL, + types.Signature, types.Delim, "4cb410a4d48f52f761a7c01abcc28fd71811b84ded5403caed5e21b374f6aac9637cecd36828f17529fd503413d30ab66d7bb37a31dbf09a90d23b9241c45009", types.EOL, types.VerificationKey, types.Delim, "f2b7a00b625469d32502e06e8b7fad1ef258d4ad0c6cd87b846142ab681957d5", types.EOL, types.DomainHint, types.Delim, "example.com", types.EOL, )) @@ -83,7 +83,7 @@ func TestAddLeaf(t *testing.T) { "%s%s%s%s"+"%s%s%s%s"+"%s%s%s%s"+"%s%s%s%s"+"%s%s%s%s", types.ShardHint, types.Delim, "1", types.EOL, types.Checksum, types.Delim, "1111111111111111111111111111111111111111111111111111111111111111", types.EOL, - types.SignatureOverMessage, types.Delim, "4cb410a4d48f52f761a7c01abcc28fd71811b84ded5403caed5e21b374f6aac9637cecd36828f17529fd503413d30ab66d7bb37a31dbf09a90d23b9241c45009", types.EOL, + types.Signature, types.Delim, "4cb410a4d48f52f761a7c01abcc28fd71811b84ded5403caed5e21b374f6aac9637cecd36828f17529fd503413d30ab66d7bb37a31dbf09a90d23b9241c45009", types.EOL, types.VerificationKey, types.Delim, "f2b7a00b625469d32502e06e8b7fad1ef258d4ad0c6cd87b846142ab681957d5", types.EOL, types.DomainHint, types.Delim, "example.com", types.EOL, )), diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go index 536eb60..87a0c36 100644 --- a/pkg/instance/instance.go +++ b/pkg/instance/instance.go @@ -1,4 +1,4 @@ -package stfe +package instance import ( "context" @@ -9,9 +9,9 @@ import ( "time" "github.com/golang/glog" - "github.com/system-transparency/stfe/pkg/state" - "github.com/system-transparency/stfe/pkg/trillian" - "github.com/system-transparency/stfe/pkg/types" + "golang.sigsum.org/sigsum-log-go/pkg/state" + "golang.sigsum.org/sigsum-log-go/pkg/trillian" + "golang.sigsum.org/sigsum-log-go/pkg/types" ) // Config is a collection of log parameters @@ -36,7 +36,7 @@ type Instance struct { } // Handler implements the http.Handler interface, and contains a reference -// to an STFE server instance as well as a function that uses it. +// to a sigsum server instance as well as a function that uses it. type Handler struct { Instance *Instance Endpoint types.Endpoint @@ -44,7 +44,7 @@ type Handler struct { Handler func(context.Context, *Instance, http.ResponseWriter, *http.Request) (int, error) } -// Handlers returns a list of STFE handlers +// Handlers returns a list of sigsum handlers func (i *Instance) Handlers() []Handler { return []Handler{ Handler{Instance: i, Handler: addLeaf, Endpoint: types.EndpointAddLeaf, Method: http.MethodPost}, @@ -60,7 +60,7 @@ func (i *Instance) Handlers() []Handler { // Path returns a path that should be configured for this handler func (h Handler) Path() string { - return h.Endpoint.Path(h.Instance.Prefix, "st", "v0") + return h.Endpoint.Path(h.Instance.Prefix, "sigsum", "v0") } // ServeHTTP is part of the http.Handler interface diff --git a/pkg/instance/instance_test.go b/pkg/instance/instance_test.go index f864628..1eba2bf 100644 --- a/pkg/instance/instance_test.go +++ b/pkg/instance/instance_test.go @@ -1,11 +1,11 @@ -package stfe +package instance import ( "net/http" "net/http/httptest" "testing" - "github.com/system-transparency/stfe/pkg/types" + "golang.sigsum.org/sigsum-log-go/pkg/types" ) // TestHandlers check that the expected handlers are configured @@ -74,7 +74,7 @@ func TestPath(t *testing.T) { Endpoint: types.EndpointAddLeaf, Method: http.MethodPost, } - if got, want := handler.Path(), "testonly/st/v0/add-leaf"; got != want { + if got, want := handler.Path(), "testonly/sigsum/v0/add-leaf"; got != want { t.Errorf("got path %v but wanted %v", got, want) } } diff --git a/pkg/instance/metric.go b/pkg/instance/metric.go index db11bd2..cbd0223 100644 --- a/pkg/instance/metric.go +++ b/pkg/instance/metric.go @@ -1,4 +1,4 @@ -package stfe +package instance import ( "github.com/google/trillian/monitoring" -- cgit v1.2.3