Documentation ¶
Index ¶
- Constants
- func AddSignature(share *link.PublicShare, pw string) error
- func CreateSignature(token, pw string, expiration time.Time) (string, error)
- func GroupFiltersByType(filters []*link.ListPublicSharesRequest_Filter) ...
- func IsExpired(s *link.PublicShare) bool
- func MatchesAnyFilter(share *link.PublicShare, filters []*link.ListPublicSharesRequest_Filter) bool
- func MatchesFilter(share *link.PublicShare, filter *link.ListPublicSharesRequest_Filter) bool
- func MatchesFilters(share *link.PublicShare, filters []*link.ListPublicSharesRequest_Filter) bool
- func ResourceIDFilter(id *provider.ResourceId) *link.ListPublicSharesRequest_Filter
- func StorageIDFilter(id string) *link.ListPublicSharesRequest_Filter
- type Manager
Constants ¶
const ( // StorageIDFilterType defines a new filter type for storage id. // TODO: Remove this once the filter type is in the CS3 API. StorageIDFilterType link.ListPublicSharesRequest_Filter_Type = 4 )
Variables ¶
This section is empty.
Functions ¶
func AddSignature ¶
func AddSignature(share *link.PublicShare, pw string) error
AddSignature augments a public share with a signature. The signature has a validity of 30 minutes.
func CreateSignature ¶
CreateSignature calculates a signature for a public share.
func GroupFiltersByType ¶
func GroupFiltersByType(filters []*link.ListPublicSharesRequest_Filter) map[link.ListPublicSharesRequest_Filter_Type][]*link.ListPublicSharesRequest_Filter
GroupFiltersByType groups the given filters and returns a map using the filter type as the key.
func IsExpired ¶
func IsExpired(s *link.PublicShare) bool
IsExpired tests whether a public share is expired
func MatchesAnyFilter ¶
func MatchesAnyFilter(share *link.PublicShare, filters []*link.ListPublicSharesRequest_Filter) bool
MatchesAnyFilter checks if the share passes at least one of the given filters.
func MatchesFilter ¶
func MatchesFilter(share *link.PublicShare, filter *link.ListPublicSharesRequest_Filter) bool
MatchesFilter tests if the share passes the filter.
func MatchesFilters ¶
func MatchesFilters(share *link.PublicShare, filters []*link.ListPublicSharesRequest_Filter) bool
MatchesFilters checks if the share passes the given filters. Filters of the same type form a disjuntion, a logical OR. Filters of separate type form a conjunction, a logical AND. Here is an example: (resource_id=1 OR resource_id=2) AND (grantee_type=USER OR grantee_type=GROUP)
func ResourceIDFilter ¶
func ResourceIDFilter(id *provider.ResourceId) *link.ListPublicSharesRequest_Filter
ResourceIDFilter is an abstraction for creating filter by resource id.
func StorageIDFilter ¶
func StorageIDFilter(id string) *link.ListPublicSharesRequest_Filter
StorageIDFilter is an abstraction for creating filter by storage id.