Documentation
¶
Index ¶
- Constants
- func GetCachePath() (string, error)
- func GetClientFromCache() (*client.TygerClient, error)
- func InvokePageRequests[T any](ctx context.Context, uri string, limit int, warnIfTruncated bool) error
- func InvokeRequest(ctx context.Context, method string, relativeUri string, input interface{}, ...) (*http.Response, error)
- func Login(ctx context.Context, options LoginConfig) (*client.TygerClient, error)
- func Logout() error
- func NormalizeServerUri(uri string) (*url.URL, error)
- type InvokeRequestOptionFunc
- type InvokeRequestOptions
- type LoginConfig
Constants ¶
View Source
const ( CacheFileEnvVarName = "TYGER_CACHE_FILE" LocalUriSentinel = "local" )
Variables ¶
This section is empty.
Functions ¶
func GetCachePath ¶
func GetClientFromCache ¶
func GetClientFromCache() (*client.TygerClient, error)
func InvokePageRequests ¶
func InvokeRequest ¶
func Login ¶
func Login(ctx context.Context, options LoginConfig) (*client.TygerClient, error)
Types ¶
type InvokeRequestOptionFunc ¶
type InvokeRequestOptionFunc func(*InvokeRequestOptions)
func WithHeaders ¶
func WithHeaders(headers http.Header) InvokeRequestOptionFunc
func WithLeaveResponseOpen ¶
func WithLeaveResponseOpen() InvokeRequestOptionFunc
type InvokeRequestOptions ¶
type LoginConfig ¶
type LoginConfig struct { ServerUri string `json:"serverUri"` ServicePrincipal string `json:"servicePrincipal,omitempty"` CertificatePath string `json:"certificatePath,omitempty"` CertificateThumbprint string `json:"certificateThumbprint,omitempty"` Proxy string `json:"proxy,omitempty"` DisableTlsCertificateValidation bool `json:"disableTlsCertificateValidation,omitempty"` // These are options for tyger-proxy that are ignored here but we don't want unmarshal to fail if present Port int `json:"port,omitempty"` AllowedClientCIDRs []string `json:"allowedClientCIDRs,omitempty"` LogPath string `json:"logPath,omitempty"` UseDeviceCode bool `json:"-"` Persisted bool `json:"-"` }
Click to show internal directories.
Click to hide internal directories.