helper

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAncestorsDisplayName added in v0.0.2

func BuildAncestorsDisplayName(ctx context.Context, ancestors []string, collectionID string, firestoreClient *firestore.Client, cloudresourcemanagerService *cloudresourcemanager.Service, cloudresourcemanagerServiceV2 *cloudresourcemanagerv2.Service) []string

BuildAncestorsDisplayName build a slice of Ancestor friendly name fron a slice of ancestors

func BuildAncestryPath added in v0.0.2

func BuildAncestryPath(ancestors []string) string

BuildAncestryPath build a path from a slice of ancestors

func CreateTopic added in v0.0.2

func CreateTopic(ctx context.Context, pubSubClient *pubsub.Client, topicList []string, topicName string) error

CreateTopic check if a topic already exist, if not create it

func Find added in v0.0.2

func Find(slice []string, val string) bool

Find a string in a slice of string. Return true when found else false

func GetAssetContact added in v0.0.2

func GetAssetContact(contactRole string, resourceJSON json.RawMessage) (string, error)

GetAssetContact retrieve owner of resolver contact from asset labels and parent labels

func GetTopicList added in v0.0.2

func GetTopicList(ctx context.Context, pubSubClient *pubsub.Client) ([]string, error)

GetTopicList retreive the list of existing pubsub topics

func PrintEnptyInterfaceType added in v0.0.2

func PrintEnptyInterfaceType(value interface{}, valueName string) error

PrintEnptyInterfaceType discover the type below an empty interface

func RevertSlash

func RevertSlash(txt string) string

RevertSlash replace slash / by back slash \

Types

type PublishRequest added in v0.0.2

type PublishRequest struct {
	Topic string `json:"topic"`
}

PublishRequest Pub/sub

Jump to

Keyboard shortcuts

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