storj/lib/uplink/apikey.go
JT Olio 9af4f26d43 libuplink changes for public usage (#1568)
Co-authored-by: paul cannon <thepaul@users.noreply.github.com>
Co-authored-by: Kaloyan Raev <kaloyan-raev@users.noreply.github.com>
2019-04-03 11:46:21 +03:00

20 lines
409 B
Go

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
package uplink
// APIKey represents an access credential to certain resources
type APIKey struct {
key string
}
// Serialize serializes the API Key to a string
func (a APIKey) Serialize() string {
return a.key
}
// ParseAPIKey parses an API Key
func ParseAPIKey(val string) (APIKey, error) {
return APIKey{key: val}, nil
}