search

package
v7.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 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 BoardResult

type BoardResult struct {
	// Board Type of the board document.
	Boardtype *string `json:"boardtype,omitempty"`
	// Collection details of the baord document.
	Collection *searchshared.Collection `json:"collection,omitempty"`
	// Project details of the board document.
	Project *Project `json:"project,omitempty"`
	// Team details of the board document.
	Team *Team `json:"team,omitempty"`
}

Defines the Board result that matched a Board search request.

type BoardSearchRequest

type BoardSearchRequest struct {
	// Filters to be applied. Set it to null if there are no filters to be applied.
	Filters *map[string][]string `json:"filters,omitempty"`
	// The search text.
	SearchText *string `json:"searchText,omitempty"`
	// Options for sorting search results. If set to null, the results will be returned sorted by relevance. If more than one sort option is provided, the results are sorted in the order specified in the OrderBy.
	OrderBy *[]searchshared.SortOption `json:"$orderBy,omitempty"`
	// Number of results to be skipped.
	Skip *int `json:"$skip,omitempty"`
	// Number of results to be returned.
	Top *int `json:"$top,omitempty"`
	// Flag to opt for faceting in the result. Default behavior is false.
	IncludeFacets *bool `json:"includeFacets,omitempty"`
}

Defines a Board search request.

type BoardSearchResponse

type BoardSearchResponse struct {
	// A dictionary storing an array of <code>Filter</code> object against each facet.
	Facets *map[string][]searchshared.Filter `json:"facets,omitempty"`
	// Numeric code indicating any additional information: 0 - Ok, 1 - Account is being reindexed, 2 - Account indexing has not started, 3 - Invalid Request, 4 - Prefix wildcard query not supported, 5 - MultiWords with code facet not supported, 6 - Account is being onboarded, 7 - Account is being onboarded or reindexed, 8 - Top value trimmed to maxresult allowed 9 - Branches are being indexed, 10 - Faceting not enabled, 11 - Work items not accessible, 19 - Phrase queries with code type filters not supported, 20 - Wildcard queries with code type filters not supported. Any other info code is used for internal purpose.
	InfoCode *int `json:"infoCode,omitempty"`
	// Total number of matched Board documents.
	Count *int `json:"count,omitempty"`
	// List of top matched Board documents.
	Results *[]BoardResult `json:"results,omitempty"`
}

Defines a Board search response item.

type BranchInfo

type BranchInfo struct {
	// Name of the indexed branch
	Name *string `json:"name,omitempty"`
}

Information about the configured branch.

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)
	// [Preview API] Provides status of Repository.
	GetRepositoryStatus(context.Context, GetRepositoryStatusArgs) (*RepositoryStatusResponse, error)
	// [Preview API] Provides status of TFVC Repository.
	GetTfvcRepositoryStatus(context.Context, GetTfvcRepositoryStatusArgs) (*TfvcRepositoryStatusResponse, 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.

func (*ClientImpl) GetRepositoryStatus

func (client *ClientImpl) GetRepositoryStatus(ctx context.Context, args GetRepositoryStatusArgs) (*RepositoryStatusResponse, error)

[Preview API] Provides status of Repository.

func (*ClientImpl) GetTfvcRepositoryStatus

func (client *ClientImpl) GetTfvcRepositoryStatus(ctx context.Context, args GetTfvcRepositoryStatusArgs) (*TfvcRepositoryStatusResponse, error)

[Preview API] Provides status of TFVC Repository.

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 {
	// Filters to be applied. Set it to null if there are no filters to be applied.
	Filters *map[string][]string `json:"filters,omitempty"`
	// The search text.
	SearchText *string `json:"searchText,omitempty"`
	// Options for sorting search results. If set to null, the results will be returned sorted by relevance. If more than one sort option is provided, the results are sorted in the order specified in the OrderBy.
	OrderBy *[]searchshared.SortOption `json:"$orderBy,omitempty"`
	// Number of results to be skipped.
	Skip *int `json:"$skip,omitempty"`
	// Number of results to be returned.
	Top *int `json:"$top,omitempty"`
	// Flag to opt for faceting in the result. Default behavior is false.
	IncludeFacets *bool `json:"includeFacets,omitempty"`
	// Flag to opt for including matched code snippet in the result. Default behavior is false.
	IncludeSnippet *bool `json:"includeSnippet,omitempty"`
}

Defines a code search request.

type CodeSearchResponse

type CodeSearchResponse struct {
	// A dictionary storing an array of <code>Filter</code> object against each facet.
	Facets *map[string][]searchshared.Filter `json:"facets,omitempty"`
	// Numeric code indicating any additional information: 0 - Ok, 1 - Account is being reindexed, 2 - Account indexing has not started, 3 - Invalid Request, 4 - Prefix wildcard query not supported, 5 - MultiWords with code facet not supported, 6 - Account is being onboarded, 7 - Account is being onboarded or reindexed, 8 - Top value trimmed to maxresult allowed 9 - Branches are being indexed, 10 - Faceting not enabled, 11 - Work items not accessible, 19 - Phrase queries with code type filters not supported, 20 - Wildcard queries with code type filters not supported. Any other info code is used for internal purpose.
	InfoCode *int `json:"infoCode,omitempty"`
	// 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 CustomRepositoryBranchStatusResponse

type CustomRepositoryBranchStatusResponse struct {
	LastIndexedChangeId           *uint64           `json:"lastIndexedChangeId,omitempty"`
	LastIndexedChangeIdChangeTime *azuredevops.Time `json:"lastIndexedChangeIdChangeTime,omitempty"`
	LatestChangeId                *uint64           `json:"latestChangeId,omitempty"`
	LatestChangeIdChangeTime      *azuredevops.Time `json:"latestChangeIdChangeTime,omitempty"`
}

type CustomRepositoryStatusResponse

type CustomRepositoryStatusResponse struct {
	// Repository Id.
	Id *uuid.UUID `json:"id,omitempty"`
	// List of indexed top level folders info.
	IndexedTopLevelFolders *[]DepotInfo `json:"indexedTopLevelFolders,omitempty"`
	// Repository Name.
	Name *string `json:"name,omitempty"`
}

Defines the custom repository status.

type DepotInfo

type DepotInfo struct {
	// Name of the indexed top level folder (depot).
	Name *string `json:"name,omitempty"`
}

Information about the custom repository indexing freshness for configured branches and depots.

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 GetRepositoryStatusArgs

type GetRepositoryStatusArgs struct {
	// (required) Project ID or project name
	Project *string
	// (required) Repository ID or repository name.
	Repository *string
}

Arguments for the GetRepositoryStatus function

type GetTfvcRepositoryStatusArgs

type GetTfvcRepositoryStatusArgs struct {
	// (required) Project ID or project name
	Project *string
}

Arguments for the GetTfvcRepositoryStatus 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 RepositoryStatusResponse

type RepositoryStatusResponse struct {
	// Repository Id.
	Id *uuid.UUID `json:"id,omitempty"`
	// List of Indexed branches info.
	IndexedBranches *[]BranchInfo `json:"indexedBranches,omitempty"`
	// Repository Name.
	Name *string `json:"name,omitempty"`
}

Defines the repository status.

type Team

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

Defines the details of the team.

type TfvcRepositoryStatusResponse

type TfvcRepositoryStatusResponse struct {
	// Repository Id.
	Id *uuid.UUID `json:"id,omitempty"`
	// List of Indexing Information for TFVC repository
	IndexingInformation *[]BranchInfo `json:"indexingInformation,omitempty"`
	// Repository Name.
	Name *string `json:"name,omitempty"`
}

Defines the TFVC repository status.

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 {
	// Filters to be applied. Set it to null if there are no filters to be applied.
	Filters *map[string][]string `json:"filters,omitempty"`
	// The search text.
	SearchText *string `json:"searchText,omitempty"`
	// Options for sorting search results. If set to null, the results will be returned sorted by relevance. If more than one sort option is provided, the results are sorted in the order specified in the OrderBy.
	OrderBy *[]searchshared.SortOption `json:"$orderBy,omitempty"`
	// Number of results to be skipped.
	Skip *int `json:"$skip,omitempty"`
	// Number of results to be returned.
	Top *int `json:"$top,omitempty"`
	// Flag to opt for faceting in the result. Default behavior is false.
	IncludeFacets *bool `json:"includeFacets,omitempty"`
}

Defines a work item search request.

type WorkItemSearchResponse

type WorkItemSearchResponse struct {
	// A dictionary storing an array of <code>Filter</code> object against each facet.
	Facets *map[string][]searchshared.Filter `json:"facets,omitempty"`
	// Numeric code indicating any additional information: 0 - Ok, 1 - Account is being reindexed, 2 - Account indexing has not started, 3 - Invalid Request, 4 - Prefix wildcard query not supported, 5 - MultiWords with code facet not supported, 6 - Account is being onboarded, 7 - Account is being onboarded or reindexed, 8 - Top value trimmed to maxresult allowed 9 - Branches are being indexed, 10 - Faceting not enabled, 11 - Work items not accessible, 19 - Phrase queries with code type filters not supported, 20 - Wildcard queries with code type filters not supported. Any other info code is used for internal purpose.
	InfoCode *int `json:"infoCode,omitempty"`
	// 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