Created
April 20, 2016 06:54
-
-
Save sumitasok/f99c79754768d46b097e460eb20db8ff to your computer and use it in GitHub Desktop.
Interface implementation for Golang, to ensure never ever unauthorised data is wrongly pulled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// model | |
fund getPublicEvents(status, publish_status string, isPrivate bool) | |
EventMeta{} | |
Events { | |
GetALL() []Events | |
} | |
ManageEvent struct{ | |
*EventMeta | |
} | |
me GetAll() []Events | |
me AllowedSTatus() []string -> "drafted", "published", "archived", "private_published" | |
PublicEvent struct{ | |
*EventMeta | |
} | |
pe GetAll() []Events | |
pe AllowedSTatus() []string -> "published" | |
PlatformEvent struct{ | |
*EventMeta | |
} | |
ple GetALL() []Events{} | |
ple AllowedSTatus() []string -> "drafted", "published", "archived", "deleted", "private_published" | |
getALL(Events, x params) | |
getByStatus(Events, "all") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment