diff --git a/notes/api.txt b/notes/api.txt index 87e8fc69..861d02d7 100644 --- a/notes/api.txt +++ b/notes/api.txt @@ -1,9 +1,11 @@ # API ideas... # Finding stuff +$repos->get_stack(name => $name); $repos->get_package(name => $name); -$repos->get_package(name => $name, version => $version); -$repos->get_distribution(path => $name); +$repos->get_package(name => $name, stack => $stack); +$repos->get_package(name => $name, version => $version); ??? +$repos->get_distribution(path => $path); # Getting dists $repos->pull(url => $url); @@ -18,6 +20,12 @@ $repos->unregister(distribution => $dist, stack => $stack); $repos->pin(distribution => $dist, stack => $stack); $repos->unpin(distribution => $dist, stack => $stack); +# Stacks +$repos->remove_stack(name => $name); +$repos->create_stack(name => $name); +$repos->copy_stack(from => $stack_a, to => $stack_b); +$repos->merge_stack(from => $stack_a, into => $stack_b); + # Misc $repos->find(distribution => $path); $repos->find(package => $name, version => $v); diff --git a/notes/errors.txt b/notes/errors.txt new file mode 100644 index 00000000..3633cc06 --- /dev/null +++ b/notes/errors.txt @@ -0,0 +1,25 @@ +Exception strategy... + +All untrapped error messages need to go through the log so they get +transmitted to the client + +Exceptions that originate from an Action do not require a stack trace. + +Exception that arise due to invalid user input do not require a stack +trace. + +Exceptions that are not expected (db, network, file system) do require +a stack trace. + +If the log level is debug, then all errors should be recorded with a +stack trace. + +Data validation strategy... + +Actions should validate as much as possible during construction. + +The Repository should validate arguments. + +The Database & collaborators may not validate arguments. + + diff --git a/notes/logging.txt b/notes/logging.txt new file mode 100644 index 00000000..5bdd8429 --- /dev/null +++ b/notes/logging.txt @@ -0,0 +1,19 @@ +Logging strategy... + +Actions emits one log message at 'notice' level that describes +the overally goal of the action. + +Repository emits one or two log messages at 'info' level for each major +operation. Minor operations logged at 'debug' level. + +Database, cache, & collaborators always log at 'debug' level. + +#---------- + +What is the purpose of the log??? + +* To record who made what modifications to the repository and when + +* To help debug and diagnose operational problems + +* To record operational events