Documentation
¶
Index ¶
- Constants
- type AxonContext
- type AxonContextKey
- type AxonData
- type Edge
- type Folder
- type FolderList
- type HttpSettings
- type Metadata
- type Node
- type NodeContent
- type NodeData
- type NodeStyles
- type Note
- type NoteDetail
- type OauthSettings
- type Position
- type Route
- type Session
- type Settings
- type User
- type UserCache
Constants ¶
View Source
const ( AXON_TABLE string = "axon" AXON_USER_SESSION_TABLE string = "axon_user_session" )
View Source
const ( DEVELOPMENT string = "development" PRODUCTION string = "production" )
View Source
const ( PrivateRoute = "private" PublicRoute = "public" )
View Source
const (
AUTH_SESSION string = "axon_auth_session"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AxonContext ¶
type AxonContextKey ¶
type AxonContextKey string
type Edge ¶
type Edge struct {
UserId string `json:"user_id"`
FolderID string `json:"folder_id"`
NoteID string `json:"note_id"`
EdgeID string `json:"edge_id"`
SourceID string `json:"source"`
TargetID string `json:"target"`
Animated bool `json:"animated"`
Label string `json:"label"`
EdgeType string `json:"edge_type"`
LastEdited time.Time `json:"last_edited"`
}
type FolderList ¶
type HttpSettings ¶
type HttpSettings struct {
AllowedOrigins []string `yaml:"allowed_origins"`
AllowedMethods []string `yaml:"allowed_methods"`
AllowedHeaders []string `yaml:"allowed_headers"`
ExposedHeaders []string `yaml:"exposed_headers"`
AllowCredentials bool `yaml:"allow_credentials"`
MaxAge int `yaml:"max_age"`
}
type Node ¶
type Node struct {
UserId string `json:"user_id"`
FolderID string `json:"folder_id"`
NoteID string `json:"note_id"`
NodeID string `json:"node_id"`
Data NodeData `json:"data"`
Position Position `json:"position"`
Content NodeContent `json:"node_content"`
Styles NodeStyles `json:"node_styles"`
LastEdited time.Time `json:"last_edited"`
}
type NodeContent ¶
type NodeContent struct {
MarkDown string `json:"markdown" bson:"markdown"`
}
type NodeStyles ¶
type NoteDetail ¶
type NoteDetail struct {
UserId string `json:"user_id"`
FolderID string `json:"folder_id"`
NoteID string `json:"note_id"`
NoteName string `json:"note_name"`
Description string `json:"description"`
DateCreated time.Time `json:"date_created"`
LastEdited time.Time `json:"last_edited"`
Nodes []Node `json:"nodes"`
Edges []Edge `json:"edges"`
}
type OauthSettings ¶
type OauthSettings struct {
Provider string `yaml:"provider"`
ClientID string `yaml:"client_id"`
ClientSecret string `yaml:"client_secret"`
AccessTokenUrl string `yaml:"access_token_url"`
AuthorizeUrl string `yaml:"authorize_url"`
RedirectUri string `yaml:"redirect_uri"`
APIBaseUrl string `yaml:"api_base_url"`
Scope []string `yaml:"scope"`
State string `yaml:"state"`
}
type Route ¶
type Route struct {
Path string `json:"path"`
Auth string `json:"auth"`
Handler func(http.ResponseWriter, *http.Request, *AxonContext) `json:"handler"`
Method string `json:"method"`
}
type Settings ¶
type Settings struct {
Metadata Metadata `yaml:"metadata"`
HttpSettings HttpSettings `yaml:"http"`
OauthSettings OauthSettings `yaml:"oauth_settings"`
CoreSettings struct {
GithubArchiveRepo string `yaml:"github_archive_repo"`
} `yaml:"core_settings"`
AxonClient struct {
AuthRedirectUrl string `yaml:"auth_redirect_url"`
ErrorUrl string `yaml:"error_url"`
} `yaml:"axon_client"`
}
Click to show internal directories.
Click to hide internal directories.