graphql

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2025 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const CreateUserFromAuth0User_Operation = `` /* 168-byte string literal not displayed */

The query or mutation executed by CreateUserFromAuth0User.

View Source
const SendCLITelemetry_Operation = `
mutation SendCLITelemetry ($telemetry: CLITelemetry!) {
	sendCLITelemetries(telemetries: [$telemetry])
}
`

The query or mutation executed by SendCLITelemetry.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLICommand added in v1.0.11

type CLICommand struct {
	Noun      string   `json:"noun"`
	Verb      string   `json:"verb"`
	Modifiers []string `json:"modifiers"`
}

func (*CLICommand) GetModifiers added in v1.0.11

func (v *CLICommand) GetModifiers() []string

GetModifiers returns CLICommand.Modifiers, and is useful for accessing the field via an interface.

func (*CLICommand) GetNoun added in v1.0.11

func (v *CLICommand) GetNoun() string

GetNoun returns CLICommand.Noun, and is useful for accessing the field via an interface.

func (*CLICommand) GetVerb added in v1.0.11

func (v *CLICommand) GetVerb() string

GetVerb returns CLICommand.Verb, and is useful for accessing the field via an interface.

type CLIIdentifier added in v1.0.11

type CLIIdentifier struct {
	Version       string `json:"version"`
	ContextId     string `json:"contextId"`
	CloudClientId string `json:"cloudClientId"`
}

func (*CLIIdentifier) GetCloudClientId added in v1.0.11

func (v *CLIIdentifier) GetCloudClientId() string

GetCloudClientId returns CLIIdentifier.CloudClientId, and is useful for accessing the field via an interface.

func (*CLIIdentifier) GetContextId added in v1.0.11

func (v *CLIIdentifier) GetContextId() string

GetContextId returns CLIIdentifier.ContextId, and is useful for accessing the field via an interface.

func (*CLIIdentifier) GetVersion added in v1.0.11

func (v *CLIIdentifier) GetVersion() string

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

type CLITelemetry added in v1.0.11

type CLITelemetry struct {
	Identifier CLIIdentifier `json:"identifier"`
	Command    CLICommand    `json:"command"`
}

func (*CLITelemetry) GetCommand added in v1.0.11

func (v *CLITelemetry) GetCommand() CLICommand

GetCommand returns CLITelemetry.Command, and is useful for accessing the field via an interface.

func (*CLITelemetry) GetIdentifier added in v1.0.11

func (v *CLITelemetry) GetIdentifier() CLIIdentifier

GetIdentifier returns CLITelemetry.Identifier, and is useful for accessing the field via an interface.

type Client

type Client struct {
	Address string
	Client  genqlientgraphql.Client
}

func NewClient

func NewClient(address string, tokenSrc oauth2.TokenSource) *Client

func NewClientFromToken

func NewClientFromToken(address string, token string) *Client

func (*Client) RegisterAuth0User

func (c *Client) RegisterAuth0User(ctx context.Context) (MeFields, error)

type CreateUserFromAuth0UserMeMeMutation

type CreateUserFromAuth0UserMeMeMutation struct {
	// Register the user defined by the active session token into the otterize users store.
	RegisterUser CreateUserFromAuth0UserMeMeMutationRegisterUserMe `json:"registerUser"`
}

CreateUserFromAuth0UserMeMeMutation includes the requested fields of the GraphQL type MeMutation.

func (*CreateUserFromAuth0UserMeMeMutation) GetRegisterUser

GetRegisterUser returns CreateUserFromAuth0UserMeMeMutation.RegisterUser, and is useful for accessing the field via an interface.

type CreateUserFromAuth0UserMeMeMutationRegisterUserMe

type CreateUserFromAuth0UserMeMeMutationRegisterUserMe struct {
	MeFields `json:"-"`
}

CreateUserFromAuth0UserMeMeMutationRegisterUserMe includes the requested fields of the GraphQL type Me.

func (*CreateUserFromAuth0UserMeMeMutationRegisterUserMe) GetOrganizations

GetOrganizations returns CreateUserFromAuth0UserMeMeMutationRegisterUserMe.Organizations, and is useful for accessing the field via an interface.

func (*CreateUserFromAuth0UserMeMeMutationRegisterUserMe) GetUser

GetUser returns CreateUserFromAuth0UserMeMeMutationRegisterUserMe.User, and is useful for accessing the field via an interface.

func (*CreateUserFromAuth0UserMeMeMutationRegisterUserMe) MarshalJSON

func (*CreateUserFromAuth0UserMeMeMutationRegisterUserMe) UnmarshalJSON

type CreateUserFromAuth0UserResponse

type CreateUserFromAuth0UserResponse struct {
	// Operate on the current logged-in user
	Me CreateUserFromAuth0UserMeMeMutation `json:"me"`
}

CreateUserFromAuth0UserResponse is returned by CreateUserFromAuth0User on success.

func CreateUserFromAuth0User

func CreateUserFromAuth0User(
	ctx_ context.Context,
	client_ graphql.Client,
) (*CreateUserFromAuth0UserResponse, error)

func (*CreateUserFromAuth0UserResponse) GetMe

GetMe returns CreateUserFromAuth0UserResponse.Me, and is useful for accessing the field via an interface.

type MeFields

type MeFields struct {
	// The logged-in user details.
	User MeFieldsUser `json:"user"`
	// The organizations to which the current logged-in user belongs.
	Organizations []MeFieldsOrganizationsOrganization `json:"organizations"`
}

MeFields includes the GraphQL fields of Me requested by the fragment MeFields.

func (*MeFields) GetOrganizations

func (v *MeFields) GetOrganizations() []MeFieldsOrganizationsOrganization

GetOrganizations returns MeFields.Organizations, and is useful for accessing the field via an interface.

func (*MeFields) GetUser

func (v *MeFields) GetUser() MeFieldsUser

GetUser returns MeFields.User, and is useful for accessing the field via an interface.

type MeFieldsOrganizationsOrganization

type MeFieldsOrganizationsOrganization struct {
	Id string `json:"id"`
}

MeFieldsOrganizationsOrganization includes the requested fields of the GraphQL type Organization.

func (*MeFieldsOrganizationsOrganization) GetId

GetId returns MeFieldsOrganizationsOrganization.Id, and is useful for accessing the field via an interface.

type MeFieldsUser

type MeFieldsUser struct {
	Id    string `json:"id"`
	Email string `json:"email"`
	Name  string `json:"name"`
}

MeFieldsUser includes the requested fields of the GraphQL type User.

func (*MeFieldsUser) GetEmail

func (v *MeFieldsUser) GetEmail() string

GetEmail returns MeFieldsUser.Email, and is useful for accessing the field via an interface.

func (*MeFieldsUser) GetId

func (v *MeFieldsUser) GetId() string

GetId returns MeFieldsUser.Id, and is useful for accessing the field via an interface.

func (*MeFieldsUser) GetName

func (v *MeFieldsUser) GetName() string

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

type SendCLITelemetryResponse added in v1.0.11

type SendCLITelemetryResponse struct {
	SendCLITelemetries bool `json:"sendCLITelemetries"`
}

SendCLITelemetryResponse is returned by SendCLITelemetry on success.

func SendCLITelemetry added in v1.0.11

func SendCLITelemetry(
	ctx_ context.Context,
	client_ graphql.Client,
	telemetry CLITelemetry,
) (*SendCLITelemetryResponse, error)

func (*SendCLITelemetryResponse) GetSendCLITelemetries added in v1.0.11

func (v *SendCLITelemetryResponse) GetSendCLITelemetries() bool

GetSendCLITelemetries returns SendCLITelemetryResponse.SendCLITelemetries, 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