refactor: fixed types
This commit is contained in:
parent
6a24c8d390
commit
eb17729825
1 changed files with 5 additions and 5 deletions
10
src/main.zig
10
src/main.zig
|
@ -1,15 +1,15 @@
|
|||
const std = @import("std");
|
||||
|
||||
const OauthFlows = struct { implict: struct { authrizationUrl: []const u8, scopes: std.StringHashMap([]const u8) } };
|
||||
const OauthFlows = struct { implict: struct { authrizationUrl: []const u8, scopes: std.json.ArrayHashMap([]const u8) } };
|
||||
|
||||
const WellKnownSettings = struct {
|
||||
contentType: []const u8 = "application/json",
|
||||
headers: ?[]const ([]const u8),
|
||||
aliases: ?[]const struct { aliases: union { string: []const u8, array: []const []const u8 }, type: enum { path, method, bin, uri }, description: ?[]const u16, content: ?[]const u8 },
|
||||
auth: ?struct { scheme: enum { basic, bearer, oauth2 }, tokenName: ?[]const u8, flows: ?OauthFlows },
|
||||
headers: ?[]const ([]const u8) = null,
|
||||
aliases: ?[]const struct { aliases: union { string: []const u8, array: []const []const u8 }, type: enum { path, method, bin, uri }, description: ?[]const u8 = null, content: []const u8 } = null,
|
||||
auth: ?struct { scheme: enum { basic, bearer, oauth2 }, tokenName: ?[]const u8 = null, flows: ?OauthFlows = null } = null,
|
||||
};
|
||||
|
||||
const WellKnownSchema = struct { api: ?[]const u8, registry: bool = false, manifests: ?std.StringHashMap(struct { path: []const u8 }), bin: ?[]const std.StringHashMap([]const u8), settings: WellKnownSettings };
|
||||
const WellKnownSchema = struct { api: ?[]const u8 = null, registry: bool = false, manifests: ?std.json.ArrayHashMap(struct { path: []const u8 }) = null, bin: ?[]const std.json.ArrayHashMap([]const u8) = null, settings: WellKnownSettings };
|
||||
|
||||
const UserSettings = struct { db_path: []const u8 = "$HOME/.cache/wacrd.db", install_dir: []const u8 = "$HOME/.local/bin", uri_schemes: ?std.json.ArrayHashMap([]const u8) = null };
|
||||
|
||||
|
|
Loading…
Reference in a new issue