test_gql_client

package
v0.0.0-...-43dbc5b Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const Intents_Operation = `` /* 538-byte string literal not displayed */

The query or mutation executed by Intents.

View Source
const ReportCaptureResults_Operation = `
mutation ReportCaptureResults ($results: CaptureResults!) {
	reportCaptureResults(results: $results)
}
`

The query or mutation executed by ReportCaptureResults.

View Source
const ReportSocketScanResults_Operation = `
mutation ReportSocketScanResults ($results: SocketScanResults!) {
	reportSocketScanResults(results: $results)
}
`

The query or mutation executed by ReportSocketScanResults.

View Source
const ReportTCPCaptureResults_Operation = `
mutation ReportTCPCaptureResults ($results: CaptureTCPResults!) {
	reportTCPCaptureResults(results: $results)
}
`

The query or mutation executed by ReportTCPCaptureResults.

View Source
const ServiceIntents_Operation = `` /* 245-byte string literal not displayed */

The query or mutation executed by ServiceIntents.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaptureResults

type CaptureResults struct {
	Results []RecordedDestinationsForSrc `json:"results"`
}

func (*CaptureResults) GetResults

func (v *CaptureResults) GetResults() []RecordedDestinationsForSrc

GetResults returns CaptureResults.Results, and is useful for accessing the field via an interface.

type CaptureTCPResults

type CaptureTCPResults struct {
	Results []RecordedDestinationsForSrc `json:"results"`
}

func (*CaptureTCPResults) GetResults

GetResults returns CaptureTCPResults.Results, and is useful for accessing the field via an interface.

type Destination

type Destination struct {
	Destination     string                  `json:"destination"`
	DestinationIP   nilable.Nilable[string] `json:"destinationIP"`
	DestinationPort nilable.Nilable[int]    `json:"destinationPort"`
	TTL             nilable.Nilable[int]    `json:"TTL"`
	LastSeen        time.Time               `json:"lastSeen"`
}

func (*Destination) GetDestination

func (v *Destination) GetDestination() string

GetDestination returns Destination.Destination, and is useful for accessing the field via an interface.

func (*Destination) GetDestinationIP

func (v *Destination) GetDestinationIP() nilable.Nilable[string]

GetDestinationIP returns Destination.DestinationIP, and is useful for accessing the field via an interface.

func (*Destination) GetDestinationPort

func (v *Destination) GetDestinationPort() nilable.Nilable[int]

GetDestinationPort returns Destination.DestinationPort, and is useful for accessing the field via an interface.

func (*Destination) GetLastSeen

func (v *Destination) GetLastSeen() time.Time

GetLastSeen returns Destination.LastSeen, and is useful for accessing the field via an interface.

func (*Destination) GetTTL

func (v *Destination) GetTTL() nilable.Nilable[int]

GetTTL returns Destination.TTL, and is useful for accessing the field via an interface.

type IntentsIntentsIntent

type IntentsIntentsIntent struct {
	Client IntentsIntentsIntentClientOtterizeServiceIdentity `json:"client"`
	Server IntentsIntentsIntentServerOtterizeServiceIdentity `json:"server"`
}

IntentsIntentsIntent includes the requested fields of the GraphQL type Intent.

func (*IntentsIntentsIntent) GetClient

GetClient returns IntentsIntentsIntent.Client, and is useful for accessing the field via an interface.

func (*IntentsIntentsIntent) GetServer

GetServer returns IntentsIntentsIntent.Server, and is useful for accessing the field via an interface.

type IntentsIntentsIntentClientOtterizeServiceIdentity

type IntentsIntentsIntentClientOtterizeServiceIdentity struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	// If the service identity was resolved from a pod owner, the GroupVersionKind of the pod owner.
	PodOwnerKind nilable.Nilable[IntentsIntentsIntentClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind] `json:"podOwnerKind"`
}

IntentsIntentsIntentClientOtterizeServiceIdentity includes the requested fields of the GraphQL type OtterizeServiceIdentity.

func (*IntentsIntentsIntentClientOtterizeServiceIdentity) GetName

GetName returns IntentsIntentsIntentClientOtterizeServiceIdentity.Name, and is useful for accessing the field via an interface.

func (*IntentsIntentsIntentClientOtterizeServiceIdentity) GetNamespace

GetNamespace returns IntentsIntentsIntentClientOtterizeServiceIdentity.Namespace, and is useful for accessing the field via an interface.

func (*IntentsIntentsIntentClientOtterizeServiceIdentity) GetPodOwnerKind

GetPodOwnerKind returns IntentsIntentsIntentClientOtterizeServiceIdentity.PodOwnerKind, and is useful for accessing the field via an interface.

type IntentsIntentsIntentClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind

type IntentsIntentsIntentClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind struct {
	Group   nilable.Nilable[string] `json:"group"`
	Kind    string                  `json:"kind"`
	Version string                  `json:"version"`
}

IntentsIntentsIntentClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind includes the requested fields of the GraphQL type GroupVersionKind.

func (*IntentsIntentsIntentClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind) GetGroup

GetGroup returns IntentsIntentsIntentClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind.Group, and is useful for accessing the field via an interface.

func (*IntentsIntentsIntentClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind) GetKind

GetKind returns IntentsIntentsIntentClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind.Kind, and is useful for accessing the field via an interface.

func (*IntentsIntentsIntentClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind) GetVersion

GetVersion returns IntentsIntentsIntentClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind.Version, and is useful for accessing the field via an interface.

type IntentsIntentsIntentServerOtterizeServiceIdentity

type IntentsIntentsIntentServerOtterizeServiceIdentity struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	// If the service identity was resolved from a pod owner, the GroupVersionKind of the pod owner.
	PodOwnerKind nilable.Nilable[IntentsIntentsIntentServerOtterizeServiceIdentityPodOwnerKindGroupVersionKind] `json:"podOwnerKind"`
	// If the service identity was resolved from a Kubernetes service, its name.
	KubernetesService nilable.Nilable[string] `json:"kubernetesService"`
}

IntentsIntentsIntentServerOtterizeServiceIdentity includes the requested fields of the GraphQL type OtterizeServiceIdentity.

func (*IntentsIntentsIntentServerOtterizeServiceIdentity) GetKubernetesService

GetKubernetesService returns IntentsIntentsIntentServerOtterizeServiceIdentity.KubernetesService, and is useful for accessing the field via an interface.

func (*IntentsIntentsIntentServerOtterizeServiceIdentity) GetName

GetName returns IntentsIntentsIntentServerOtterizeServiceIdentity.Name, and is useful for accessing the field via an interface.

func (*IntentsIntentsIntentServerOtterizeServiceIdentity) GetNamespace

GetNamespace returns IntentsIntentsIntentServerOtterizeServiceIdentity.Namespace, and is useful for accessing the field via an interface.

func (*IntentsIntentsIntentServerOtterizeServiceIdentity) GetPodOwnerKind

GetPodOwnerKind returns IntentsIntentsIntentServerOtterizeServiceIdentity.PodOwnerKind, and is useful for accessing the field via an interface.

type IntentsIntentsIntentServerOtterizeServiceIdentityPodOwnerKindGroupVersionKind

type IntentsIntentsIntentServerOtterizeServiceIdentityPodOwnerKindGroupVersionKind struct {
	Group   nilable.Nilable[string] `json:"group"`
	Kind    string                  `json:"kind"`
	Version string                  `json:"version"`
}

IntentsIntentsIntentServerOtterizeServiceIdentityPodOwnerKindGroupVersionKind includes the requested fields of the GraphQL type GroupVersionKind.

func (*IntentsIntentsIntentServerOtterizeServiceIdentityPodOwnerKindGroupVersionKind) GetGroup

GetGroup returns IntentsIntentsIntentServerOtterizeServiceIdentityPodOwnerKindGroupVersionKind.Group, and is useful for accessing the field via an interface.

func (*IntentsIntentsIntentServerOtterizeServiceIdentityPodOwnerKindGroupVersionKind) GetKind

GetKind returns IntentsIntentsIntentServerOtterizeServiceIdentityPodOwnerKindGroupVersionKind.Kind, and is useful for accessing the field via an interface.

func (*IntentsIntentsIntentServerOtterizeServiceIdentityPodOwnerKindGroupVersionKind) GetVersion

GetVersion returns IntentsIntentsIntentServerOtterizeServiceIdentityPodOwnerKindGroupVersionKind.Version, and is useful for accessing the field via an interface.

type IntentsResponse

type IntentsResponse struct {
	// Query intents list.
	// namespaces: Namespaces filter.
	// includeLabels: Labels to include in the response. Ignored if includeAllLabels is specified.
	// excludeLabels: Labels to exclude from the response. Ignored if includeAllLabels is specified.
	// includeAllLabels: Return all labels for the pod in the response.
	Intents []IntentsIntentsIntent `json:"intents"`
}

IntentsResponse is returned by Intents on success.

func Intents

func Intents(
	ctx_ context.Context,
	client_ graphql.Client,
	namespaces []string,
	includeLabels []string,
	excludeServiceWithLabels []string,
	includeAllLabels nilable.Nilable[bool],
	server *ServerFilter,
) (*IntentsResponse, error)

func (*IntentsResponse) GetIntents

func (v *IntentsResponse) GetIntents() []IntentsIntentsIntent

GetIntents returns IntentsResponse.Intents, and is useful for accessing the field via an interface.

type RecordedDestinationsForSrc

type RecordedDestinationsForSrc struct {
	SrcIp        string        `json:"srcIp"`
	SrcHostname  string        `json:"srcHostname"`
	Destinations []Destination `json:"destinations"`
}

func (*RecordedDestinationsForSrc) GetDestinations

func (v *RecordedDestinationsForSrc) GetDestinations() []Destination

GetDestinations returns RecordedDestinationsForSrc.Destinations, and is useful for accessing the field via an interface.

func (*RecordedDestinationsForSrc) GetSrcHostname

func (v *RecordedDestinationsForSrc) GetSrcHostname() string

GetSrcHostname returns RecordedDestinationsForSrc.SrcHostname, and is useful for accessing the field via an interface.

func (*RecordedDestinationsForSrc) GetSrcIp

func (v *RecordedDestinationsForSrc) GetSrcIp() string

GetSrcIp returns RecordedDestinationsForSrc.SrcIp, and is useful for accessing the field via an interface.

type ReportCaptureResultsResponse

type ReportCaptureResultsResponse struct {
	ReportCaptureResults bool `json:"reportCaptureResults"`
}

ReportCaptureResultsResponse is returned by ReportCaptureResults on success.

func ReportCaptureResults

func ReportCaptureResults(
	ctx_ context.Context,
	client_ graphql.Client,
	results CaptureResults,
) (*ReportCaptureResultsResponse, error)

func (*ReportCaptureResultsResponse) GetReportCaptureResults

func (v *ReportCaptureResultsResponse) GetReportCaptureResults() bool

GetReportCaptureResults returns ReportCaptureResultsResponse.ReportCaptureResults, and is useful for accessing the field via an interface.

type ReportSocketScanResultsResponse

type ReportSocketScanResultsResponse struct {
	ReportSocketScanResults bool `json:"reportSocketScanResults"`
}

ReportSocketScanResultsResponse is returned by ReportSocketScanResults on success.

func ReportSocketScanResults

func ReportSocketScanResults(
	ctx_ context.Context,
	client_ graphql.Client,
	results SocketScanResults,
) (*ReportSocketScanResultsResponse, error)

func (*ReportSocketScanResultsResponse) GetReportSocketScanResults

func (v *ReportSocketScanResultsResponse) GetReportSocketScanResults() bool

GetReportSocketScanResults returns ReportSocketScanResultsResponse.ReportSocketScanResults, and is useful for accessing the field via an interface.

type ReportTCPCaptureResultsResponse

type ReportTCPCaptureResultsResponse struct {
	ReportTCPCaptureResults bool `json:"reportTCPCaptureResults"`
}

ReportTCPCaptureResultsResponse is returned by ReportTCPCaptureResults on success.

func ReportTCPCaptureResults

func ReportTCPCaptureResults(
	ctx_ context.Context,
	client_ graphql.Client,
	results CaptureTCPResults,
) (*ReportTCPCaptureResultsResponse, error)

func (*ReportTCPCaptureResultsResponse) GetReportTCPCaptureResults

func (v *ReportTCPCaptureResultsResponse) GetReportTCPCaptureResults() bool

GetReportTCPCaptureResults returns ReportTCPCaptureResultsResponse.ReportTCPCaptureResults, and is useful for accessing the field via an interface.

type ServerFilter

type ServerFilter struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

func (*ServerFilter) GetName

func (v *ServerFilter) GetName() string

GetName returns ServerFilter.Name, and is useful for accessing the field via an interface.

func (*ServerFilter) GetNamespace

func (v *ServerFilter) GetNamespace() string

GetNamespace returns ServerFilter.Namespace, and is useful for accessing the field via an interface.

type ServiceIntentsResponse

type ServiceIntentsResponse struct {
	// Kept for backwards compatibility with CLI -
	// query intents as (source+destinations) pairs, without any additional intent info.
	// namespaces: Namespaces filter.
	// includeLabels: Labels to include in the response. Ignored if includeAllLabels is specified.
	// includeAllLabels: Return all labels for the pod in the response.
	ServiceIntents []ServiceIntentsServiceIntents `json:"serviceIntents"`
}

ServiceIntentsResponse is returned by ServiceIntents on success.

func ServiceIntents

func ServiceIntents(
	ctx_ context.Context,
	client_ graphql.Client,
	namespaces []string,
) (*ServiceIntentsResponse, error)

func (*ServiceIntentsResponse) GetServiceIntents

func (v *ServiceIntentsResponse) GetServiceIntents() []ServiceIntentsServiceIntents

GetServiceIntents returns ServiceIntentsResponse.ServiceIntents, and is useful for accessing the field via an interface.

type ServiceIntentsServiceIntents

type ServiceIntentsServiceIntents struct {
	Client  ServiceIntentsServiceIntentsClientOtterizeServiceIdentity    `json:"client"`
	Intents []ServiceIntentsServiceIntentsIntentsOtterizeServiceIdentity `json:"intents"`
}

ServiceIntentsServiceIntents includes the requested fields of the GraphQL type ServiceIntents.

func (*ServiceIntentsServiceIntents) GetClient

GetClient returns ServiceIntentsServiceIntents.Client, and is useful for accessing the field via an interface.

func (*ServiceIntentsServiceIntents) GetIntents

GetIntents returns ServiceIntentsServiceIntents.Intents, and is useful for accessing the field via an interface.

type ServiceIntentsServiceIntentsClientOtterizeServiceIdentity

type ServiceIntentsServiceIntentsClientOtterizeServiceIdentity struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	// If the service identity was resolved from a pod owner, the GroupVersionKind of the pod owner.
	PodOwnerKind nilable.Nilable[ServiceIntentsServiceIntentsClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind] `json:"podOwnerKind"`
}

ServiceIntentsServiceIntentsClientOtterizeServiceIdentity includes the requested fields of the GraphQL type OtterizeServiceIdentity.

func (*ServiceIntentsServiceIntentsClientOtterizeServiceIdentity) GetName

GetName returns ServiceIntentsServiceIntentsClientOtterizeServiceIdentity.Name, and is useful for accessing the field via an interface.

func (*ServiceIntentsServiceIntentsClientOtterizeServiceIdentity) GetNamespace

GetNamespace returns ServiceIntentsServiceIntentsClientOtterizeServiceIdentity.Namespace, and is useful for accessing the field via an interface.

func (*ServiceIntentsServiceIntentsClientOtterizeServiceIdentity) GetPodOwnerKind

GetPodOwnerKind returns ServiceIntentsServiceIntentsClientOtterizeServiceIdentity.PodOwnerKind, and is useful for accessing the field via an interface.

type ServiceIntentsServiceIntentsClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind

type ServiceIntentsServiceIntentsClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind struct {
	Group   nilable.Nilable[string] `json:"group"`
	Kind    string                  `json:"kind"`
	Version string                  `json:"version"`
}

ServiceIntentsServiceIntentsClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind includes the requested fields of the GraphQL type GroupVersionKind.

func (*ServiceIntentsServiceIntentsClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind) GetGroup

GetGroup returns ServiceIntentsServiceIntentsClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind.Group, and is useful for accessing the field via an interface.

func (*ServiceIntentsServiceIntentsClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind) GetKind

GetKind returns ServiceIntentsServiceIntentsClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind.Kind, and is useful for accessing the field via an interface.

func (*ServiceIntentsServiceIntentsClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind) GetVersion

GetVersion returns ServiceIntentsServiceIntentsClientOtterizeServiceIdentityPodOwnerKindGroupVersionKind.Version, and is useful for accessing the field via an interface.

type ServiceIntentsServiceIntentsIntentsOtterizeServiceIdentity

type ServiceIntentsServiceIntentsIntentsOtterizeServiceIdentity struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	// If the service identity was resolved from a Kubernetes service, its name.
	KubernetesService nilable.Nilable[string] `json:"kubernetesService"`
}

ServiceIntentsServiceIntentsIntentsOtterizeServiceIdentity includes the requested fields of the GraphQL type OtterizeServiceIdentity.

func (*ServiceIntentsServiceIntentsIntentsOtterizeServiceIdentity) GetKubernetesService

GetKubernetesService returns ServiceIntentsServiceIntentsIntentsOtterizeServiceIdentity.KubernetesService, and is useful for accessing the field via an interface.

func (*ServiceIntentsServiceIntentsIntentsOtterizeServiceIdentity) GetName

GetName returns ServiceIntentsServiceIntentsIntentsOtterizeServiceIdentity.Name, and is useful for accessing the field via an interface.

func (*ServiceIntentsServiceIntentsIntentsOtterizeServiceIdentity) GetNamespace

GetNamespace returns ServiceIntentsServiceIntentsIntentsOtterizeServiceIdentity.Namespace, and is useful for accessing the field via an interface.

type SocketScanResults

type SocketScanResults struct {
	Results []RecordedDestinationsForSrc `json:"results"`
}

func (*SocketScanResults) GetResults

GetResults returns SocketScanResults.Results, and is useful for accessing the field via an interface.

Jump to

Keyboard shortcuts

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