MCPcopy
hub / github.com/minio/minio-go / newStatements

Function newStatements

pkg/policy/bucket-policy.go:234–243  ·  view source on GitHub ↗

Returns new statements for given policy, bucket and prefix.

(policy BucketPolicy, bucketName, prefix string)

Source from the content-addressed store, hash-verified

232
233// Returns new statements for given policy, bucket and prefix.
234func newStatements(policy BucketPolicy, bucketName, prefix string) (statements []Statement) {
235 statements = []Statement{}
236 ns := newBucketStatement(policy, bucketName, prefix)
237 statements = append(statements, ns...)
238
239 ns = newObjectStatement(policy, bucketName, prefix)
240 statements = append(statements, ns...)
241
242 return statements
243}
244
245// Returns whether given bucket statements are used by other than given prefix statements.
246func getInUsePolicy(statements []Statement, bucketName, prefix string) (readOnlyInUse, writeOnlyInUse bool) {

Callers 2

SetPolicyFunction · 0.85
TestNewStatementsFunction · 0.85

Calls 2

newBucketStatementFunction · 0.85
newObjectStatementFunction · 0.85

Tested by 1

TestNewStatementsFunction · 0.68