Documentation ¶
Index ¶
Constants ¶
const ( // ActionRead specifies a read operation ActionRead = macaroon.ActionRead // ActionWrite specifies a read operation ActionWrite = macaroon.ActionWrite // ActionList specifies a read operation ActionList = macaroon.ActionList // ActionDelete specifies a read operation ActionDelete = macaroon.ActionDelete // ActionProjectInfo requests project-level information ActionProjectInfo = macaroon.ActionProjectInfo )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIKey ¶
APIKey implements a Macaroon-backed Storj-v3 API key.
func NewAPIKey ¶
NewAPIKey generates a brand new unrestricted API key given the provided server project secret
func ParseAPIKey ¶
ParseAPIKey parses a given api key string and returns an APIKey if the APIKey was correctly formatted. It does not validate the key.
func ParseRawAPIKey ¶ added in v0.15.0
ParseRawAPIKey parses raw api key data and returns an APIKey if the APIKey was correctly formatted. It does not validate the key.
type Action ¶
Action specifies the specific operation being performed that the Macaroon will validate
type ActionType ¶
type ActionType = macaroon.ActionType
ActionType specifies the operation type being performed that the Macaroon will validate
type AllowedBuckets ¶ added in v0.15.0
type AllowedBuckets = macaroon.AllowedBuckets
AllowedBuckets stores information about which buckets are allowed to be accessed, where `Buckets` stores names of buckets that are allowed and `All` is a bool that indicates if all buckets are allowed or not
type Caveat_Path ¶ added in v0.12.0
type Caveat_Path = macaroon.Caveat_Path //nolint alias to generated code
Caveat_Path is a path for caveat. If any entries exist, require all access to happen in at least one of them.
type Macaroon ¶
Macaroon is a struct that determine contextual caveats and authorization
func NewUnrestricted ¶
NewUnrestricted creates Macaroon with random Head and generated Tail
func ParseMacaroon ¶
ParseMacaroon converts binary to macaroon