Moved actor types constants to correct file
This commit is contained in:
parent
85e7725ff0
commit
0d6ce80864
25
actors.go
25
actors.go
|
@ -1,6 +1,21 @@
|
|||
package activitypub
|
||||
|
||||
type ActorCollection = []Actor
|
||||
const (
|
||||
// Actor Types
|
||||
ApplicationType string = "Application"
|
||||
GroupType string = "Group"
|
||||
OrganizationType string = "Organization"
|
||||
PersonType string = "Person"
|
||||
ServiceType string = "Service"
|
||||
)
|
||||
|
||||
var validActorTypes = [...]string{
|
||||
ApplicationType,
|
||||
GroupType,
|
||||
OrganizationType,
|
||||
PersonType,
|
||||
ServiceType,
|
||||
}
|
||||
|
||||
type Actor struct {
|
||||
BaseObject
|
||||
|
@ -30,14 +45,6 @@ type Actor struct {
|
|||
/**/
|
||||
}
|
||||
|
||||
var validActorTypes = [...]string{
|
||||
ApplicationType,
|
||||
GroupType,
|
||||
OrganizationType,
|
||||
PersonType,
|
||||
ServiceType,
|
||||
}
|
||||
|
||||
func ValidActorType(_type string) bool {
|
||||
for _, v := range validActorTypes {
|
||||
if v == _type {
|
||||
|
|
Reference in a new issue