Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conversation ¶
type Conversation struct { ID string `json:"id"` Title string `json:"title"` Purpose string `json:"purpose"` Namespace struct { ID string `json:"id,omitempty"` Path string `json:"path,omitempty"` OwnerType string `json:"owner_type"` } `json:"namespace,omitempty"` }
Conversation is a presenter for the schema.Conversation model
func ConversationCollectionPresenter ¶
func ConversationCollectionPresenter(items []*schema.Conversation) []*Conversation
ConversationCollectionPresenter creates an array of presenters for the Conversation model
func ConversationPresenter ¶
func ConversationPresenter(c *schema.Conversation) *Conversation
ConversationPresenter creates a new instance of the presenter for the Conversation model
func (*Conversation) GetLocation ¶
func (c *Conversation) GetLocation() *url.URL
GetLocation returns the API location for the organization resource
type Locationable ¶
type Member ¶
type Member struct { ID string `json:"id"` UserID string `json:"user_id"` OrganizationID string `json:"org_id"` State string `json:"status"` Published bool `json:"published"` InvitedBy string `json:"invited_by,omitempty"` InviteEmail string `json:"invite_email,omitempty"` InviteSentAt time.Time `json:"invite_sent_at,omitempty"` InviteAcceptedAt time.Time `json:"invite_accepted_at,omitempty"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Member presents the schema.Member record that is return to the API responses
func MemberCollectionPresenter ¶
MemberCollectionPresenter creates a collection of presenters for Member
func MemberPresenter ¶
MemberPresenter creates a new instance of the Member presenter
type Organization ¶
type Organization struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` URL string `json:"url"` Location string `json:"location"` Email string `json:"email"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Namespace struct { ID string `json:"id,omitempty"` Path string `json:"path,omitempty"` OwnerType string `json:"owner_type"` } `json:"namespace,omitempty"` }
Organization is a presenter for the schema.Organization model
func OrganizationCollectionPresenter ¶
func OrganizationCollectionPresenter(items []*schema.Organization) []*Organization
OrganizationCollectionPresenter creates an array of presenters for the Organization model
func OrganizationPresenter ¶
func OrganizationPresenter(o *schema.Organization) *Organization
OrganizationPresenter creates a new instance of the presenter for the Organization model
func (*Organization) GetLocation ¶
func (o *Organization) GetLocation() *url.URL
GetLocation returns the API location for the organization resource
type Presentable ¶
type Presentable interface {
ToPresenterMap() Map
}
type User ¶
type User struct { ID string `json:"id"` Username string `json:"username"` FullName string `json:"full_name,omitempty"` PrimaryEmail string `json:"primary_email,omitempty"` Namespace struct { ID string `json:"id,omitempty"` Path string `json:"path,omitempty"` OwnerType string `json:"owner_type"` } `json:"namespace,omitempty"` }
User represents a API user.
func UserCollectionPresenter ¶
UserCollectionPresenter creates an array of presenters for the User model
func UserPresenter ¶
UserPresenter creates a new instance of the presenter for the User model
func (*User) GetLocation ¶
GetLocation returns the API location for the user resource