model

package
v0.0.0-...-614d85d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	Name       string        `json:"name"`
	OwnedBy    string        `json:"ownedBy"`              // name of customer owning the bucket
	CreatedAt  time.Time     `json:"createdAt,omitempty"`  // default is IS8601 (RFC3339) date format
	ModifiedAt time.Time     `json:"modifiedAt,omitempty"` // default is IS8601 (RFC3339) date format
	Creator    string        `json:"creator"`
	ACLs       authz.ACLList `json:"acls"`
}

Bucket struct defines a Bucket object information

func NewBucketFromBytes

func NewBucketFromBytes(data []byte) (*Bucket, error)

NewBucketFromBytes creates Bucket object from serialized byte array.

type Customer

type Customer struct {
	Name       string    `json:"name"`
	CreatedAt  time.Time `json:"createdAt,omitempty"`  // default is IS8601 (RFC3339) date format
	ModifiedAt time.Time `json:"modifiedAt,omitempty"` // default is IS8601 (RFC3339) date format
	Groups     []string  `json:"groups"`               // array of user groups binding to the customer account
	UserIDs    []string  `json:"userIDs"`              // array of individual userIDs binding to the customer account

}

Customer struct represents a customer, that can manage multiple groups of users

func (Customer) ContainsGroup

func (c Customer) ContainsGroup(groupName string) bool

ContainsGroup checks if the given group-name is in the customer

func (Customer) ContainsUser

func (c Customer) ContainsUser(userID string) bool

ContainsUser checks if the given userID is in the customer's individual UserIDs list

func (Customer) HasAnyGroup

func (c Customer) HasAnyGroup(checkingGroups []string) bool

HasAnyGroup checks if any of given groups belongs to the customer

type FileObject

type FileObject struct {
	Path      string    `json:"path"`
	CreatedAt time.Time `json:"createdAt"`
}

FileObject struct object is used for configuring public paths

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL