infra

package
v0.2.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2018 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package infra defines dnote structure

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Book

type Book struct {
	Name  string `json:"name"`
	Notes []Note `json:"notes"`
}

Book holds a metadata and its notes

type Config

type Config struct {
	Editor string
	APIKey string
}

Config holds dnote configuration

type Dnote

type Dnote map[string]Book

Dnote holds the whole dnote data

type DnoteCtx

type DnoteCtx struct {
	HomeDir     string
	DnoteDir    string
	APIEndpoint string
}

DnoteCtx is a context holding the information of the current runtime

type Note

type Note struct {
	UUID     string `json:"uuid"`
	Content  string `json:"content"`
	AddedOn  int64  `json:"added_on"`
	EditedOn int64  `json:"edited_on"`
}

Note represents a single microlesson

type Timestamp

type Timestamp struct {
	LastUpgrade int64 `yaml:"last_upgrade"`
	// id of the most recent action synced from the server
	Bookmark int `yaml:"bookmark"`
	// timestamp of the most recent action performed by the cli
	LastAction int64 `yaml:"last_action"`
}

Timestamp holds time information

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL