Categorygithub.com/dsblox/pim
modulepackage
0.1.1
Repository: https://github.com/dsblox/pim.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
No description provided by the author
since the pattern we chose is to keep the actual command objects internal, this function should only be called from a command object.
No description provided by the author
No description provided by the author
No description provided by the author
Function used when we discover a brand new postgres server that has no PIM database.
No description provided by the author
No description provided by the author
IterTasks: worker that operates over any slice of tasks and given a current index i will return the task ahead or behind i by that delta slots.
No description provided by the author
========================================================== Logger ---------------------------------------------------------- Using the logger as the handler allows us to log all HTTP as it moves through the system.
No description provided by the author
No description provided by the author
initialize the database and hold in global variable env TBD - isolate this in a DB layer better and perhaps stop using global variables so we can later support multiple DB connections.
No description provided by the author
NewTask: create a new task with a name, assign a unique id, and default settings When we break Tasks into its own package we will rename this to just "New()".
initialize the database and hold in global variable env TBD - isolate this in a DB layer better and perhaps stop using global variables so we can later support multiple DB connections.
No description provided by the author
an in-memory-only task that will never be saved - used to group other tasks so you can iterate over them or manipulate them, but designated never to be saved- note that it does have an id.
=============================================================================== User ------------------------------------------------------------------------------- Basic creator function and getter / setters for a user.
No description provided by the author
No description provided by the author
============================================================================== TagIndex() ------------------------------------------------------------------------------ This gets a list of all the tags that have been set on any task across the instance, presumably to allow some user interface to select from all tags so they can pick one or more for filtering.
No description provided by the author
No description provided by the author
TBD: have this route be a find and make the parameters of the URL the meta-data to match on.
No description provided by the author
TBD: combined with TaskFind.
TBD: combined with TaskFind.
in development: general find function that can take lots of parameters - was going to start with a date range for completion dates to fix the problem with timezones only from UTC (change the client to ask for local time range and call this).
No description provided by the author
consider: should this be an PUT or POST on the task itself with a new "field" of "relativeImportance"?.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
============================================================================== Undo() ------------------------------------------------------------------------------ TBD - somehow make this per-user!!! Undo stack needed per user! ============================================================================*/.
=============================================================================== UserAuthenticator ------------------------------------------------------------------------------- This is the methodology by which every API call make use of the function above.
=============================================================================== UserFromRequest() ------------------------------------------------------------------------------- This is a convenience function to make it easy for each handler to pull the user off the request after it has been authenticated.
No description provided by the author
TEMPORARY way to allow all tasks to be owned by one user while developing user behavior.
============================================================================== UserSetAuthToken() ------------------------------------------------------------------------------ Inputs: w ResponseWriter - response to write results / cookie into username string - username whose password is already ok-ed Errors: This function returns no errors.
============================================================================== UserSignin() ------------------------------------------------------------------------------ Sign the user into the system by validating credentials that are expected in the request and - if the credentials are valid - putting an authentication token into the response that the client can reuse on future requests.
============================================================================== UserSignReup() ------------------------------------------------------------------------------ Given an already authenticated user, issue a new set of authentication credentials with a new expiration time.
============================================================================== UserSignup() ------------------------------------------------------------------------------ Create a new user and automatically sign them in by returning an authentication token.
No description provided by the author

# Constants

an environment variable i cause to be created.
the migration version is used with my homemade migration code and maps to a 4-digit set of migration files for Origin, Up and Down files to be run on clean DBs, to upgrade or rollback.
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Create a struct that will be encoded to a JWT.
Cmd: this is the outer envelope of all our responses NOT YET USED EXCEPT FOR UNDO- but can later be used to standardize all our response envelopes.
global variable to hold a DB connection can we find a way to make it a static in the TaaskDataMapperPostgreSQL world?.
No description provided by the author
No description provided by the author
No description provided by the author
Task: our central type for the whole world here - will become quite large over time.
TaskDataMapperPostgreSQL implements TaskDataMapper to persist tasks.
TaskDataMapperYAML implements TaskDataMapper to persist tasks.
Task: our central type for the whole world here - will become quite large over time.
TaskLink: simple object to abstract a task link with optional offsets into the name for possible use by some clients to hyperlink within the task name IN PROGRESS 6/18/21.
No description provided by the author
Note: struct fields must be public in order for unmarshal to correctly populate the data.
=============================================================================== UserAuthentication - User Layer ------------------------------------------------------------------------------- This section of the file represents the user objects themselves, which is an unique id, email and password for each user, and a few list functions on user slices.
Create a struct to read the username and password from a request body.

# Interfaces

============================================================================== Commands and Undo / Redo ------------------------------------------------------------------------------ The Command and commandHistory objects allow us to define and track what users are doing, track all actions in a stack, and allow for undo and redo functions.
interface to represent a linkage to a storage mechanism.
for persistence we have a mapper interface that can be implemented differently depending on the backend we select.

# Type aliases

didn't understand error types as values before - will rework this for proper Go error processing TBD.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TaskState: enum type to track possible states of tasks along with UTF-8 characters to represent each state in the console app.
=============================================================================== Users ------------------------------------------------------------------------------- Simple class to group users and help clients easily find them by email address or username.