瀏覽代碼

Add basic organization structs

main
Matt Baer 2 年之前
父節點
當前提交
3ef92c5819
共有 1 個文件被更改,包括 27 次插入0 次删除
  1. +27
    -0
      organization.go

+ 27
- 0
organization.go 查看文件

@@ -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…
取消
儲存