diff --git a/pkg/mining/mining_profile.go b/pkg/mining/mining_profile.go index 731d829..f9226f7 100644 --- a/pkg/mining/mining_profile.go +++ b/pkg/mining/mining_profile.go @@ -1,13 +1,12 @@ package mining -// RawConfig is a raw encoded JSON value. -// It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding. -// We define it as []byte (like json.RawMessage) to avoid swagger parsing issues with the json package. +// var raw RawConfig +// _ = json.Unmarshal([]byte(`{"pool":"pool.lthn.io:3333"}`), &raw) type RawConfig []byte -// MiningProfile represents a saved configuration for running a specific miner. -// It decouples the UI from the underlying miner's specific config structure. +// profile := MiningProfile{ID: "abc", Name: "LTHN RandomX", MinerType: "xmrig", Config: raw} +// manager.SaveProfile(profile) type MiningProfile struct { ID string `json:"id"` Name string `json:"name"`