MCPcopy
hub / github.com/Place1/wg-access-server / DeleteDevice

Method DeleteDevice

internal/devices/devices.go:132–143  ·  view source on GitHub ↗
(user string, name string)

Source from the content-addressed store, hash-verified

130}
131
132func (d *DeviceManager) DeleteDevice(user string, name string) error {
133 device, err := d.storage.Get(user, name)
134 if err != nil {
135 return errors.Wrap(err, "failed to retrieve device")
136 }
137
138 if err := d.storage.Delete(device); err != nil {
139 return err
140 }
141
142 return nil
143}
144
145func (d *DeviceManager) GetByPublicKey(publicKey string) (*storage.Device, error) {
146 return d.storage.GetByPublicKey(publicKey)

Callers

nothing calls this directly

Calls 2

GetMethod · 0.65
DeleteMethod · 0.65

Tested by

no test coverage detected