basictypes

package
v7.6.7 Latest Latest
Warning

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

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

Documentation

Overview

Package basictypes contains types and constants that are used by multiple Relay packages and do not have any testable logic of their own.

Putting such things here, instead of in one of the packages that use them, allows us to reference them in shared test code as well without causing import cycles if those other packages also use the shared test code. It also provides a convenient way to see basic characteristics of Relay's internal model.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SDKKind

type SDKKind string

SDKKind represents any of the supported SDK categories that has distinct behavior from the others.

const (
	// ServerSDK represents server-side SDKs, which use server-side endpoints and authenticate their requests
	// with an SDK key.
	ServerSDK SDKKind = "server"

	// MobileSDK represents mobile SDKs, which use mobile endpoints and authenticate their requests with a
	// mobile key.
	MobileSDK SDKKind = "mobile"

	// JSClientSDK represents client-side JavaScript-based SDKs, which use client-side endpoints and
	// authenticate their requests insecurely with an environment ID.
	JSClientSDK SDKKind = "js"
)

type StreamKind

type StreamKind string

StreamKind is an enum-like type of the supported kinds of SDK streaming endpoint. This is different from basictypes.SDKKind because there are more kinds of streams than there are kinds of SDKs (server-side SDKs have two streams).

const (
	// ServerSideStream represents the server-side SDK "/all" endpoint, which is used by all current
	// server-side SDK versions.
	ServerSideStream StreamKind = "server"

	// ServerSideFlagsOnlyStream represents the server-side SDK "/flags" endpoint, which is used only
	// by old SDKs that do not support segments.
	ServerSideFlagsOnlyStream StreamKind = "server-flags"

	// MobilePingStream represents the mobile streaming endpoints, which will generate only "ping" events.
	MobilePingStream StreamKind = "mobile-ping"

	// JSClientPingStream represents the JS client-side streaming endpoints, which will generate only
	// "ping" events. This is identical to MobilePingStream except that it only handles requests
	// authenticated with an environment ID.
	JSClientPingStream StreamKind = "js-ping"
)

Jump to

Keyboard shortcuts

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