blob: 8fd848b25c8f45cf867bcffc94a888c0f14c3439 [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package access
import "v.io/v23/vdl"
// TypicalTagType returns the type of the predefined tags in this access
// package.
//
// Typical use of this is to setup an Authorizer that uses these predefined
// tags:
// authorizer, err := PermissionsAuthorizerFromFile(name, TypicalTagType())
//
// For the common case of setting up an Authorizer for a Permissions object with
// these predefined tags, a convenience function is provided:
// authorizer := TypicalTagTypePermissionsAuthorizer(myperms)
func TypicalTagType() *vdl.Type {
return vdl.TypeOf(Tag(""))
}
// AllTypicalTags returns all access.Tag values defined in this package.
func AllTypicalTags() []Tag {
return []Tag{Admin, Read, Write, Debug, Resolve}
}