refactor: migrate to new configuration system and model definitions

This commit is contained in:
Prad Nukala
2024-12-11 12:21:52 -05:00
parent 40f50bf37a
commit 0502f52ec0
54 changed files with 154 additions and 443 deletions
-275
View File
@@ -1,275 +0,0 @@
module ipfs.net.Config
API: API
Addresses: Addresses
AutoNAT: Dynamic
Bootstrap: Listing
DNS: DNS
Datastore: Datastore
Discovery: Discovery
Experimental: Experimental
Gateway: Gateway
Identity: Identity
Internal: Dynamic
Ipns: Ipns
Migration: Migration
Mounts: Mounts
Peering: Peering
Pinning: Pinning
Plugins: Plugins
Provider: Provider
Pubsub: Pubsub
Reprovider: Reprovider
Routing: Routing
Swarm: Swarm
class API {
HTTPHeaders: HTTPHeaders
}
class HTTPHeaders {
`Access-Control-Allow-Origin`: Listing
}
class Addresses {
API: String
Announce: Listing<Any>
AppendAnnounce: Listing<Any>
Gateway: String
NoAnnounce: Listing<Any>
Swarm: Listing
}
class DNS {
Resolvers: Dynamic
}
class Datastore {
BloomFilterSize: Int
GCPeriod: String
HashOnRead: Boolean
Spec: Spec
StorageGCWatermark: Int
StorageMax: String
}
class Spec {
mounts: Listing
type: String
}
class MountsItem0 {
child: Child
mountpoint: String
prefix: String
type: String
}
class Child {
path: String
shardFunc: String
sync: Boolean
type: String
}
class MountsItem1 {
child: MountsItem1Child
mountpoint: String
prefix: String
type: String
}
class MountsItem1Child {
compression: String
path: String
type: String
}
class Discovery {
MDNS: MDNS
}
class MDNS {
Enabled: Boolean
}
class Experimental {
AcceleratedDHTClient: Boolean
FilestoreEnabled: Boolean
GraphsyncEnabled: Boolean
Libp2pStreamMounting: Boolean
P2pHttpProxy: Boolean
StrategicProviding: Boolean
UrlstoreEnabled: Boolean
}
class Gateway {
APICommands: Listing<Any>
HTTPHeaders: GatewayHTTPHeaders
NoDNSLink: Boolean
NoFetch: Boolean
PathPrefixes: Listing<Any>
PublicGateways: Any
RootRedirect: String
Writable: Boolean
}
class GatewayHTTPHeaders {
`Access-Control-Allow-Headers`: Listing
`Access-Control-Allow-Methods`: Listing
`Access-Control-Allow-Origin`: Listing
}
class Identity {
PeerID: String
PrivKey: String
}
class Ipns {
RecordLifetime: String
RepublishPeriod: String
ResolveCacheSize: Int
}
class Migration {
DownloadSources: Listing<Any>
Keep: String
}
class Mounts {
FuseAllowOther: Boolean
IPFS: String
IPNS: String
}
class Peering {
Peers: Listing
}
class PeersItem11 {
Addrs: Listing
ID: String
}
class Pinning {
RemoteServices: Dynamic
}
class Plugins {
Plugins: Any
}
class Provider {
Strategy: String
}
class Pubsub {
DisableSigning: Boolean
Router: String
}
class Reprovider {
Interval: String
Strategy: String
}
class Routing {
Methods: Any
Routers: Any
Type: String
}
class Swarm {
AddrFilters: Any
ConnMgr: Dynamic
DisableBandwidthMetrics: Boolean
DisableNatPortMap: Boolean
RelayClient: Dynamic
RelayService: Dynamic
ResourceMgr: Dynamic
Transports: Transports
}
class Transports {
Multiplexers: Dynamic
Network: Dynamic
Security: Dynamic
}
-22
View File
@@ -1,22 +0,0 @@
//===----------------------------------------------------------------------===//
// Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//===----------------------------------------------------------------------===//
/// Configuration files for integrating the Matrix service
amends "../basePklProject.pkl"
package {
name = "ipfs.net"
version = "0.0.4"
}
@@ -1,7 +1,7 @@
@go.Package { name = "github.com/onsonr/sonr/internal/gateway/config" }
@go.Package { name = "github.com/onsonr/sonr/pkg/config/hway" }
open module sonr.hway.Env
open module sonr.conf.Hway
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
@@ -1,6 +1,6 @@
@go.Package { name = "github.com/onsonr/sonr/internal/vault/config" }
@go.Package { name = "github.com/onsonr/sonr/pkg/config/motr" }
module sonr.motr.DWN
module sonr.conf.Motr
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
@@ -17,6 +17,6 @@
amends "../basePklProject.pkl"
package {
name = "sonr.motr"
name = "sonr.conf"
version = "0.0.1"
}
-4
View File
@@ -1,4 +0,0 @@
{
"schemaVersion": 1,
"resolvedDependencies": {}
}
@@ -1,6 +1,6 @@
@go.Package { name = "github.com/onsonr/sonr/pkg/common/models" }
module sonr.motr.ORM
module sonr.orm.Models
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
@@ -17,6 +17,6 @@
amends "../basePklProject.pkl"
package {
name = "sonr.hway"
version = "0.0.3"
name = "sonr.orm"
version = "0.0.1"
}
@@ -1,6 +1,6 @@
@go.Package { name = "github.com/onsonr/sonr/crypto/ucan/attns" }
module sonr.motr.ATN
module sonr.orm.UCAN
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"