openmeter / event /metadata /resourcepath.go
Leon4gr45's picture
Upload folder using huggingface_hub (part 5)
cee2387 verified
Raw
History Blame Contribute Delete
910 Bytes
package metadata
import (
"fmt"
"strings"
)
// Entity types
const (
EntityEntitlement = "entitlement"
EntitySubscription = "subscription"
EntitySubscriptionAddon = "subscriptionAddon"
EntityInvoice = "invoice"
EntityCustomer = "customer"
EntityGatheringInvoice = "gatheringInvoice"
EntitySubjectKey = "subjectKey"
EntityGrant = "grant"
EntityApp = "app"
EntityMeter = "meter"
EntityFeature = "feature"
EntityPlan = "plan"
EntityAddon = "addon"
)
// Ingestion/Events
const (
EntityEvent = "event"
)
func ComposeResourcePath(namespace string, items ...string) string {
return ComposeResourcePathRaw(append([]string{"namespace", namespace}, items...)...)
}
func ComposeResourcePathRaw(items ...string) string {
return fmt.Sprintf("//openmeter.io/%s", strings.Join(items, "/"))
}