Skip to content

Commit

Permalink
add missing zos types
Browse files Browse the repository at this point in the history
Signed-off-by: mariobassem <[email protected]>
  • Loading branch information
MarioBassem committed Aug 23, 2023
1 parent 3dc1fc7 commit aa5d780
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 0 deletions.
20 changes: 20 additions & 0 deletions 3bot/zos/gw_fqdn.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module zos

struct GatewayFQDNProxy {
tls_passthrough bool
backends []string
network ?string
fqdn string
}

pub fn (g GatewayFQDNProxy) challenge() string {
mut output := ''
output += g.fqdn
output += '${g.tls_passthrough}'
for b in g.backends {
output += b
}
output += g.network or { '' }

return output
}
20 changes: 20 additions & 0 deletions 3bot/zos/gw_name.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module zos

struct GatewayNameProxy {
tls_passthrough bool
backends []string
network ?string
name string
}

pub fn (g GatewayNameProxy) challenge() string {
mut output := ''
output += g.name
output += '${g.tls_passthrough}'
for b in g.backends {
output += b
}
output += g.network or { '' }

return output
}
7 changes: 7 additions & 0 deletions 3bot/zos/ipv4.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module zos

pub struct PublicIP4 {}

pub fn (p PublicIP4) challenge() string {
return ''
}
48 changes: 48 additions & 0 deletions 3bot/zos/qsfs.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
module zos

pub struct QuantumSafeFS {
cache u64
config QuantumSafeFSConfig
}

pub struct QuantumSafeFSConfig {
minimal_shards u32
expected_shards u32
redundant_groups u32
redundant_nodes u32
max_zdb_data_dir_size u32
encryption Encryption
meta QuantumSafeMeta
goups []ZDBGroup
compression QuantumCompression
}

pub struct Encryption {
algorithm string
key []u8 // TODO: how to create challenge
}

pub struct QuantumSafeMeta {
type_ string [json: 'type']
config QuantumSafeConfig
}

pub struct ZDBGroup {
backends []ZDBBackend
}

pub struct ZDBBackend {
address string
namespace string
password string
}

pub struct QuantumCompression {
algorithm string
}

pub struct QuantumSafeConfig {
prefix string
encryption Encryption
backends []ZDBBackend
}
14 changes: 14 additions & 0 deletions 3bot/zos/zlogs.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module zos

pub struct ZLogs {
zmachine string
output string
}

pub fn (z ZLogs) challenge() string {
mut output := ''
output += z.zmachine
output += z.output

return output
}

0 comments on commit aa5d780

Please sign in to comment.