Add editable proxy controls to UI
This commit is contained in:
@ -69,6 +69,14 @@ func (db *Database) Add(item Noodle) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (db *Database) Update(item Noodle) error {
|
||||
if err := db.Handle.Add(item.Id, item); err != nil {
|
||||
log.Print(err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (db *Database) Delete(id string) error {
|
||||
if err := db.Handle.Delete(id); err != nil {
|
||||
log.Print(err)
|
||||
|
||||
@ -1,12 +1,15 @@
|
||||
package noodle
|
||||
|
||||
import "time"
|
||||
|
||||
type Noodle struct {
|
||||
Id string
|
||||
Name string
|
||||
Proto string
|
||||
Src string
|
||||
ListenPort int
|
||||
DestPort int
|
||||
DestHost string
|
||||
Expiration int
|
||||
Expiration time.Duration
|
||||
IsUp bool
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user