Skip to content

Commit

Permalink
fix: fix updating file with smaller size
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Oct 11, 2024
1 parent 9c8aae5 commit 350266c
Show file tree
Hide file tree
Showing 25 changed files with 305 additions and 70 deletions.
56 changes: 28 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ strip = true
opt-level = 's'

[workspace.package]
version = "0.9.0"
version = "0.9.3"
edition = "2021"
repository = "https://github.com/ldclabs/ic-oss"
keywords = ["file", "storage", "oss", "s3", "icp"]
Expand Down
8 changes: 8 additions & 0 deletions src/declarations/ic_oss_bucket/ic_oss_bucket.did
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ type UpgradeArgs = record {
max_folder_depth : opt nat8;
};
service : (opt CanisterArgs) -> {
admin_add_auditors : (vec principal) -> (Result);
admin_add_managers : (vec principal) -> (Result);
admin_remove_auditors : (vec principal) -> (Result);
admin_remove_managers : (vec principal) -> (Result);
admin_set_auditors : (vec principal) -> (Result);
admin_set_managers : (vec principal) -> (Result);
admin_update_bucket : (UpdateBucketInput) -> (Result);
Expand Down Expand Up @@ -180,6 +184,10 @@ service : (opt CanisterArgs) -> {
validate2_admin_set_auditors : (vec principal) -> (Result_14);
validate2_admin_set_managers : (vec principal) -> (Result_14);
validate2_admin_update_bucket : (UpdateBucketInput) -> (Result_14);
validate_admin_add_auditors : (vec principal) -> (Result_14);
validate_admin_add_managers : (vec principal) -> (Result_14);
validate_admin_remove_auditors : (vec principal) -> (Result_14);
validate_admin_remove_managers : (vec principal) -> (Result_14);
validate_admin_set_auditors : (vec principal) -> (Result);
validate_admin_set_managers : (vec principal) -> (Result);
validate_admin_update_bucket : (UpdateBucketInput) -> (Result);
Expand Down
8 changes: 8 additions & 0 deletions src/declarations/ic_oss_bucket/ic_oss_bucket.did.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ export interface UpgradeArgs {
'max_folder_depth' : [] | [number],
}
export interface _SERVICE {
'admin_add_auditors' : ActorMethod<[Array<Principal>], Result>,
'admin_add_managers' : ActorMethod<[Array<Principal>], Result>,
'admin_remove_auditors' : ActorMethod<[Array<Principal>], Result>,
'admin_remove_managers' : ActorMethod<[Array<Principal>], Result>,
'admin_set_auditors' : ActorMethod<[Array<Principal>], Result>,
'admin_set_managers' : ActorMethod<[Array<Principal>], Result>,
'admin_update_bucket' : ActorMethod<[UpdateBucketInput], Result>,
Expand Down Expand Up @@ -260,6 +264,10 @@ export interface _SERVICE {
'validate2_admin_set_auditors' : ActorMethod<[Array<Principal>], Result_14>,
'validate2_admin_set_managers' : ActorMethod<[Array<Principal>], Result_14>,
'validate2_admin_update_bucket' : ActorMethod<[UpdateBucketInput], Result_14>,
'validate_admin_add_auditors' : ActorMethod<[Array<Principal>], Result_14>,
'validate_admin_add_managers' : ActorMethod<[Array<Principal>], Result_14>,
'validate_admin_remove_auditors' : ActorMethod<[Array<Principal>], Result_14>,
'validate_admin_remove_managers' : ActorMethod<[Array<Principal>], Result_14>,
'validate_admin_set_auditors' : ActorMethod<[Array<Principal>], Result>,
'validate_admin_set_managers' : ActorMethod<[Array<Principal>], Result>,
'validate_admin_update_bucket' : ActorMethod<[UpdateBucketInput], Result>,
Expand Down
24 changes: 24 additions & 0 deletions src/declarations/ic_oss_bucket/ic_oss_bucket.did.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ export const idlFactory = ({ IDL }) => {
});
const Result_14 = IDL.Variant({ 'Ok' : IDL.Text, 'Err' : IDL.Text });
return IDL.Service({
'admin_add_auditors' : IDL.Func([IDL.Vec(IDL.Principal)], [Result], []),
'admin_add_managers' : IDL.Func([IDL.Vec(IDL.Principal)], [Result], []),
'admin_remove_auditors' : IDL.Func([IDL.Vec(IDL.Principal)], [Result], []),
'admin_remove_managers' : IDL.Func([IDL.Vec(IDL.Principal)], [Result], []),
'admin_set_auditors' : IDL.Func([IDL.Vec(IDL.Principal)], [Result], []),
'admin_set_managers' : IDL.Func([IDL.Vec(IDL.Principal)], [Result], []),
'admin_update_bucket' : IDL.Func([UpdateBucketInput], [Result], []),
Expand Down Expand Up @@ -322,6 +326,26 @@ export const idlFactory = ({ IDL }) => {
[Result_14],
[],
),
'validate_admin_add_auditors' : IDL.Func(
[IDL.Vec(IDL.Principal)],
[Result_14],
[],
),
'validate_admin_add_managers' : IDL.Func(
[IDL.Vec(IDL.Principal)],
[Result_14],
[],
),
'validate_admin_remove_auditors' : IDL.Func(
[IDL.Vec(IDL.Principal)],
[Result_14],
[],
),
'validate_admin_remove_managers' : IDL.Func(
[IDL.Vec(IDL.Principal)],
[Result_14],
[],
),
'validate_admin_set_auditors' : IDL.Func(
[IDL.Vec(IDL.Principal)],
[Result],
Expand Down
5 changes: 5 additions & 0 deletions src/declarations/ic_oss_cluster/ic_oss_cluster.did
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type ClusterInfo = record {
token_expiration : nat64;
weak_ed25519_token_public_key : text;
bucket_latest_version : blob;
schnorr_key_name : text;
bucket_deployment_logs : nat64;
subject_authz_total : nat64;
};
Expand Down Expand Up @@ -61,12 +62,14 @@ type WasmInfo = record {
};
service : (opt ChainArgs) -> {
access_token : (principal) -> (Result);
admin_add_managers : (vec principal) -> (Result_1);
admin_add_wasm : (AddWasmInput, opt blob) -> (Result_1);
admin_attach_policies : (Token) -> (Result_1);
admin_batch_call_buckets : (vec principal, text, opt blob) -> (Result_2);
admin_deploy_bucket : (DeployWasmInput, opt blob) -> (Result_1);
admin_detach_policies : (Token) -> (Result_1);
admin_ed25519_access_token : (Token) -> (Result);
admin_remove_managers : (vec principal) -> (Result_1);
admin_set_managers : (vec principal) -> (Result_1);
admin_sign_access_token : (Token) -> (Result);
admin_topup_all_buckets : () -> (Result_3);
Expand All @@ -87,11 +90,13 @@ service : (opt ChainArgs) -> {
validate2_admin_deploy_bucket : (DeployWasmInput, opt blob) -> (Result_9);
validate2_admin_set_managers : (vec principal) -> (Result_9);
validate2_admin_upgrade_all_buckets : (opt blob) -> (Result_9);
validate_admin_add_managers : (vec principal) -> (Result_9);
validate_admin_add_wasm : (AddWasmInput, opt blob) -> (Result_1);
validate_admin_batch_call_buckets : (vec principal, text, opt blob) -> (
Result_2,
);
validate_admin_deploy_bucket : (DeployWasmInput, opt blob) -> (Result_1);
validate_admin_remove_managers : (vec principal) -> (Result_9);
validate_admin_set_managers : (vec principal) -> (Result_1);
validate_admin_upgrade_all_buckets : (opt blob) -> (Result_1);
}
5 changes: 5 additions & 0 deletions src/declarations/ic_oss_cluster/ic_oss_cluster.did.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export interface ClusterInfo {
'token_expiration' : bigint,
'weak_ed25519_token_public_key' : string,
'bucket_latest_version' : Uint8Array | number[],
'schnorr_key_name' : string,
'bucket_deployment_logs' : bigint,
'subject_authz_total' : bigint,
}
Expand Down Expand Up @@ -82,6 +83,7 @@ export interface WasmInfo {
}
export interface _SERVICE {
'access_token' : ActorMethod<[Principal], Result>,
'admin_add_managers' : ActorMethod<[Array<Principal>], Result_1>,
'admin_add_wasm' : ActorMethod<
[AddWasmInput, [] | [Uint8Array | number[]]],
Result_1
Expand All @@ -97,6 +99,7 @@ export interface _SERVICE {
>,
'admin_detach_policies' : ActorMethod<[Token], Result_1>,
'admin_ed25519_access_token' : ActorMethod<[Token], Result>,
'admin_remove_managers' : ActorMethod<[Array<Principal>], Result_1>,
'admin_set_managers' : ActorMethod<[Array<Principal>], Result_1>,
'admin_sign_access_token' : ActorMethod<[Token], Result>,
'admin_topup_all_buckets' : ActorMethod<[], Result_3>,
Expand Down Expand Up @@ -133,6 +136,7 @@ export interface _SERVICE {
[[] | [Uint8Array | number[]]],
Result_9
>,
'validate_admin_add_managers' : ActorMethod<[Array<Principal>], Result_9>,
'validate_admin_add_wasm' : ActorMethod<
[AddWasmInput, [] | [Uint8Array | number[]]],
Result_1
Expand All @@ -145,6 +149,7 @@ export interface _SERVICE {
[DeployWasmInput, [] | [Uint8Array | number[]]],
Result_1
>,
'validate_admin_remove_managers' : ActorMethod<[Array<Principal>], Result_9>,
'validate_admin_set_managers' : ActorMethod<[Array<Principal>], Result_1>,
'validate_admin_upgrade_all_buckets' : ActorMethod<
[[] | [Uint8Array | number[]]],
Expand Down
Loading

0 comments on commit 350266c

Please sign in to comment.