SimpleCloudNotifier/scnserver/models/ids.go

26 lines
639 B
Go
Raw Normal View History

2022-11-20 22:18:24 +01:00
package models
import (
2023-01-15 06:30:30 +01:00
"gogs.mikescher.com/BlackForestBytes/goext/rext"
)
2022-11-20 22:18:24 +01:00
2023-10-26 13:14:11 +02:00
//go:generate go run ../_gen/id-generate.go -- ids_gen.go
2022-11-20 22:18:24 +01:00
type EntityID interface {
String() string
Valid() error
Prefix() string
Raw() string
CheckString() string
2023-01-15 06:30:30 +01:00
Regex() rext.Regex
2022-11-20 22:18:24 +01:00
}
2023-10-26 13:14:11 +02:00
type UserID string //@csid:type [USR]
type ChannelID string //@csid:type [CHA]
type DeliveryID string //@csid:type [DEL]
type MessageID string //@csid:type [MSG]
type SubscriptionID string //@csid:type [SUB]
type ClientID string //@csid:type [CLN]
type RequestID string //@csid:type [REQ]
type KeyTokenID string //@csid:type [TOK]