mirror of
https://github.com/writeas/go-writeas.git
synced 2025-07-27 15:18:28 +00:00
Add basic organization structs
This commit is contained in:
parent
c00064f688
commit
3ef92c5819
27
organization.go
Normal file
27
organization.go
Normal file
@ -0,0 +1,27 @@
|
||||
package writeas
|
||||
|
||||
// Role is an OrgMember's role.
|
||||
type Role string
|
||||
|
||||
const (
|
||||
RoleAdmin Role = "admin"
|
||||
RoleEditor Role = "editor"
|
||||
RoleAuthor Role = "author"
|
||||
)
|
||||
|
||||
type (
|
||||
// OrgMember represents a member of an Organization
|
||||
OrgMember struct {
|
||||
Author
|
||||
Email string `json:"email"`
|
||||
Role Role `json:"role"`
|
||||
}
|
||||
|
||||
// OrgMemberParams are parameters for creating or updating an OrgMember.
|
||||
OrgMemberParams struct {
|
||||
AuthorParams
|
||||
Username string `json:"username"`
|
||||
Email string `json:"email"`
|
||||
Role Role `json:"role"`
|
||||
}
|
||||
)
|
Loading…
Reference in New Issue
Block a user