storj/satellite/vouchers/endpoint.go
Cameron af5fb8e9c5
satellite/vouchers: deprecate voucher endpoint, return 'please upgrade' error (#2940)
* voucher endpoint returns 'please upgrade' error, test
2019-09-04 13:21:02 -04:00

21 lines
585 B
Go

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
package vouchers
import (
"context"
"github.com/zeebo/errs"
"storj.io/storj/pkg/pb"
)
// Endpoint for issuing signed vouchers (DEPRECATED)
type Endpoint struct{}
// Request is deprecated and returns an error asking the storage node to update to the latest version.
func (endpoint *Endpoint) Request(ctx context.Context, req *pb.VoucherRequest) (_ *pb.VoucherResponse, err error) {
return nil, errs.New("Vouchers endpoint is deprecated. Please upgrade your storage node to the latest version.")
}