20 lines
290 B
Go
20 lines
290 B
Go
package models
|
|
|
|
// all avaiable read/write modes
|
|
const (
|
|
Read Rights = "R"
|
|
Write Rights = "W"
|
|
ReadWrite Rights = "RW"
|
|
)
|
|
|
|
// dbm read/write model
|
|
type Rights string
|
|
|
|
// return current rights
|
|
func (r *Rights) GetRights() Rights {
|
|
if *r == "" {
|
|
return ReadWrite
|
|
}
|
|
return *r
|
|
}
|