github.com/metacurrency/holochain@v0.1.0-alpha-26.0.20200915073418-5c83169c9b5b/action_query.go (about) 1 package holochain 2 3 import ( 4 "reflect" 5 ) 6 7 //------------------------------------------------------------ 8 // Query 9 10 type APIFnQuery struct { 11 options *QueryOptions 12 } 13 14 func (a *APIFnQuery) Name() string { 15 return "query" 16 } 17 18 func (a *APIFnQuery) Args() []Arg { 19 return []Arg{{Name: "options", Type: MapArg, MapType: reflect.TypeOf(QueryOptions{}), Optional: true}} 20 } 21 22 func (a *APIFnQuery) Call(h *Holochain) (response interface{}, err error) { 23 response, err = h.Query(a.options) 24 return 25 }