query

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CursorServices         = "servicesEndCursor"
	CursorServiceResources = "resourcesEndCursor"
	CursorServiceKeys      = "keysEndCursor"
)
View Source
const CursorConnectors = "connectorsEndCursor"
View Source
const CursorGroups = "groupsEndCursor"
View Source
const CursorPolicies = "policiesEndCursor"
View Source
const CursorRemoteNetworks = "remoteNetworksEndCursor"
View Source
const CursorResources = "resourcesEndCursor"
View Source
const CursorServiceAccounts = "serviceAccountsEndCursor"
View Source
const CursorUsers = "usersEndCursor"

Variables

This section is empty.

Functions

func IsGqlKeyActive added in v0.2.4

func IsGqlKeyActive(item *GqlKeyIDEdge) bool

func IsGqlResourceActive added in v0.2.4

func IsGqlResourceActive(item *GqlResourceIDEdge) bool

Types

type AddResourceGroups added in v0.3.0

type AddResourceGroups struct {
	OkError `graphql:"resourceUpdate(id: $id, addedGroupIds: $groupIds)"`
}

type BooleanFilterOperatorInput added in v0.3.0

type BooleanFilterOperatorInput struct {
	Eq bool `json:"eq"`
}

type ConnectorEdge

type ConnectorEdge struct {
	Node *gqlConnector
}

type ConnectorEntityResponse

type ConnectorEntityResponse struct {
	Entity *gqlConnector
	OkError
}

type ConnectorTokensResponse

type ConnectorTokensResponse struct {
	ConnectorTokens gqlConnectorTokens
	OkError
}

type Connectors

type Connectors struct {
	PaginatedResource[*ConnectorEdge]
}

func (Connectors) ToModel

func (c Connectors) ToModel() []*model.Connector

type CreateConnector

type CreateConnector struct {
	ConnectorEntityResponse `graphql:"connectorCreate(remoteNetworkId: $remoteNetworkId, name: $connectorName)"`
}

type CreateGroup

type CreateGroup struct {
	GroupEntityResponse `graphql:"groupCreate(name: $name)"`
}

func (CreateGroup) ToModel

func (q CreateGroup) ToModel() *model.Group

type CreateRemoteNetwork

type CreateRemoteNetwork struct {
	RemoteNetworkEntityResponse `graphql:"remoteNetworkCreate(name: $name, isActive: $isActive, location: $location)"`
}

func (CreateRemoteNetwork) ToModel

type CreateResource

type CreateResource struct {
	ResourceEntityResponse `` /* 211-byte string literal not displayed */
}

type CreateServiceAccount

type CreateServiceAccount struct {
	ServiceAccountEntityResponse `graphql:"serviceAccountCreate(name: $name)"`
}

func (CreateServiceAccount) ToModel

type CreateServiceAccountKey

type CreateServiceAccountKey struct {
	ServiceAccountKeyEntityCreateResponse `graphql:"serviceAccountKeyCreate(expirationTime: $expirationTime, serviceAccountId: $serviceAccountId, name: $name)"`
}

func (CreateServiceAccountKey) ToModel

type DeleteConnector

type DeleteConnector struct {
	OkError `graphql:"connectorDelete(id: $id)"`
}

type DeleteGroup

type DeleteGroup struct {
	OkError `graphql:"groupDelete(id: $id)" json:"groupDelete"`
}

type DeleteRemoteNetwork

type DeleteRemoteNetwork struct {
	OkError `graphql:"remoteNetworkDelete(id: $id)"`
}

type DeleteResource

type DeleteResource struct {
	OkError `graphql:"resourceDelete(id: $id)"`
}

type DeleteServiceAccount

type DeleteServiceAccount struct {
	OkError `graphql:"serviceAccountDelete(id: $id)"`
}

type DeleteServiceAccountKey

type DeleteServiceAccountKey struct {
	OkError `graphql:"serviceAccountKeyDelete(id: $id)"`
}

type GenerateConnectorTokens

type GenerateConnectorTokens struct {
	ConnectorTokensResponse `graphql:"connectorGenerateTokens(connectorId: $connectorId)"`
}

func (GenerateConnectorTokens) ToModel

type GqlKeyIDEdge added in v0.2.4

type GqlKeyIDEdge struct {
	Node *gqlKeyID
}

type GqlResourceIDEdge added in v0.2.4

type GqlResourceIDEdge struct {
	Node *gqlResourceID
}

type GqlService added in v0.2.4

type GqlService struct {
	IDName
	Resources gqlResourceIDs `graphql:"resources(after: $resourcesEndCursor)"`
	Keys      gqlKeyIDs      `graphql:"keys(after: $keysEndCursor)"`
}

func (*GqlService) ToModel added in v0.2.4

func (s *GqlService) ToModel() *model.ServiceAccount

type GroupEdge

type GroupEdge struct {
	Node *gqlGroup
}

type GroupEntityResponse

type GroupEntityResponse struct {
	Entity *gqlGroup
	OkError
}

type GroupFilterInput added in v0.3.0

type GroupFilterInput struct {
	Name     *StringFilterOperationInput  `json:"name"`
	Type     GroupTypeFilterOperatorInput `json:"type"`
	IsActive BooleanFilterOperatorInput   `json:"isActive"`
}

func NewGroupFilterInput added in v0.3.0

func NewGroupFilterInput(input *model.GroupsFilter) *GroupFilterInput

type GroupTypeFilterOperatorInput added in v0.3.0

type GroupTypeFilterOperatorInput struct {
	In []string `json:"in"`
}

type Groups

type Groups struct {
	PaginatedResource[*GroupEdge]
}

func (Groups) ToModel

func (u Groups) ToModel() []*model.Group

type IDName

type IDName struct {
	ID   graphql.ID `json:"id"`
	Name string     `json:"name"`
}

type NextPageFunc

type NextPageFunc[E any] func(ctx context.Context, variables map[string]interface{}, cursor string) (*PaginatedResource[E], error)

type OkError

type OkError struct {
	Ok    bool   `json:"ok"`
	Error string `json:"error"`
}

type PageInfo

type PageInfo struct {
	EndCursor   string
	HasNextPage bool
}

type PaginatedResource

type PaginatedResource[E any] struct {
	PageInfo PageInfo
	Edges    []E
}

func (*PaginatedResource[E]) FetchPages

func (r *PaginatedResource[E]) FetchPages(ctx context.Context, fetchNextPage NextPageFunc[E], variables map[string]interface{}) error

type PortRange

type PortRange struct {
	Start int `json:"start"`
	End   int `json:"end"`
}

type Protocol

type Protocol struct {
	Ports  []*PortRange `json:"ports"`
	Policy string       `json:"policy"`
}

type Protocols

type Protocols struct {
	UDP       *Protocol `json:"udp"`
	TCP       *Protocol `json:"tcp"`
	AllowIcmp bool      `json:"allowIcmp"`
}

type ReadConnector

type ReadConnector struct {
	Connector *gqlConnector `graphql:"connector(id: $id)"`
}

func (ReadConnector) ToModel

func (q ReadConnector) ToModel() *model.Connector

type ReadConnectors

type ReadConnectors struct {
	Connectors `graphql:"connectors(after: $connectorsEndCursor)"`
}

func (ReadConnectors) ToModel

func (q ReadConnectors) ToModel() []*model.Connector

type ReadGroup

type ReadGroup struct {
	Group *gqlGroup `graphql:"group(id: $id)"`
}

func (ReadGroup) ToModel

func (q ReadGroup) ToModel() *model.Group

type ReadGroups

type ReadGroups struct {
	Groups `graphql:"groups(filter: $filter, after: $groupsEndCursor)"`
}

type ReadRemoteNetworkByID

type ReadRemoteNetworkByID struct {
	RemoteNetwork *gqlRemoteNetwork `graphql:"remoteNetwork(id: $id)"`
}

func (ReadRemoteNetworkByID) ToModel

type ReadRemoteNetworkByName

type ReadRemoteNetworkByName struct {
	RemoteNetworks gqlRemoteNetworks `graphql:"remoteNetworks(filter: {name: {eq: $name}})"`
}

type ReadRemoteNetworks

type ReadRemoteNetworks struct {
	RemoteNetworks `graphql:"remoteNetworks(after: $remoteNetworksEndCursor)"`
}

type ReadResource

type ReadResource struct {
	Resource *gqlResource `graphql:"resource(id: $id)"`
}

type ReadResourceGroups

type ReadResourceGroups struct {
	Resource *gqlResourceGroups `graphql:"resource(id: $id)"`
}

type ReadResources

type ReadResources struct {
	Resources `graphql:"resources(after: $resourcesEndCursor)"`
}

type ReadResourcesByName

type ReadResourcesByName struct {
	Resources `graphql:"resources(filter: {name: {eq: $name}}, after: $resourcesEndCursor)"`
}

type ReadSecurityPolicies added in v0.2.4

type ReadSecurityPolicies struct {
	SecurityPolicies `graphql:"securityPolicies(after: $policiesEndCursor)"`
}

func (ReadSecurityPolicies) ToModel added in v0.2.4

func (q ReadSecurityPolicies) ToModel() []*model.SecurityPolicy

type ReadSecurityPolicy added in v0.2.4

type ReadSecurityPolicy struct {
	SecurityPolicy *gqlSecurityPolicy `graphql:"securityPolicy(id: $id, name: $name)"`
}

func (ReadSecurityPolicy) ToModel added in v0.2.4

type ReadServiceAccount

type ReadServiceAccount struct {
	Service *GqlService `graphql:"serviceAccount(id: $id)"`
}

type ReadServiceAccountKey

type ReadServiceAccountKey struct {
	ServiceAccountKey *gqlServiceKey `graphql:"serviceAccountKey(id: $id)"`
}

func (ReadServiceAccountKey) ToModel

func (q ReadServiceAccountKey) ToModel() (*model.ServiceKey, error)

type ReadServiceAccounts

type ReadServiceAccounts struct {
	Services `graphql:"serviceAccounts(filter: $filter, after: $servicesEndCursor)"`
}

type ReadShallowServiceAccount added in v0.2.4

type ReadShallowServiceAccount struct {
	ServiceAccount *gqlServiceAccount `graphql:"serviceAccount(id: $id)"`
}

func (ReadShallowServiceAccount) ToModel added in v0.2.4

type ReadShallowServiceAccounts added in v0.2.4

type ReadShallowServiceAccounts struct {
	ServiceAccounts `graphql:"serviceAccounts(after: $serviceAccountsEndCursor)"`
}

type ReadUser

type ReadUser struct {
	User *gqlUser `graphql:"user(id: $id)"`
}

func (ReadUser) ToModel

func (q ReadUser) ToModel() *model.User

type ReadUsers

type ReadUsers struct {
	Users `graphql:"users(after: $usersEndCursor)"`
}

type RemoteNetworkEdge

type RemoteNetworkEdge struct {
	Node gqlRemoteNetwork
}

type RemoteNetworkEntityResponse

type RemoteNetworkEntityResponse struct {
	Entity *gqlRemoteNetwork
	OkError
}

type RemoteNetworks

type RemoteNetworks struct {
	PaginatedResource[*RemoteNetworkEdge]
}

func (RemoteNetworks) ToModel

func (r RemoteNetworks) ToModel() []*model.RemoteNetwork

type ResourceEdge

type ResourceEdge struct {
	Node *ResourceNode
}

type ResourceEntityResponse

type ResourceEntityResponse struct {
	Entity *gqlResource
	OkError
}

type ResourceNode

type ResourceNode struct {
	IDName
	Address struct {
		Value string
	}
	RemoteNetwork struct {
		ID graphql.ID
	}
	Protocols                *Protocols
	IsActive                 bool
	IsVisible                bool
	IsBrowserShortcutEnabled bool
}

func (ResourceNode) ToModel

func (r ResourceNode) ToModel() *model.Resource

type Resources

type Resources struct {
	PaginatedResource[*ResourceEdge]
}

func (Resources) ToModel

func (r Resources) ToModel() []*model.Resource

type RevokeServiceAccountKey

type RevokeServiceAccountKey struct {
	OkError `graphql:"serviceAccountKeyRevoke(id: $id)"`
}

type SecurityPolicies added in v0.2.4

type SecurityPolicies struct {
	PaginatedResource[*SecurityPolicyEdge]
}

type SecurityPolicyEdge added in v0.2.4

type SecurityPolicyEdge struct {
	Node *gqlSecurityPolicy
}

type ServiceAccountEdge

type ServiceAccountEdge struct {
	Node *gqlServiceAccount
}

type ServiceAccountEntityResponse

type ServiceAccountEntityResponse struct {
	Entity *gqlServiceAccount
	OkError
}

type ServiceAccountFilterInput added in v0.2.4

type ServiceAccountFilterInput struct {
	Name StringFilter `json:"name"`
}

func NewServiceAccountFilterInput added in v0.2.4

func NewServiceAccountFilterInput(name string) *ServiceAccountFilterInput

type ServiceAccountKeyEntityCreateResponse

type ServiceAccountKeyEntityCreateResponse struct {
	ServiceAccountKeyEntityResponse
	Token string
}

type ServiceAccountKeyEntityResponse

type ServiceAccountKeyEntityResponse struct {
	Entity *gqlServiceKey
	OkError
}

type ServiceAccounts

type ServiceAccounts struct {
	PaginatedResource[*ServiceAccountEdge]
}

func (ServiceAccounts) ToModel

func (s ServiceAccounts) ToModel() []*model.ServiceAccount

type ServiceEdge added in v0.2.4

type ServiceEdge struct {
	Node *GqlService
}

type Services added in v0.2.4

type Services struct {
	PaginatedResource[*ServiceEdge]
}

func (*Services) ToModel added in v0.2.4

func (s *Services) ToModel() []*model.ServiceAccount

type StringFilter added in v0.2.4

type StringFilter struct {
	Eq string `json:"eq"`
}

type StringFilterOperationInput added in v0.3.0

type StringFilterOperationInput struct {
	Eq string `json:"eq"`
}

type UpdateConnector

type UpdateConnector struct {
	ConnectorEntityResponse `graphql:"connectorUpdate(id: $connectorId, name: $connectorName)"`
}

type UpdateGroup

type UpdateGroup struct {
	GroupEntityResponse `graphql:"groupUpdate(id: $id, name: $name)"`
}

type UpdateRemoteNetwork

type UpdateRemoteNetwork struct {
	RemoteNetworkEntityResponse `graphql:"remoteNetworkUpdate(id: $id, name: $name, location: $location)"`
}

func (UpdateRemoteNetwork) ToModel

type UpdateResource

type UpdateResource struct {
	ResourceEntityResponse `` /* 225-byte string literal not displayed */
}

type UpdateResourceActiveState

type UpdateResourceActiveState struct {
	OkError `graphql:"resourceUpdate(id: $id, isActive: $isActive)"`
}

type UpdateResourceRemoveGroups added in v0.3.0

type UpdateResourceRemoveGroups struct {
	ResourceEntityResponse `graphql:"resourceUpdate(id: $id, removedGroupIds: $removedGroupIds)"`
}

type UpdateServiceAccount

type UpdateServiceAccount struct {
	ServiceAccountEntityResponse `graphql:"serviceAccountUpdate(id: $id, name: $name, addedResourceIds: $addedResourceIds)"`
}

func (UpdateServiceAccount) ToModel

type UpdateServiceAccountKey

type UpdateServiceAccountKey struct {
	ServiceAccountKeyEntityResponse `graphql:"serviceAccountKeyUpdate(id: $id, name: $name)"`
}

func (UpdateServiceAccountKey) ToModel

type UpdateServiceAccountRemoveResources added in v0.3.0

type UpdateServiceAccountRemoveResources struct {
	ServiceAccountEntityResponse `graphql:"serviceAccountUpdate(id: $id, removedResourceIds: $removedResourceIds)"`
}

type UserEdge

type UserEdge struct {
	Node *gqlUser
}

type Users

type Users struct {
	PaginatedResource[*UserEdge]
}

func (Users) ToModel

func (u Users) ToModel() []*model.User

Jump to

Keyboard shortcuts

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