Giterated Stack `ObjectValue` and `Setting` refactor.
This refactor adds value and setting update events, as well as value getters. Additionally, the stack is now the owner of the ability to write settings into storage. This is accomplished with the `MetadataProvider` trait. This sets up the ground work for push federation, cache, and basically everything else. commit 7befc583cb3e0c6719506c550ed66ac76293413c Author: Amber <[email protected]> Date: Fri Sep 29 15:46:48 2023 -0500 Finish value and settings refactor in the stack. commit 3ac09994a0caafd1a0b95d9a781c7f202f20e75b Author: Amber <[email protected]> Date: Fri Sep 29 09:46:32 2023 -0500 Add set_setting handling back in commit 84fd31e3eae85d98fa68a28b333dbb32cde3bdb8 Author: Amber <[email protected]> Date: Wed Sep 27 06:36:31 2023 -0500 Remove some allocations from meta types commit 16c310ce3680c4a14ed35083b6a230aaecd43152 Author: Amber <[email protected]> Date: Wed Sep 27 05:35:03 2023 -0500 Add cargo metadata commit eb2520a20001bac7b21c6c3d34f62db32f0ada80 Author: Amber <[email protected]> Date: Wed Sep 27 05:26:27 2023 -0500 Refactor setting and value management to use the unified stack. Allows for tight management, inspection, and eventing of setting and value management. commit 901fe103da0fce4b40f33b0a8b64404049ae03cf Author: Amber <[email protected]> Date: Wed Sep 27 02:38:33 2023 -0500 Set up ground work for value / settings refactor
parent: tbd commit: c377e4d
1 | use ; |
2 | use |
3 | , |
4 | , | AnySetting
5 | , | User
6 | , | AnyValue
7 | ; |
8 | use ; |
9 | |
10 | |
11 | _object: User, |
12 | _value_name: String, |
13 | _value: , |
14 | _operation_state: &StackOperationState, |
15 | |
16 | todo! |
17 | |
18 | |
19 | |
20 | _object: User, |
21 | _value_name: String, |
22 | _value: AnySetting, |
23 | _operation_state: &StackOperationState, |
24 | |
25 | todo! |
26 | |
27 | |
28 | |
29 | _object: Repository, |
30 | _value_name: String, |
31 | _value: , |
32 | _operation_state: &StackOperationState, |
33 | |
34 | todo! |
35 | |
36 | |
37 | |
38 | _object: Repository, |
39 | _value_name: String, |
40 | _value: AnySetting, |
41 | _operation_state: &StackOperationState, |
42 | |
43 | todo! |
44 | |
45 | |
46 | |
47 | _object: Repository, |
48 | _description: Description, |
49 | _user: AuthorizedUser, |
50 | |
51 | async boxed | .
52 | |
53 | |
54 | // pub fn repository_set_default_branch( |
55 | // object: Repository, |
56 | // default_branch: DefaultBranch, |
57 | // // Ensure user is authorized for this request |
58 | // _user: AuthorizedUser, |
59 | // backend: DatabaseBackend, |
60 | // stack: Arc<GiteratedStack>, |
61 | // ) -> BoxFuture<'static, Result<(), ()>> { |
62 | // async move { |
63 | // stack.write_setting(&object, &default_branch).await.unwrap(); |
64 | |
65 | // let _set_value = ValueUpdate { |
66 | // object: object.to_string(), |
67 | // value_name: DefaultBranch::value_name().to_owned(), |
68 | // value: unsafe { AnyValue::from_raw(serde_json::to_value(default_branch).unwrap()) }, |
69 | // }; |
70 | |
71 | // // Submit value update back to the daemon |
72 | // // state.value_update(set_value); |
73 | // Ok(()) |
74 | // } |
75 | // .boxed() |
76 | // } |
77 |