···53535454 // Sid sid of the seed set by the server
5555 Sid *string `json:"sid,omitempty"`
5656+5757+ // Tags Tags associated with the seed
5858+ Tags *[]SeedTag `json:"tags,omitempty"`
5659}
57605861// SeedSeedType Type of the seed
5962type SeedSeedType string
6363+6464+// SeedTag A tag associated with a seed
6565+type SeedTag struct {
6666+ // Key Tag key
6767+ Key string `json:"key"`
6868+6969+ // Value Tag value
7070+ Value string `json:"value"`
7171+}
60726173// ListSeedsParams defines parameters for ListSeeds.
6274type ListSeedsParams struct {
-48
client-go/end_to_end_test.go
···11-package client_test
22-33-import (
44- "context"
55- "fmt"
66- "net/http"
77- "testing"
88-99- "codeberg.org/adamcstephens/sower/client-go"
1010-)
1111-1212-// custom HTTP client
1313-var hc = http.Client{}
1414-1515-func TestClient_RawRequest(t *testing.T) {
1616-1717- // with a raw http.Response
1818- c, err := client.NewClient("http://localhost:7150", client.WithHTTPClient(&hc))
1919- if err != nil {
2020- t.Fatal(err)
2121- }
2222-2323- resp, err := c.ListSeeds(context.TODO(), &client.ListSeedsParams{})
2424- if err != nil {
2525- t.Fatal(err)
2626- }
2727- if resp.StatusCode != http.StatusOK {
2828- t.Fatalf("Expected HTTP 200 but received %d", resp.StatusCode)
2929- }
3030-}
3131-3232-func TestClient_SeedList(t *testing.T) {
3333- // or to get a struct with the parsed response body
3434- c, err := client.NewClientWithResponses("http://localhost:7150", client.WithHTTPClient(&hc))
3535- if err != nil {
3636- t.Fatal(err)
3737- }
3838-3939- resp, err := c.ListSeedsWithResponse(context.TODO(), &client.ListSeedsParams{})
4040- if err != nil {
4141- t.Fatal(err)
4242- }
4343- if resp.StatusCode() != http.StatusOK {
4444- t.Fatalf("Expected HTTP 200 but received %d", resp.StatusCode())
4545- }
4646-4747- fmt.Printf("resp.JSON200: %v\n", resp.JSON200)
4848-}