框架基本完成
This commit is contained in:
parent
e02a80fda8
commit
b07bc3c9b9
@ -5,32 +5,14 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" readonly="true" id="03ed5703-81a1-441b-849c-c426276586b7" name="Default" comment="">
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/inspectionProfiles" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/libraries" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/hotime.iml" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/libraries/GOPATH__hotime_.xml" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/modules.xml" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/preferred-vcs.xml" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app.go" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/cachedb.go" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/cachememory.go" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/const.go" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/context.go" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/db.go" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/error.go" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/func.go" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/map.go" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/obj.go" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/objtoobj.go" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/session.go" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/slice.go" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/type.go" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/var.go" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app.go" afterPath="$PROJECT_DIR$/app.go" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/context.go" afterPath="$PROJECT_DIR$/context.go" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/func.go" afterPath="$PROJECT_DIR$/func.go" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/obj.go" afterPath="$PROJECT_DIR$/obj.go" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/session.go" afterPath="$PROJECT_DIR$/session.go" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/type.go" afterPath="$PROJECT_DIR$/type.go" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/var.go" afterPath="$PROJECT_DIR$/var.go" />
|
||||
</list>
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="TRACKING_ENABLED" value="true" />
|
||||
@ -42,23 +24,11 @@
|
||||
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file leaf-file-name="db.go" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/db.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="187">
|
||||
<caret line="11" column="5" lean-forward="false" selection-start-line="11" selection-start-column="5" selection-end-line="11" selection-end-column="5" />
|
||||
<folding>
|
||||
<element signature="e#16#97#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="objtoobj.go" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/objtoobj.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="442">
|
||||
<caret line="26" column="26" lean-forward="false" selection-start-line="26" selection-start-column="26" selection-end-line="26" selection-end-column="26" />
|
||||
<state relative-caret-position="306">
|
||||
<caret line="22" column="42" lean-forward="false" selection-start-line="22" selection-start-column="42" selection-end-line="22" selection-end-column="42" />
|
||||
<folding>
|
||||
<element signature="e#16#64#0" expanded="true" />
|
||||
</folding>
|
||||
@ -66,11 +36,21 @@
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="context.go" pinned="false" current-in-tab="true">
|
||||
<file leaf-file-name="session.go" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/session.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="289">
|
||||
<caret line="17" column="67" lean-forward="false" selection-start-line="17" selection-start-column="67" selection-end-line="17" selection-end-column="67" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="context.go" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/context.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="153">
|
||||
<caret line="13" column="21" lean-forward="true" selection-start-line="13" selection-start-column="21" selection-end-line="13" selection-end-column="21" />
|
||||
<state relative-caret-position="238">
|
||||
<caret line="19" column="12" lean-forward="false" selection-start-line="19" selection-start-column="12" selection-end-line="19" selection-end-column="12" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@ -86,23 +66,11 @@
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="slice.go" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/slice.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="816">
|
||||
<caret line="48" column="0" lean-forward="false" selection-start-line="48" selection-start-column="0" selection-end-line="48" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="e#16#51#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="app.go" pinned="false" current-in-tab="false">
|
||||
<file leaf-file-name="app.go" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/app.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="193">
|
||||
<caret line="79" column="43" lean-forward="true" selection-start-line="79" selection-start-column="43" selection-end-line="79" selection-end-column="43" />
|
||||
<state relative-caret-position="288">
|
||||
<caret line="42" column="40" lean-forward="false" selection-start-line="42" selection-start-column="40" selection-end-line="42" selection-end-column="40" />
|
||||
<folding>
|
||||
<element signature="e#16#138#0" expanded="true" />
|
||||
</folding>
|
||||
@ -110,12 +78,24 @@
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="func.go" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/func.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="2992">
|
||||
<caret line="185" column="0" lean-forward="false" selection-start-line="185" selection-start-column="0" selection-end-line="185" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="var.go" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/var.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="442">
|
||||
<caret line="26" column="26" lean-forward="false" selection-start-line="26" selection-start-column="26" selection-end-line="26" selection-end-column="26" />
|
||||
<folding />
|
||||
<state relative-caret-position="204">
|
||||
<caret line="12" column="28" lean-forward="false" selection-start-line="12" selection-start-column="28" selection-end-line="12" selection-end-column="28" />
|
||||
<folding>
|
||||
<marker date="1502249321786" expanded="true" signature="813:821" ph="{...}" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -123,20 +103,30 @@
|
||||
<file leaf-file-name="obj.go" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/obj.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="867">
|
||||
<caret line="51" column="36" lean-forward="false" selection-start-line="51" selection-start-column="36" selection-end-line="51" selection-end-column="36" />
|
||||
<state relative-caret-position="952">
|
||||
<caret line="56" column="0" lean-forward="false" selection-start-line="56" selection-start-column="0" selection-end-line="56" selection-end-column="0" />
|
||||
<folding>
|
||||
<marker date="1501670160002" expanded="true" signature="165:179" ph="{...}" />
|
||||
<marker date="1502075126746" expanded="true" signature="176:190" ph="{...}" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="map.go" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/map.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="2244">
|
||||
<caret line="136" column="1" lean-forward="false" selection-start-line="136" selection-start-column="1" selection-end-line="136" selection-end-column="1" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="type.go" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/type.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="289">
|
||||
<caret line="17" column="20" lean-forward="false" selection-start-line="17" selection-start-column="20" selection-end-line="17" selection-end-column="20" />
|
||||
<state relative-caret-position="102">
|
||||
<caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@ -164,7 +154,6 @@
|
||||
<option value="$PROJECT_DIR$/objtoobj.go" />
|
||||
<option value="$PROJECT_DIR$/map.go" />
|
||||
<option value="$PROJECT_DIR$/controller.go" />
|
||||
<option value="$PROJECT_DIR$/func.go" />
|
||||
<option value="$PROJECT_DIR$/Config.go" />
|
||||
<option value="$PROJECT_DIR$/config.go" />
|
||||
<option value="$PROJECT_DIR$/error.go" />
|
||||
@ -172,13 +161,15 @@
|
||||
<option value="$PROJECT_DIR$/CacheMemory.go" />
|
||||
<option value="$PROJECT_DIR$/cachememory.go" />
|
||||
<option value="$PROJECT_DIR$/context.go" />
|
||||
<option value="$PROJECT_DIR$/var.go" />
|
||||
<option value="$PROJECT_DIR$/const.go" />
|
||||
<option value="$PROJECT_DIR$/obj.go" />
|
||||
<option value="$PROJECT_DIR$/type.go" />
|
||||
<option value="$PROJECT_DIR$/memorycache.go" />
|
||||
<option value="$PROJECT_DIR$/dbcache.go" />
|
||||
<option value="$PROJECT_DIR$/obj.go" />
|
||||
<option value="$PROJECT_DIR$/session.go" />
|
||||
<option value="$PROJECT_DIR$/type.go" />
|
||||
<option value="$PROJECT_DIR$/app.go" />
|
||||
<option value="$PROJECT_DIR$/var.go" />
|
||||
<option value="$PROJECT_DIR$/func.go" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
@ -389,7 +380,10 @@
|
||||
<workItem from="1501551411691" duration="8609000" />
|
||||
<workItem from="1501642366611" duration="11543000" />
|
||||
<workItem from="1501811486138" duration="1020000" />
|
||||
<workItem from="1501834813088" duration="140000" />
|
||||
<workItem from="1501834813088" duration="1388000" />
|
||||
<workItem from="1502074704907" duration="2867000" />
|
||||
<workItem from="1502246830320" duration="2261000" />
|
||||
<workItem from="1502360035037" duration="66000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001">
|
||||
<created>1500458878821</created>
|
||||
@ -440,11 +434,18 @@
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1501670291054</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="8" />
|
||||
<task id="LOCAL-00008" summary="框架基本完成">
|
||||
<created>1501834964768</created>
|
||||
<option name="number" value="00008" />
|
||||
<option name="presentableId" value="LOCAL-00008" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1501834964768</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="9" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="43740000" />
|
||||
<option name="totallyTimeSpent" value="50182000" />
|
||||
</component>
|
||||
<component name="TodoView">
|
||||
<todo-panel id="selected-file">
|
||||
@ -458,12 +459,12 @@
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="55" y="-8" width="1873" height="1096" extended-state="6" />
|
||||
<layout>
|
||||
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.27799228" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.28792056" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32846716" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3295099" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32398754" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.62616825" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24972437" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32846716" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
@ -498,19 +499,13 @@
|
||||
<watches-manager />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/func.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="459">
|
||||
<caret line="38" column="0" lean-forward="false" selection-start-line="38" selection-start-column="0" selection-end-line="38" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/var.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="170">
|
||||
<caret line="10" column="9" lean-forward="false" selection-start-line="10" selection-start-column="9" selection-end-line="10" selection-end-column="9" />
|
||||
<folding />
|
||||
<folding>
|
||||
<marker date="1502249321786" expanded="true" signature="813:821" ph="{...}" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -526,7 +521,7 @@
|
||||
<state relative-caret-position="17">
|
||||
<caret line="1" column="2" lean-forward="false" selection-start-line="1" selection-start-column="2" selection-end-line="1" selection-end-column="2" />
|
||||
<folding>
|
||||
<element signature="e#16#97#0" expanded="true" />
|
||||
<element signature="e#16#97#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -554,7 +549,7 @@
|
||||
<state relative-caret-position="1156">
|
||||
<caret line="69" column="0" lean-forward="false" selection-start-line="69" selection-start-column="0" selection-end-line="69" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="e#16#51#0" expanded="true" />
|
||||
<element signature="e#16#51#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -563,7 +558,6 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="595">
|
||||
<caret line="46" column="12" lean-forward="false" selection-start-line="46" selection-start-column="12" selection-end-line="46" selection-end-column="12" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -571,7 +565,9 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="408">
|
||||
<caret line="24" column="2" lean-forward="true" selection-start-line="24" selection-start-column="2" selection-end-line="24" selection-end-column="2" />
|
||||
<folding />
|
||||
<folding>
|
||||
<marker date="1502249321786" expanded="true" signature="813:821" ph="{...}" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -587,7 +583,7 @@
|
||||
<state relative-caret-position="17">
|
||||
<caret line="1" column="2" lean-forward="true" selection-start-line="1" selection-start-column="2" selection-end-line="1" selection-end-column="2" />
|
||||
<folding>
|
||||
<element signature="e#16#97#0" expanded="true" />
|
||||
<element signature="e#16#97#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -615,7 +611,7 @@
|
||||
<state relative-caret-position="1173">
|
||||
<caret line="69" column="0" lean-forward="false" selection-start-line="69" selection-start-column="0" selection-end-line="69" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="e#16#51#0" expanded="true" />
|
||||
<element signature="e#16#51#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -624,7 +620,6 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="646">
|
||||
<caret line="38" column="12" lean-forward="true" selection-start-line="38" selection-start-column="12" selection-end-line="38" selection-end-column="12" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -632,7 +627,9 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="391">
|
||||
<caret line="23" column="2" lean-forward="true" selection-start-line="23" selection-start-column="2" selection-end-line="23" selection-end-column="2" />
|
||||
<folding />
|
||||
<folding>
|
||||
<marker date="1502249321786" expanded="true" signature="813:821" ph="{...}" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -648,7 +645,7 @@
|
||||
<state relative-caret-position="17">
|
||||
<caret line="1" column="2" lean-forward="true" selection-start-line="1" selection-start-column="2" selection-end-line="1" selection-end-column="2" />
|
||||
<folding>
|
||||
<element signature="e#16#97#0" expanded="true" />
|
||||
<element signature="e#16#97#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -673,7 +670,7 @@
|
||||
<state relative-caret-position="1666">
|
||||
<caret line="99" column="0" lean-forward="false" selection-start-line="99" selection-start-column="0" selection-end-line="99" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="e#16#51#0" expanded="true" />
|
||||
<element signature="e#16#51#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -682,7 +679,9 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="170">
|
||||
<caret line="15" column="2" lean-forward="true" selection-start-line="15" selection-start-column="2" selection-end-line="15" selection-end-column="2" />
|
||||
<folding />
|
||||
<folding>
|
||||
<marker date="1502249321786" expanded="true" signature="813:821" ph="{...}" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -701,7 +700,7 @@
|
||||
<state relative-caret-position="-289">
|
||||
<caret line="1" column="2" lean-forward="true" selection-start-line="1" selection-start-column="2" selection-end-line="1" selection-end-column="2" />
|
||||
<folding>
|
||||
<element signature="e#16#97#0" expanded="true" />
|
||||
<element signature="e#16#97#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -711,7 +710,7 @@
|
||||
<state relative-caret-position="678">
|
||||
<caret line="69" column="0" lean-forward="false" selection-start-line="69" selection-start-column="0" selection-end-line="69" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="e#16#51#0" expanded="true" />
|
||||
<element signature="e#16#51#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -738,7 +737,9 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="391">
|
||||
<caret line="23" column="46" lean-forward="true" selection-start-line="23" selection-start-column="46" selection-end-line="23" selection-end-column="46" />
|
||||
<folding />
|
||||
<folding>
|
||||
<marker date="1502249321786" expanded="true" signature="813:821" ph="{...}" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -746,7 +747,6 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="595">
|
||||
<caret line="38" column="12" lean-forward="true" selection-start-line="38" selection-start-column="12" selection-end-line="38" selection-end-column="12" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -762,7 +762,7 @@
|
||||
<state relative-caret-position="17">
|
||||
<caret line="1" column="2" lean-forward="true" selection-start-line="1" selection-start-column="2" selection-end-line="1" selection-end-column="2" />
|
||||
<folding>
|
||||
<element signature="e#16#97#0" expanded="true" />
|
||||
<element signature="e#16#97#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -787,7 +787,7 @@
|
||||
<state relative-caret-position="1666">
|
||||
<caret line="99" column="0" lean-forward="false" selection-start-line="99" selection-start-column="0" selection-end-line="99" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="e#16#51#0" expanded="true" />
|
||||
<element signature="e#16#51#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -796,7 +796,9 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="170">
|
||||
<caret line="15" column="2" lean-forward="true" selection-start-line="15" selection-start-column="2" selection-end-line="15" selection-end-column="2" />
|
||||
<folding />
|
||||
<folding>
|
||||
<marker date="1502249321786" expanded="true" signature="813:821" ph="{...}" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -811,21 +813,6 @@
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/config.go" />
|
||||
<entry file="file://$PROJECT_DIR$/func.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="4981">
|
||||
<caret line="303" column="0" lean-forward="false" selection-start-line="303" selection-start-column="0" selection-end-line="303" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/map.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="2244">
|
||||
<caret line="136" column="1" lean-forward="false" selection-start-line="136" selection-start-column="1" selection-end-line="136" selection-end-column="1" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/const.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="187">
|
||||
@ -835,30 +822,20 @@
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/slice.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="816">
|
||||
<state relative-caret-position="799">
|
||||
<caret line="48" column="0" lean-forward="false" selection-start-line="48" selection-start-column="0" selection-end-line="48" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="e#16#51#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/objtoobj.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="442">
|
||||
<caret line="26" column="26" lean-forward="false" selection-start-line="26" selection-start-column="26" selection-end-line="26" selection-end-column="26" />
|
||||
<folding>
|
||||
<element signature="e#16#64#0" expanded="true" />
|
||||
<element signature="e#16#51#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/db.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="187">
|
||||
<state relative-caret-position="68">
|
||||
<caret line="11" column="5" lean-forward="false" selection-start-line="11" selection-start-column="5" selection-end-line="11" selection-end-column="5" />
|
||||
<folding>
|
||||
<element signature="e#16#97#0" expanded="true" />
|
||||
<element signature="e#16#97#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -871,51 +848,87 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/memorycache.go" />
|
||||
<entry file="file://$PROJECT_DIR$/dbcache.go" />
|
||||
<entry file="file://$PROJECT_DIR$/context.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="238">
|
||||
<caret line="19" column="12" lean-forward="false" selection-start-line="19" selection-start-column="12" selection-end-line="19" selection-end-column="12" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/obj.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="867">
|
||||
<caret line="51" column="36" lean-forward="false" selection-start-line="51" selection-start-column="36" selection-end-line="51" selection-end-column="36" />
|
||||
<state relative-caret-position="952">
|
||||
<caret line="56" column="0" lean-forward="false" selection-start-line="56" selection-start-column="0" selection-end-line="56" selection-end-column="0" />
|
||||
<folding>
|
||||
<marker date="1501670160002" expanded="true" signature="165:179" ph="{...}" />
|
||||
<marker date="1502075126746" expanded="true" signature="176:190" ph="{...}" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/map.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="2244">
|
||||
<caret line="136" column="1" lean-forward="false" selection-start-line="136" selection-start-column="1" selection-end-line="136" selection-end-column="1" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/objtoobj.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="306">
|
||||
<caret line="22" column="42" lean-forward="false" selection-start-line="22" selection-start-column="42" selection-end-line="22" selection-end-column="42" />
|
||||
<folding>
|
||||
<element signature="e#16#64#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/session.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="289">
|
||||
<caret line="17" column="67" lean-forward="false" selection-start-line="17" selection-start-column="67" selection-end-line="17" selection-end-column="67" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/type.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="289">
|
||||
<caret line="17" column="20" lean-forward="false" selection-start-line="17" selection-start-column="20" selection-end-line="17" selection-end-column="20" />
|
||||
<state relative-caret-position="102">
|
||||
<caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/var.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="442">
|
||||
<caret line="26" column="26" lean-forward="false" selection-start-line="26" selection-start-column="26" selection-end-line="26" selection-end-column="26" />
|
||||
<state relative-caret-position="204">
|
||||
<caret line="12" column="28" lean-forward="false" selection-start-line="12" selection-start-column="28" selection-end-line="12" selection-end-column="28" />
|
||||
<folding>
|
||||
<marker date="1502249321786" expanded="true" signature="813:821" ph="{...}" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/func.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="2992">
|
||||
<caret line="185" column="0" lean-forward="false" selection-start-line="185" selection-start-column="0" selection-end-line="185" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/memorycache.go" />
|
||||
<entry file="file://$PROJECT_DIR$/dbcache.go" />
|
||||
<entry file="file://$PROJECT_DIR$/app.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="193">
|
||||
<caret line="79" column="43" lean-forward="true" selection-start-line="79" selection-start-column="43" selection-end-line="79" selection-end-column="43" />
|
||||
<state relative-caret-position="288">
|
||||
<caret line="42" column="40" lean-forward="false" selection-start-line="42" selection-start-column="40" selection-end-line="42" selection-end-column="40" />
|
||||
<folding>
|
||||
<element signature="e#16#138#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/context.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="153">
|
||||
<caret line="13" column="21" lean-forward="true" selection-start-line="13" selection-start-column="21" selection-end-line="13" selection-end-column="21" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
</project>
|
11
app.go
11
app.go
@ -15,7 +15,7 @@ import (
|
||||
type App struct {
|
||||
Router
|
||||
Error
|
||||
Port int //端口号
|
||||
Port string //端口号
|
||||
connectListener func(context Context) bool //所有的访问监听,true按原计划继续使用,false表示有监听器处理
|
||||
connectDbFunc func(err ...*Error) *sql.DB
|
||||
configPath string
|
||||
@ -27,9 +27,10 @@ type App struct {
|
||||
}
|
||||
|
||||
//启动实例
|
||||
func (this *App) Run(router Router, port int) {
|
||||
func (this *App) Run(router Router) {
|
||||
this.Router = router
|
||||
this.Port = port
|
||||
//this.Port = port
|
||||
this.Port=this.Config.GetString("port")
|
||||
|
||||
if this.connectDbFunc != nil {
|
||||
this.Db.SetConnect(this.connectDbFunc)
|
||||
@ -39,9 +40,9 @@ func (this *App) Run(router Router, port int) {
|
||||
this.CacheIns = CacheIns(&CacheMemory{Map: Map{}, Time: this.Config.GetInt64("cacheShortTime")})
|
||||
}
|
||||
|
||||
http.HandleFunc("/", this.handler)
|
||||
//http.HandleFunc("/", this.handler)
|
||||
run(this)
|
||||
|
||||
http.ListenAndServe(":"+ObjToStr(port), nil)
|
||||
}
|
||||
|
||||
//启动实例
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"time"
|
||||
"errors"
|
||||
)
|
||||
|
||||
type Context struct {
|
||||
@ -43,7 +44,13 @@ func (this *Context) Display(statu int, data interface{}) {
|
||||
resp := Map{"statu": statu}
|
||||
if statu != 0 {
|
||||
temp := Map{}
|
||||
temp["type"] = 0
|
||||
|
||||
tpe:=this.Config.GetMap("error").GetString(ObjToStr(statu))
|
||||
if tpe==""{
|
||||
this.LastErr.SetError(errors.New("找不到对应的错误码"))
|
||||
}
|
||||
|
||||
temp["type"] = tpe
|
||||
temp["msg"] = data
|
||||
resp["result"] = temp
|
||||
} else {
|
||||
|
20
func.go
20
func.go
@ -1,13 +1,12 @@
|
||||
package hotime
|
||||
|
||||
import (
|
||||
//"reflect"
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"math"
|
||||
"math/rand"
|
||||
"strings"
|
||||
//"fmt"
|
||||
"net/http"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
@ -184,6 +183,7 @@ func RandX(small int, max int) int {
|
||||
// GetDb()
|
||||
//}
|
||||
|
||||
|
||||
//复制返回数组
|
||||
func DeepCopyMap(value interface{}) interface{} {
|
||||
if valueMap, ok := value.(Map); ok {
|
||||
@ -300,4 +300,20 @@ func Round(f float64, n int) float64 {
|
||||
// CacheMemIns.Init(Config["cacheConfig"].(Map)["memory"].(CacheConfg).Time)
|
||||
// CacheDBIns.Init(Config["cacheConfig"].(Map)["db"].(CacheConfg).Time)
|
||||
//}
|
||||
func run(a *App) {
|
||||
if !IsRun {
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
|
||||
|
||||
port := Substr(req.Host, IndexLastStr(req.Host, ":")+1, len(req.Host))
|
||||
//fmt.Println(port)
|
||||
if application[port] != nil {
|
||||
application[port].handler(w, req)
|
||||
}
|
||||
})
|
||||
IsRun = true
|
||||
}
|
||||
|
||||
application[a.Port] = a
|
||||
http.ListenAndServe(":"+a.Port, nil)
|
||||
|
||||
}
|
||||
|
1
obj.go
1
obj.go
@ -1,5 +1,6 @@
|
||||
package hotime
|
||||
|
||||
//对象封装方便取用
|
||||
type Obj struct {
|
||||
Data interface{}
|
||||
Error
|
||||
|
@ -1,6 +1,6 @@
|
||||
package hotime
|
||||
|
||||
|
||||
//session对象
|
||||
type SessionIns struct {
|
||||
ShortCache CacheIns
|
||||
LongCache CacheIns
|
||||
@ -18,10 +18,8 @@ func (this *SessionIns)set(){
|
||||
this.LongCache.Cache(SESSION_TYPE+this.SessionId, this.Map)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
func (this *SessionIns) Session(key string, data ...interface{}) *Obj {
|
||||
|
||||
if this.Map == nil {
|
||||
@ -67,8 +65,6 @@ func (this *SessionIns)get(){
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
|
||||
func (this *SessionIns) Init(short CacheIns, long CacheIns) {
|
||||
this.ShortCache = short
|
||||
this.LongCache = long
|
||||
|
1
type.go
1
type.go
@ -4,6 +4,7 @@ package hotime
|
||||
type Ctr map[string]func(*Context)
|
||||
type Proj map[string]Ctr
|
||||
type Router map[string]Proj
|
||||
|
||||
type CacheIns interface {
|
||||
set(key string, value interface{}, time int64)
|
||||
get(key string) interface{}
|
||||
|
4
var.go
4
var.go
@ -9,6 +9,9 @@ import "sync"
|
||||
//}
|
||||
var mutex = map[interface{}]*sync.RWMutex{} //安全锁
|
||||
var mutexer = sync.RWMutex{} //读写锁
|
||||
var IsRun = false //当前状态
|
||||
var application = map[string]*App{} //整个项目
|
||||
|
||||
//var Db = HoTimeDB{} //数据库实例
|
||||
|
||||
var Config = Map{
|
||||
@ -25,4 +28,5 @@ var Config = Map{
|
||||
"cacheShortTime": 60 * 60 * 2,
|
||||
"cacheLongTime": 60 * 60 * 24 * 30,
|
||||
"sessionName": "HOTIME",
|
||||
"error": Map{},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user