Documentation ¶
Index ¶
- Variables
- func GetConsoleApiToken(console, port string) (string, error)
- func IsConsoleAgent(url string) bool
- func NewInjectorTransport[T AccessInjectorTransport | RefreshInjectorTransport](shared_header *ThreadSafeTokens, org *http.Transport) *T
- func StartStreamingDelta(ctx context.Context, cfg StreamingConfig, url, port, apiToken string, ...) error
- type AccessInjectorTransport
- type OpenapiHttpClient
- func (cl *OpenapiHttpClient) APITokenAuthenticate(api_token string) error
- func (client *OpenapiHttpClient) Client() *openapi.APIClient
- func (ohc *OpenapiHttpClient) Close()
- func (cl *OpenapiHttpClient) DumpTokens() (access string, refresh string)
- func (cl *OpenapiHttpClient) SetTokens(access string, refresh string)
- type RefreshInjectorTransport
- type StreamingConfig
- type ThreadSafeTokens
Constants ¶
This section is empty.
Variables ¶
View Source
var (
AuthError = errors.New("Authentication error")
)
Functions ¶
func GetConsoleApiToken ¶
func IsConsoleAgent ¶
func NewInjectorTransport ¶
func NewInjectorTransport[T AccessInjectorTransport | RefreshInjectorTransport](shared_header *ThreadSafeTokens, org *http.Transport) *T
func StartStreamingDelta ¶
func StartStreamingDelta(ctx context.Context, cfg StreamingConfig, url, port, apiToken string, callback func(bool, []openapi.ModelNodeIdentifier), onErrorCallback func(error)) error
Types ¶
type AccessInjectorTransport ¶
type AccessInjectorTransport struct {
// contains filtered or unexported fields
}
type OpenapiHttpClient ¶
type OpenapiHttpClient struct {
// contains filtered or unexported fields
}
func NewHttpsConsoleClient ¶
func NewHttpsConsoleClient(url, port string) *OpenapiHttpClient
Client is not thread safe.
func (*OpenapiHttpClient) APITokenAuthenticate ¶
func (cl *OpenapiHttpClient) APITokenAuthenticate(api_token string) error
func (*OpenapiHttpClient) Client ¶
func (client *OpenapiHttpClient) Client() *openapi.APIClient
func (*OpenapiHttpClient) Close ¶
func (ohc *OpenapiHttpClient) Close()
func (*OpenapiHttpClient) DumpTokens ¶
func (cl *OpenapiHttpClient) DumpTokens() (access string, refresh string)
func (*OpenapiHttpClient) SetTokens ¶
func (cl *OpenapiHttpClient) SetTokens(access string, refresh string)
type RefreshInjectorTransport ¶
type RefreshInjectorTransport struct {
// contains filtered or unexported fields
}
type StreamingConfig ¶
type ThreadSafeTokens ¶
type ThreadSafeTokens struct {
// contains filtered or unexported fields
}
func NewThreadSafeTokens ¶
func NewThreadSafeTokens() *ThreadSafeTokens
func (*ThreadSafeTokens) HasExpired ¶
func (tst *ThreadSafeTokens) HasExpired() bool
Click to show internal directories.
Click to hide internal directories.