Documentation ¶
Index ¶
- func DeleteOrganization(ctx context.Context, organizationID uint64, db *sqlx.DB) error
- type Organization
- func DescribeOrganization(ctx context.Context, db *sqlx.DB, organizationID int64) (*Organization, error)
- func DescribeOrganizationBySlug(ctx context.Context, db *sqlx.DB, slug string) (*Organization, error)
- func ListOrganizations(ctx context.Context, db *sqlx.DB) ([]Organization, error)
- func New() *Organization
- type OrganizationDbRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Organization ¶
type Organization struct { Id uint64 `json:"id" db:"id"` Name string `json:"name" db:"name"` Slug string `json:"slug" db:"slug"` Authcode string `json:"authcode" db:"authcode"` // Contact info ContactUserId uint64 `json:"contact_user_id" db:"contact_user_id"` ContactUser *users.User `json:"contact"` // Geographical Center - used for map view defaults Latitude float64 `json:"lat" db:"lat"` Longitude float64 `json:"lon" db:"lon"` }
func DescribeOrganization ¶
func ListOrganizations ¶
func New ¶
func New() *Organization
func (Organization) Validate ¶
func (o Organization) Validate() (errs *config.ErrorSet)
type OrganizationDbRow ¶
type OrganizationDbRow struct { Id uint64 `json:"id" db:"id"` Name string `json:"name" db:"name"` Slug string `json:"slug" db:"slug"` Authcode string `json:"authcode" db:"authcode"` // Contact info ContactUserId sql.NullInt64 `json:"contact_user_id" db:"contact_user_id"` // Geographical Center - used for map view defaults Latitude float64 `json:"lat" db:"lat"` Longitude float64 `json:"lon" db:"lon"` }
func (OrganizationDbRow) CopyToOrganization ¶
func (row OrganizationDbRow) CopyToOrganization() *Organization
Click to show internal directories.
Click to hide internal directories.