diff options
| author | Jeff Carr <[email protected]> | 2024-10-21 17:53:36 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-10-21 17:53:36 -0500 |
| commit | bda590a39b0a873b239b41d62cabe36c75f6a87f (patch) | |
| tree | 517f5583053fcbb303bec0bde28d93c11fb97aa4 /sampleData.go | |
| parent | be5548cd4e24addacd8a7cfa8c61c2fad5ccbd65 (diff) | |
make clean works. configfile builds and runs
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'sampleData.go')
| -rw-r--r-- | sampleData.go | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/sampleData.go b/sampleData.go new file mode 100644 index 0000000..6c48985 --- /dev/null +++ b/sampleData.go @@ -0,0 +1,35 @@ +package virtbuf + +import "log" + +// +// This generates some sample data. It *should* match the .proto file +// + +func CreateSampleDroplet() *Droplet { + // TODO: flush this out to do all the fields + log.Println("CreateSampleDroplet() is generating a new droplet") + + e := &Droplet{ + Uuid: "6a1c571b-1d02-462b-9288-63d205306d76", + Hostname: "bmath.wit.com", + Comment: "this is a droplet for testing", + } + return e +} + +func CreateSampleDroplets(total int) []Droplet { + + var all []Droplet + + for i := 0; i < total; i++ { + d := CreateSampleDroplet() + + // e.Id += 1000 + int32(i) + d.Comment = "Sample Event " + string(i) + + all = append(all, *d) + } + + return all +} |
