github.com/weaviate/weaviate@v1.24.6/usecases/modulecomponents/arguments/nearImage/graphql_provider.go (about) 1 // _ _ 2 // __ _____ __ ___ ___ __ _| |_ ___ 3 // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ 4 // \ V V / __/ (_| |\ V /| | (_| | || __/ 5 // \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| 6 // 7 // Copyright © 2016 - 2024 Weaviate B.V. All rights reserved. 8 // 9 // CONTACT: hello@weaviate.io 10 // 11 12 package nearImage 13 14 import ( 15 "github.com/weaviate/weaviate/entities/modulecapabilities" 16 ) 17 18 const NAME = "nearImage" 19 20 type GraphQLArgumentsProvider struct{} 21 22 func New() *GraphQLArgumentsProvider { 23 return &GraphQLArgumentsProvider{} 24 } 25 26 func (g *GraphQLArgumentsProvider) Arguments() map[string]modulecapabilities.GraphQLArgument { 27 arguments := map[string]modulecapabilities.GraphQLArgument{} 28 arguments[NAME] = g.getNearImage() 29 return arguments 30 } 31 32 func (g *GraphQLArgumentsProvider) getNearImage() modulecapabilities.GraphQLArgument { 33 return modulecapabilities.GraphQLArgument{ 34 GetArgumentsFunction: getNearImageArgumentFn, 35 AggregateArgumentsFunction: aggregateNearImageArgumentFn, 36 ExploreArgumentsFunction: exploreNearImageArgumentFn, 37 ExtractFunction: extractNearImageFn, 38 ValidateFunction: ValidateNearImageFn, 39 } 40 }