🏷️ Created Visibility domain
This commit is contained in:
parent
b43a06dcad
commit
7f5907c552
27
internal/domain/visibility.go
Normal file
27
internal/domain/visibility.go
Normal file
|
@ -0,0 +1,27 @@
|
|||
package domain
|
||||
|
||||
// Visibility describes visibility enum.
|
||||
//
|
||||
// See: https://indieweb.org/Micropub-extensions#Visibility
|
||||
type Visibility struct {
|
||||
visibility string
|
||||
}
|
||||
|
||||
var (
|
||||
VisibilityUnd = Visibility{}
|
||||
VisibilityPublic = Visibility{"public"} // "public"
|
||||
VisibilityUnlisted = Visibility{"unlisted"} // "unlisted"
|
||||
VisibilityPrivate = Visibility{"private"} // "private"
|
||||
)
|
||||
|
||||
func (v Visibility) String() string {
|
||||
if v.visibility == "" {
|
||||
return "und"
|
||||
}
|
||||
|
||||
return v.visibility
|
||||
}
|
||||
|
||||
func (v Visibility) GoString() string {
|
||||
return "domain.Visibility(" + v.String() + ")"
|
||||
}
|
Loading…
Reference in New Issue
Block a user