search

package
v1.0.0-b1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ResourceAreaId, _ = uuid.Parse("ea48a0a1-269c-42d8-b8ad-ddc8fcdcf578")

Functions

This section is empty.

Types

type Client

type Client interface {
	// [Preview API] Provides a set of results for the search text.
	FetchCodeSearchResults(context.Context, FetchCodeSearchResultsArgs) (*CodeSearchResponse, error)
	// [Preview API] Provides a set of results for the search text.
	FetchPackageSearchResults(context.Context, FetchPackageSearchResultsArgs) (*searchshared.PackageSearchResponse, error)
	// [Preview API] Provides a set of results for the search text.
	FetchScrollCodeSearchResults(context.Context, FetchScrollCodeSearchResultsArgs) (*CodeSearchResponse, error)
	// [Preview API] Provides a set of results for the search request.
	FetchWikiSearchResults(context.Context, FetchWikiSearchResultsArgs) (*searchshared.WikiSearchResponse, error)
	// [Preview API] Provides a set of results for the search text.
	FetchWorkItemSearchResults(context.Context, FetchWorkItemSearchResultsArgs) (*WorkItemSearchResponse, error)
}

func NewClient

func NewClient(ctx context.Context, connection *azuredevops.Connection) (Client, error)

type ClientImpl

type ClientImpl struct {
	Client azuredevops.Client
}

func (*ClientImpl) FetchCodeSearchResults

func (client *ClientImpl) FetchCodeSearchResults(ctx context.Context, args FetchCodeSearchResultsArgs) (*CodeSearchResponse, error)

[Preview API] Provides a set of results for the search text.

func (*ClientImpl) FetchPackageSearchResults

func (client *ClientImpl) FetchPackageSearchResults(ctx context.Context, args FetchPackageSearchResultsArgs) (*searchshared.PackageSearchResponse, error)

[Preview API] Provides a set of results for the search text.

func (*ClientImpl) FetchScrollCodeSearchResults

func (client *ClientImpl) FetchScrollCodeSearchResults(ctx context.Context, args FetchScrollCodeSearchResultsArgs) (*CodeSearchResponse, error)

[Preview API] Provides a set of results for the search text.

func (*ClientImpl) FetchWikiSearchResults

func (client *ClientImpl) FetchWikiSearchResults(ctx context.Context, args FetchWikiSearchResultsArgs) (*searchshared.WikiSearchResponse, error)

[Preview API] Provides a set of results for the search request.

func (*ClientImpl) FetchWorkItemSearchResults

func (client *ClientImpl) FetchWorkItemSearchResults(ctx context.Context, args FetchWorkItemSearchResultsArgs) (*WorkItemSearchResponse, error)

[Preview API] Provides a set of results for the search text.

type CodeResult

type CodeResult struct {
	// Collection of the result file.
	Collection *searchshared.Collection `json:"collection,omitempty"`
	// ContentId of the result file.
	ContentId *string `json:"contentId,omitempty"`
	// Name of the result file.
	FileName *string `json:"fileName,omitempty"`
	// Dictionary of field to hit offsets in the result file. Key identifies the area in which hits were found, for ex: file content/file name etc.
	Matches *map[string][]searchshared.Hit `json:"matches,omitempty"`
	// Path at which result file is present.
	Path *string `json:"path,omitempty"`
	// Project of the result file.
	Project *Project `json:"project,omitempty"`
	// Repository of the result file.
	Repository *searchshared.Repository `json:"repository,omitempty"`
	// Versions of the result file.
	Versions *[]searchshared.Version `json:"versions,omitempty"`
}

Defines the code result containing information of the searched files and its metadata.

type CodeSearchRequest

type CodeSearchRequest struct {
}

Defines a code search request.

type CodeSearchResponse

type CodeSearchResponse struct {
	// Total number of matched files.
	Count *int `json:"count,omitempty"`
	// List of matched files.
	Results *[]CodeResult `json:"results,omitempty"`
}

Defines a code search response item.

type FetchCodeSearchResultsArgs

type FetchCodeSearchResultsArgs struct {
	// (required) The Code Search Request.
	Request *CodeSearchRequest
	// (optional) Project ID or project name
	Project *string
}

Arguments for the FetchCodeSearchResults function

type FetchPackageSearchResultsArgs

type FetchPackageSearchResultsArgs struct {
	// (required) The Package Search Request.
	Request *searchshared.PackageSearchRequest
}

Arguments for the FetchPackageSearchResults function

type FetchScrollCodeSearchResultsArgs

type FetchScrollCodeSearchResultsArgs struct {
	// (required) The Code Search Request.
	Request *searchshared.ScrollSearchRequest
	// (optional) Project ID or project name
	Project *string
}

Arguments for the FetchScrollCodeSearchResults function

type FetchWikiSearchResultsArgs

type FetchWikiSearchResultsArgs struct {
	// (required) The Wiki Search Request.
	Request *searchshared.WikiSearchRequest
	// (optional) Project ID or project name
	Project *string
}

Arguments for the FetchWikiSearchResults function

type FetchWorkItemSearchResultsArgs

type FetchWorkItemSearchResultsArgs struct {
	// (required) The Work Item Search Request.
	Request *WorkItemSearchRequest
	// (optional) Project ID or project name
	Project *string
}

Arguments for the FetchWorkItemSearchResults function

type Project

type Project struct {
	// Id of the project.
	Id *uuid.UUID `json:"id,omitempty"`
	// Name of the project.
	Name *string `json:"name,omitempty"`
}

Defines the details of the project.

type WorkItemHit

type WorkItemHit struct {
	// Reference name of the highlighted field.
	FieldReferenceName *string `json:"fieldReferenceName,omitempty"`
	// Matched/highlighted snippets of the field.
	Highlights *[]string `json:"highlights,omitempty"`
}

Defines the matched terms in the field of the work item result.

type WorkItemResult

type WorkItemResult struct {
	// A standard set of work item fields and their values.
	Fields *map[string]string `json:"fields,omitempty"`
	// Highlighted snippets of fields that match the search request. The list is sorted by relevance of the snippets.
	Hits *[]WorkItemHit `json:"hits,omitempty"`
	// Project details of the work item.
	Project *Project `json:"project,omitempty"`
	// Reference to the work item.
	Url *string `json:"url,omitempty"`
}

Defines the work item result that matched a work item search request.

type WorkItemSearchRequest

type WorkItemSearchRequest struct {
}

Defines a work item search request.

type WorkItemSearchResponse

type WorkItemSearchResponse struct {
	// Total number of matched work items.
	Count *int `json:"count,omitempty"`
	// List of top matched work items.
	Results *[]WorkItemResult `json:"results,omitempty"`
}

Defines a response item that is returned for a work item search request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL