shimV2

package
v0.0.0-...-3144677 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2017 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleBucketEvent

func HandleBucketEvent(h BucketHandlerFunc)

func HandlePubSubMessage

func HandlePubSubMessage(h PubsubHandlerFunc)

Types

type BucketHandlerFunc

type BucketHandlerFunc func(object Object)

type Object

type Object struct {
	Acl                []*ObjectAccessControl `json:"acl,omitempty"`
	Bucket             string                 `json:"bucket,omitempty"`
	CacheControl       string                 `json:"cacheControl,omitempty"`
	ComponentCount     int64                  `json:"componentCount,omitempty"`
	ContentDisposition string                 `json:"contentDisposition,omitempty"`
	ContentEncoding    string                 `json:"contentEncoding,omitempty"`
	ContentLanguage    string                 `json:"contentLanguage,omitempty"`
	ContentType        string                 `json:"contentType,omitempty"`
	Crc32c             string                 `json:"crc32c,omitempty"`
	Etag               string                 `json:"etag,omitempty"`
	Generation         int64                  `json:"generation,omitempty,string"`
	Id                 string                 `json:"id,omitempty"`
	Kind               string                 `json:"kind,omitempty"`
	Md5Hash            string                 `json:"md5Hash,omitempty"`
	MediaLink          string                 `json:"mediaLink,omitempty"`
	Metadata           map[string]string      `json:"metadata,omitempty"`
	Metageneration     int64                  `json:"metageneration,omitempty,string"`
	Name               string                 `json:"name,omitempty"`
	Owner              *ObjectOwner           `json:"owner,omitempty"`
	SelfLink           string                 `json:"selfLink,omitempty"`
	Size               uint64                 `json:"size,omitempty,string"`
	StorageClass       string                 `json:"storageClass,omitempty"`
	TimeDeleted        string                 `json:"timeDeleted,omitempty"`
	Updated            string                 `json:"updated,omitempty"`
}

type ObjectAccessControl

type ObjectAccessControl struct {
	Bucket     string `json:"bucket,omitempty"`
	Domain     string `json:"domain,omitempty"`
	Email      string `json:"email,omitempty"`
	Entity     string `json:"entity,omitempty"`
	EntityId   string `json:"entityId,omitempty"`
	Etag       string `json:"etag,omitempty"`
	Generation int64  `json:"generation,omitempty,string"`
	Id         string `json:"id,omitempty"`
	Kind       string `json:"kind,omitempty"`
	Object     string `json:"object,omitempty"`
	Role       string `json:"role,omitempty"`
	SelfLink   string `json:"selfLink,omitempty"`
}

type ObjectOwner

type ObjectOwner struct {
	Entity   string `json:"entity,omitempty"`
	EntityId string `json:"entityId,omitempty"`
}

type PubsubHandlerFunc

type PubsubHandlerFunc func(message PubsubMessage)

type PubsubMessage

type PubsubMessage struct {
	Attributes  map[string]string `json:"attributes,omitempty"`
	Data        string            `json:"data,omitempty"`
	MessageId   string            `json:"messageId,omitempty"`
	PublishTime string            `json:"publishTime,omitempty"`
}

Jump to

Keyboard shortcuts

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