api

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendFlagsToAPI

func SendFlagsToAPI(cfg *config.Config, results []model.FileSearchResult) (err error)

SendFlagsToAPI takes file search result & sends flag info to the API

Types

type AuthRequest

type AuthRequest struct {
	GrantType    string `json:"grant_type"`
	Scope        string `json:"scope"`
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
}

type AuthResponse

type AuthResponse struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	Scope        string `json:"scope"`
}

type Flag

type Flag struct {
	FlagKey           string `json:"flagKey"`
	FilePath          string `json:"filePath"`
	LineNumber        int    `json:"lineNumber"`
	Code              string `json:"code"`
	CodeLineHighlight int    `json:"codeLineHighlight"`
}

Flag represent a flag code info sent to the Flagship API

type FlagUsageRequest

type FlagUsageRequest struct {
	RepositoryURL    string `json:"repositoryUrl"`
	RepositoryBranch string `json:"repositoryBranch"`
	Flags            []Flag `json:"flags"`
}

type SendFlagsParameters

type SendFlagsParameters struct {
	FlagshipAPIURL       string
	FlagshipAuthAPIURL   string
	FlagshipClientID     string
	FlagshipClientSecret string
	RepositoryURL        string
	RepositoryBranch     string
}

Jump to

Keyboard shortcuts

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