Documentation ¶
Index ¶
- func BuildAncestorsDisplayName(ctx context.Context, ancestors []string, collectionID string, ...) []string
- func BuildAncestryPath(ancestors []string) string
- func CreateTopic(ctx context.Context, pubSubClient *pubsub.Client, topicList []string, ...) error
- func Find(slice []string, val string) bool
- func GetAssetContact(contactRole string, resourceJSON json.RawMessage) (string, error)
- func GetByteSet(start byte, length int) []byte
- func GetClientOptionAndCleanKeys(ctx context.Context, serviceAccountEmail string, keyJSONFilePath string, ...) (option.ClientOption, bool)
- func GetEnvVarInt64(envVarName string) (int64, bool)
- func GetEnvVarUint64(envVarName string) (uint64, bool)
- func GetPublishCallResult(ctx context.Context, publishResult *pubsub.PublishResult, ...)
- func GetTopicList(ctx context.Context, pubSubClient *pubsub.Client) ([]string, error)
- func IntialRetryCheck(ctxEvent context.Context, initFailed bool, retryTimeOutSeconds int64) (bool, *metadata.Metadata, error)
- func PrintEnptyInterfaceType(value interface{}, valueName string) error
- func RevertSlash(txt string) string
- type PubSubMessage
- type PublishRequest
- type Window
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
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 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 GetByteSet ¶ added in v0.0.8
GetByteSet return a set of lenght contiguous bytes starting at bytes
func GetClientOptionAndCleanKeys ¶
func GetClientOptionAndCleanKeys(ctx context.Context, serviceAccountEmail string, keyJSONFilePath string, projectID string, gciAdminUserToImpersonate string, scopes []string) (option.ClientOption, bool)
GetClientOptionAndCleanKeys build a clientOption object and manage the init state
func GetEnvVarInt64 ¶
GetEnvVarInt64 retreive an os var, convert it and manage the init state
func GetEnvVarUint64 ¶
GetEnvVarUint64 retreive an os var, convert it and manage the init state
func GetPublishCallResult ¶ added in v0.0.8
func GetPublishCallResult(ctx context.Context, publishResult *pubsub.PublishResult, waitgroup *sync.WaitGroup, msgInfo string, pubSubErrNumber *uint64, pubSubMsgNumber *uint64, logEventEveryXPubSubMsg uint64)
GetPublishCallResult func to be used in go routine to scale pubsub event publish
func GetTopicList ¶ added in v0.0.2
GetTopicList retreive the list of existing pubsub topics
func IntialRetryCheck ¶
func IntialRetryCheck(ctxEvent context.Context, initFailed bool, retryTimeOutSeconds int64) (bool, *metadata.Metadata, error)
IntialRetryCheck performs intitial controls 1) return true and metadata when controls are passed 2) return false when controls failed: - 2a) with an error to retry the cloud function entry point function - 2b) with nil to stop the cloud function entry point function
func PrintEnptyInterfaceType ¶ added in v0.0.2
PrintEnptyInterfaceType discover the type below an empty interface
Types ¶
type PubSubMessage ¶ added in v0.0.3
type PubSubMessage struct {
Data []byte `json:"data"`
}
PubSubMessage is the payload of a Pub/Sub event.
type PublishRequest ¶ added in v0.0.2
type PublishRequest struct {
Topic string `json:"topic"`
}
PublishRequest Pub/sub