lexicon devex tutorial
at main 1.5 kB view raw
1// Code generated by indigo lexgen tool. DO NOT EDIT MANUALLY. 2 3// Lexicon schema: place.atwork.searchListings 4 5package placeatwork 6 7import ( 8 "context" 9 10 lexutil "github.com/bluesky-social/indigo/lex/util" 11) 12 13// SearchListings_Output is the output of a place.atwork.searchListings call. 14type SearchListings_Output struct { 15 Listings []SearchListings_ListingRecord `json:"listings" cborgen:"listings"` 16} 17 18// SearchListings calls the XRPC method "place.atwork.searchListings". 19// 20// # Search job listings using full-text query 21// 22// query: Search query string for full-text search 23func SearchListings(ctx context.Context, c lexutil.LexClient, query string) (*SearchListings_Output, error) { 24 var out SearchListings_Output 25 26 params := map[string]interface{}{} 27 params["query"] = query 28 29 if err := c.LexDo(ctx, lexutil.Query, "", "place.atwork.searchListings", params, nil, &out); err != nil { 30 return nil, err 31 } 32 return &out, nil 33} 34 35// SearchListings_ListingRecord is a "listingRecord" in the place.atwork.searchListings schema. 36// 37// A job listing record with metadata for strong references 38type SearchListings_ListingRecord struct { 39 LexiconTypeID string `json:"$type,omitempty" cborgen:"$type,const=place.atwork.searchListings#listingRecord,omitempty"` 40 // cid: CID of the listing record 41 Cid string `json:"cid" cborgen:"cid"` 42 // uri: AT-URI of the listing (at://did/place.atwork.listing/rkey) 43 Uri string `json:"uri" cborgen:"uri"` 44 // value: The full job listing record 45 Value *Listing `json:"value,omitempty" cborgen:"value,omitempty"` 46}