Movatterモバイル変換


[0]ホーム

URL:


api

package
v1.5.1Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2025 License:GPL-3.0Imports:37Imported by:0

Details

Repository

github.com/slingdata-io/sling-cli

Links

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (FetchSpec = func(_string) (string,error) {return "",g.Error("please use the official sling-cli release for fetching API specs")})

Functions

This section is empty.

Types

typeAPIConnection

type APIConnection struct {NamestringSpecSpecState   *APIStateContext *g.Context// contains filtered or unexported fields}

funcNewAPIConnection

func NewAPIConnection(ctxcontext.Context, specSpec, data map[string]any) (ac *APIConnection, errerror)

NewAPIConnection creates an

func (*APIConnection)Authenticate

func (ac *APIConnection) Authenticate() (errerror)

Authenticate performs the auth workflow if needed. Like a Connect step.Header based auths (such as Basic, or Bearer) don't need this stepsave payload in APIState.Auth

func (*APIConnection)Close

func (ac *APIConnection) Close()error

Close performs cleanup of all resources

func (*APIConnection)CloseAllQueues

func (ac *APIConnection) CloseAllQueues()

CloseAllQueues closes all queues associated with this connection

func (*APIConnection)CompileEndpointsadded inv1.4.25

func (ac *APIConnection) CompileEndpoints() (compiledEndpointsEndpoints, errerror)

compile all spec endpoints

func (*APIConnection)EnsureAuthenticatedadded inv1.4.14

func (ac *APIConnection) EnsureAuthenticated()error

EnsureAuthenticated checks if authentication is valid and re-authenticates if neededThis method ensures thread-safe authentication checks and re-authentication

func (*APIConnection)GetQueue

func (ac *APIConnection) GetQueue(namestring) (*iop.Queue,bool)

GetQueue retrieves a queue by name

func (*APIConnection)GetReplicationStoreadded inv1.4.20

func (ac *APIConnection) GetReplicationStore() (store map[string]any)

func (*APIConnection)GetSyncedState

func (ac *APIConnection) GetSyncedState(endpointNamestring) (data map[string]any, errerror)

GetSyncedState cycles through each endpoint, and collects the valuesfor each of the Endpoint.Sync values. Output is amap[Sync.value] = Endpoint.syncMap[Sync.value]

func (*APIConnection)IsAuthExpiredadded inv1.4.14

func (ac *APIConnection) IsAuthExpired()bool

IsAuthExpired checks if the authentication has expired

func (*APIConnection)ListEndpoints

func (ac *APIConnection) ListEndpoints(patterns ...string) (endpointsEndpoints, errerror)

func (*APIConnection)MakeAuthenticatoradded inv1.4.25

func (ac *APIConnection) MakeAuthenticator() (authenticatorAuthenticator, errerror)

func (*APIConnection)PutSyncedState

func (ac *APIConnection) PutSyncedState(endpointNamestring, data map[string]any) (errerror)

PutSyncedState restores the state from previous run in each endpointusing the Endpoint.Sync values.Inputs is map[Sync.value] = Endpoint.syncMap[Sync.value]

func (*APIConnection)ReadDataflow

func (ac *APIConnection) ReadDataflow(endpointNamestring, sCfgAPIStreamConfig) (df *iop.Dataflow, errerror)

func (*APIConnection)RegisterQueue

func (ac *APIConnection) RegisterQueue(namestring) (*iop.Queue,error)

RegisterQueue creates a new queue with the given nameIf a queue with the same name already exists, it is returned

func (*APIConnection)RemoveQueue

func (ac *APIConnection) RemoveQueue(namestring)error

RemoveQueue closes and removes a queue

func (*APIConnection)RenderDynamicEndpointsadded inv1.4.14

func (ac *APIConnection) RenderDynamicEndpoints() (errerror)

RenderDynamicEndpoints will render the dynamic objectsbasically mutating the spec endpoints.Needs to authenticate first

func (*APIConnection)SetReplicationStoreadded inv1.4.20

func (ac *APIConnection) SetReplicationStore(store map[string]any)

typeAPIState

type APIState struct {Env     map[string]string     `json:"env,omitempty"`State   map[string]any        `json:"state,omitempty"`Store   map[string]any        `json:"store,omitempty"`Inputs  map[string]any        `json:"inputs,omitempty"`Secrets map[string]any        `json:"secrets,omitempty"`Queues  map[string]*iop.Queue `json:"queues,omitempty"`// appends to fileAuthAPIStateAuth          `json:"auth,omitempty"`}

typeAPIStateAuth

type APIStateAuth struct {Authenticatedbool              `json:"authenticated,omitempty"`Tokenstring            `json:"token,omitempty"`// refresh token?Headers       map[string]string `json:"-"`// to injectExpiresAtint64             `json:"expires_at,omitempty"`// Unix timestamp when auth expiresSign  func(*Iteration, *http.Request, []byte)error `json:"-"`// for AWS Sigv4, HMACMutex *sync.Mutex                                   `json:"-" yaml:"-"`// Mutex for auth operations}

typeAPIStreamConfig

type APIStreamConfig struct {Flattenint// levels of flattening. 0 is infiniteJmesPathstringSelect      []string// select specific columnsLimitintMetadataiop.MetadataModestringRangestringDsConfigMap map[string]any// stream processor options}

typeAggregateState

type AggregateState struct {// contains filtered or unexported fields}

AggregateState stores aggregated values during response processing

funcNewAggregateStateadded inv1.5.1

func NewAggregateState()AggregateState

typeAggregationType

type AggregationTypestring
const (AggregationTypeNoneAggregationType = ""// No aggregation, apply transformation at record levelAggregationTypeMaximumAggregationType = "maximum"// Keep the maximum value across recordsAggregationTypeMinimumAggregationType = "minimum"// Keep the minimum value across recordsAggregationTypeCollectAggregationType = "collect"// Collect all values into an arrayAggregationTypeFirstAggregationType = "first"// Keep only the first encountered valueAggregationTypeLastAggregationType = "last"// Keep only the last encountered value)

typeAuthType

type AuthTypestring
const (AuthTypeNoneAuthType = ""AuthTypeStaticAuthType = "static"AuthTypeSequenceAuthType = "sequence"AuthTypeBasicAuthType = "basic"AuthTypeOAuth2AuthType = "oauth2"AuthTypeAWSSigV4AuthType = "aws-sigv4"AuthTypeHMACAuthType = "hmac"AuthTypeMTlsAuthType = "mtls")

func (AuthType)Stringadded inv1.4.25

func (atAuthType) String()string

typeAuthentication

type Authentication map[string]any

func (Authentication)Expiresadded inv1.4.14

func (aAuthentication) Expires()int

func (Authentication)Type

func (aAuthentication) Type()AuthType

typeAuthenticatoradded inv1.4.25

type Authenticator interface {AuthType()AuthTypeAuthenticate(ctxcontext.Context, state *APIStateAuth)errorRefresh(ctxcontext.Context, state *APIStateAuth)error}

typeAuthenticatorAWSSigV4added inv1.4.25

type AuthenticatorAWSSigV4 struct {AuthenticatorBaseAwsServicestring `yaml:"aws_service,omitempty" json:"aws_service,omitempty"`AwsAccessKeyIDstring `yaml:"aws_access_key_id,omitempty" json:"aws_access_key_id,omitempty"`AwsSecretAccessKeystring `yaml:"aws_secret_access_key,omitempty" json:"aws_secret_access_key,omitempty"`AwsSessionTokenstring `yaml:"aws_session_token,omitempty" json:"aws_session_token,omitempty"`AwsRegionstring `yaml:"aws_region,omitempty" json:"aws_region,omitempty"`AwsProfilestring `yaml:"aws_profile,omitempty" json:"aws_profile,omitempty"`}

/////////////////////////////////////////////////////////////////////////////////////////AuthenticatorAWSSigV4

func (*AuthenticatorAWSSigV4)Authenticateadded inv1.4.25

func (a *AuthenticatorAWSSigV4) Authenticate(ctxcontext.Context, state *APIStateAuth) (errerror)

typeAuthenticatorBaseadded inv1.4.25

type AuthenticatorBase struct {TypeAuthType `yaml:"type" json:"type"`Expiresint      `yaml:"expires" json:"expires,omitempty"`// when set, re-auth after number of seconds// contains filtered or unexported fields}

/////////////////////////////////////////////////////////////////////////////////////////AuthenticatorBase

func (*AuthenticatorBase)AuthTypeadded inv1.4.25

func (a *AuthenticatorBase) AuthType()AuthType

func (*AuthenticatorBase)Authenticateadded inv1.4.25

func (a *AuthenticatorBase) Authenticate(ctxcontext.Context, state *APIStateAuth) (errerror)

func (*AuthenticatorBase)Refreshadded inv1.4.25

func (a *AuthenticatorBase) Refresh(ctxcontext.Context, state *APIStateAuth) (errerror)

typeAuthenticatorBasicadded inv1.4.25

type AuthenticatorBasic struct {AuthenticatorBaseUsernamestring `yaml:"username,omitempty" json:"username,omitempty"`Passwordstring `yaml:"password,omitempty" json:"password,omitempty"`}

/////////////////////////////////////////////////////////////////////////////////////////AuthenticatorBasic

func (*AuthenticatorBasic)Authenticateadded inv1.4.25

func (a *AuthenticatorBasic) Authenticate(ctxcontext.Context, state *APIStateAuth) (errerror)

typeAuthenticatorHMACadded inv1.4.25

type AuthenticatorHMAC struct {AuthenticatorBaseAlgorithmstring            `yaml:"algorithm" json:"algorithm"`Secretstring            `yaml:"secret" json:"secret"`SigningStringstring            `yaml:"signing_string" json:"signing_string"`ReqHeaders    map[string]string `yaml:"request_headers" json:"request_headers"`NonceLengthint               `yaml:"nonce_length" json:"nonce_length,omitempty"`// Length of random nonce bytes (0 to disable)}

/////////////////////////////////////////////////////////////////////////////////////////AuthenticatorHMAC

func (*AuthenticatorHMAC)Authenticateadded inv1.4.25

func (a *AuthenticatorHMAC) Authenticate(ctxcontext.Context, state *APIStateAuth) (errerror)

typeAuthenticatorOAuth2added inv1.4.25

type AuthenticatorOAuth2 struct {AuthenticatorBaseClientIDstring    `yaml:"client_id,omitempty" json:"client_id,omitempty"`ClientSecretstring    `yaml:"client_secret,omitempty" json:"client_secret,omitempty"`RedirectURIstring    `yaml:"redirect_uri,omitempty" json:"redirect_uri,omitempty"`AuthenticationURLstring    `yaml:"authentication_url,omitempty" json:"authentication_url,omitempty"`// Token endpointAuthorizationURLstring    `yaml:"authorization_url,omitempty" json:"authorization_url,omitempty"`// Auth endpointDeviceAuthURLstring    `yaml:"device_auth_url,omitempty" json:"device_auth_url,omitempty"`// Device auth endpoint (optional)Scopes            []string  `yaml:"scopes,omitempty" json:"scopes,omitempty"`FlowOAuthFlow `yaml:"flow,omitempty" json:"flow,omitempty"`// e.g., "authorization_code", "client_credentials", "device_code"}

/////////////////////////////////////////////////////////////////////////////////////////AuthenticatorOAuth2

func (*AuthenticatorOAuth2)Authenticateadded inv1.4.25

func (a *AuthenticatorOAuth2) Authenticate(ctxcontext.Context, state *APIStateAuth) (errerror)

Authenticate performs OAuth2 authentication based on the configured flow.

func (*AuthenticatorOAuth2)LoadTokenadded inv1.4.25

func (a *AuthenticatorOAuth2) LoadToken() (*oauth2.Token,error)

LoadToken loads the stored token.

func (*AuthenticatorOAuth2)SaveTokenadded inv1.4.25

func (a *AuthenticatorOAuth2) SaveToken(tok *oauth2.Token)error

SaveToken securely saves the token (use keyring for better security).

func (*AuthenticatorOAuth2)TokenFileadded inv1.4.25

func (a *AuthenticatorOAuth2) TokenFile()string

TokenFile returns a secure path for token storage.

typeAuthenticatorSequenceadded inv1.4.25

type AuthenticatorSequence struct {AuthenticatorBaseSequenceSequence `yaml:"sequence" json:"sequence,omitempty"`}

/////////////////////////////////////////////////////////////////////////////////////////AuthenticatorSequence

func (*AuthenticatorSequence)Authenticateadded inv1.4.25

func (a *AuthenticatorSequence) Authenticate(ctxcontext.Context, state *APIStateAuth) (errerror)

typeAuthenticatorStaticadded inv1.5.1

type AuthenticatorStatic struct {AuthenticatorBaseHeaders map[string]string `yaml:"headers,omitempty" json:"headers,omitempty"`}

/////////////////////////////////////////////////////////////////////////////////////////AuthenticatorStatic

func (*AuthenticatorStatic)Authenticateadded inv1.5.1

func (a *AuthenticatorStatic) Authenticate(ctxcontext.Context, state *APIStateAuth) (errerror)

typeBackoffType

type BackoffTypestring
const (BackoffTypeNoneBackoffType = ""// No delay between retriesBackoffTypeConstantBackoffType = "constant"// Fixed delay between retriesBackoffTypeLinearBackoffType = "linear"// Delay increases linearly with each attemptBackoffTypeExponentialBackoffType = "exponential"// Delay increases exponentially (common pattern)BackoffTypeJitterBackoffType = "jitter"// Exponential backoff with randomization to avoid thundering herd)

typeCall

type Call struct {Ifstring          `yaml:"if" json:"if"`RequestRequest         `yaml:"request" json:"request"`PaginationPagination      `yaml:"pagination" json:"pagination"`ResponseResponse        `yaml:"response" json:"response"`Authentication *Authentication `yaml:"authentication,omitempty" json:"authentication,omitempty"`Iteratestring          `yaml:"iterate" json:"iterate"`Intostring          `yaml:"into" json:"into"`}

typeDynamicEndpointadded inv1.4.14

type DynamicEndpoint struct {SetupSequence `yaml:"setup" json:"setup"`Iteratestring   `yaml:"iterate" json:"iterate"`Intostring   `yaml:"into" json:"into"`EndpointEndpoint `yaml:"endpoint" json:"endpoint"`}

typeDynamicEndpointsadded inv1.4.14

type DynamicEndpoints []DynamicEndpoint

typeEndpoint

type Endpoint struct {Namestring     `yaml:"name" json:"name"`Descriptionstring     `yaml:"description" json:"description,omitempty"`Docsstring     `yaml:"docs" json:"docs,omitempty"`Disabledbool       `yaml:"disabled" json:"disabled"`Dynamicbool       `yaml:"dynamic,omitempty" json:"dynamic,omitempty"`// is generatedStateStateMap   `yaml:"state" json:"state"`Sync        []string   `yaml:"sync" json:"sync,omitempty"`RequestRequest    `yaml:"request" json:"request"`PaginationPagination `yaml:"pagination" json:"pagination"`ResponseResponse   `yaml:"response" json:"response"`IterateIterate    `yaml:"iterate" json:"iterate,omitempty"`// state expression to use to loopSetupSequence   `yaml:"setup" json:"setup,omitempty"`TeardownSequence   `yaml:"teardown" json:"teardown,omitempty"`DependsOn   []string   `yaml:"depends_on" json:"depends_on"`// upstream endpointsOverridesany        `yaml:"overrides" json:"overrides"`// stream overridesAuthentication *Authentication `yaml:"authentication,omitempty" json:"authentication,omitempty"`// contains filtered or unexported fields}

Endpoint is the top-level configuration structure

func (*Endpoint)Authenticateadded inv1.5.1

func (ep *Endpoint) Authenticate() (errerror)

Authenticate performs the auth workflow if needed. Like a Connect step.Header based auths (such as Basic, or Bearer) don't need this stepsave payload in APIState.Auth

func (*Endpoint)EnsureAuthenticatedadded inv1.5.1

func (ep *Endpoint) EnsureAuthenticated()error

func (*Endpoint)Evaluateadded inv1.4.25

func (ep *Endpoint) Evaluate(exprstring, state map[string]interface{}) (resultany, errerror)

func (*Endpoint)IsAuthExpiredadded inv1.5.1

func (ep *Endpoint) IsAuthExpired()bool

IsAuthExpired checks if the authentication has expired

func (*Endpoint)MakeAuthenticatoradded inv1.5.1

func (ep *Endpoint) MakeAuthenticator() (authenticatorAuthenticator, errerror)

func (*Endpoint)SetStateVal

func (ep *Endpoint) SetStateVal(keystring, valany)

func (*Endpoint)UnmarshalYAMLadded inv1.5.1

func (ep *Endpoint) UnmarshalYAML(unmarshal func(interface{})error)error

UnmarshalYAML handles +setup/setup+ and +teardown/teardown+ modifier syntax for Endpoint

typeEndpointMap

type EndpointMap map[string]Endpoint

Endpoints is a collection of API endpoints

typeEndpoints

type Endpoints []Endpoint

func (Endpoints)DAGadded inv1.4.23

func (epsEndpoints) DAG() [][]string

DAG returns groups of interdependent endpoints

func (Endpoints)HasUpstreamsadded inv1.4.23

func (epsEndpoints) HasUpstreams(endpointNamestring) (upstreams []string)

HasUpstreams returns all upstream endpoint names that the specified endpoint depends on.Returns empty slice if the endpoint doesn't exist or has no dependencies.

func (Endpoints)Namesadded inv1.4.23

func (epsEndpoints) Names() (names []string)

Names returns names in alphabetical order

func (Endpoints)Sort

func (epsEndpoints) Sort()

typeHTTPMethod

type HTTPMethodstring
const (MethodGetHTTPMethod = "GET"MethodHeadHTTPMethod = "HEAD"MethodPostHTTPMethod = "POST"MethodPutHTTPMethod = "PUT"MethodPatchHTTPMethod = "PATCH"MethodDeleteHTTPMethod = "DELETE"MethodConnectHTTPMethod = "CONNECT"MethodOptionsHTTPMethod = "OPTIONS"MethodTraceHTTPMethod = "TRACE")

typeIterate

type Iterate struct {Overany    `yaml:"over" json:"iterate,omitempty"`// expressionIntostring `yaml:"into" json:"into,omitempty"`// state variableConcurrencyint    `yaml:"concurrency" json:"concurrency,omitempty"`// contains filtered or unexported fields}

Iterate is for configuring looping values for requests

typeIteration

type Iteration struct {// contains filtered or unexported fields}

func (*Iteration)Debugadded inv1.4.20

func (iter *Iteration) Debug(textstring, args ...any)

func (*Iteration)DetermineStateRenderOrderadded inv1.4.14

func (iter *Iteration) DetermineStateRenderOrder() (order []string, errerror)

typeOAuthFlowadded inv1.4.14

type OAuthFlowstring
const (OAuthFlowClientCredentialsOAuthFlow = "client_credentials"OAuthFlowAuthorizationCodeOAuthFlow = "authorization_code"OAuthFlowDeviceCodeOAuthFlow = "device_code")

typePagination

type Pagination struct {NextState     map[string]any `yaml:"next_state" json:"next_state,omitempty"`StopConditionstring         `yaml:"stop_condition" json:"stop_condition,omitempty"`}

Pagination configures how to navigate through multiple pages of API results

typeProcessor

type Processor struct {AggregationAggregationType `yaml:"aggregation" json:"aggregation"`Expressionstring          `yaml:"expression" json:"expression"`Outputstring          `yaml:"output" json:"output"`Ifstring          `yaml:"if" json:"if,omitempty"`// if we should evaluate processor}

Processor represents a way to process datawithout aggregation, represents a transformation applied at record levelwith aggregation to reduce/aggregate record data, and save into the state

typeRecords

type Records struct {JmesPathstring   `yaml:"jmespath" json:"jmespath,omitempty"`// for json or xmlPrimaryKey []string `yaml:"primary_key" json:"primary_key,omitempty"`UpdateKeystring   `yaml:"update_key" json:"update_key,omitempty"`Limitint      `yaml:"limit" json:"limit,omitempty"`// to limit the records, useful for testingCasingstring   `yaml:"casing" json:"casing,omitempty"`// "snake" or "camel"Select     []string `yaml:"select" json:"select,omitempty"`// include/exclude/renameDuplicateTolerancestring `yaml:"duplicate_tolerance" json:"duplicate_tolerance,omitempty"`}

Records configures how to extract and process data records from a response

typeRequest

type Request struct {URLstring         `yaml:"url" json:"url,omitempty"`Timeoutint            `yaml:"timeout" json:"timeout,omitempty"`MethodHTTPMethod     `yaml:"method" json:"method,omitempty"`Headers     map[string]any `yaml:"headers" json:"headers,omitempty"`Parameters  map[string]any `yaml:"parameters" json:"parameters,omitempty"`Payloadany            `yaml:"payload" json:"payload,omitempty"`Ratefloat64        `yaml:"rate" json:"rate,omitempty"`// maximum request per secondConcurrencyint            `yaml:"concurrency" json:"concurrency,omitempty"`// maximum concurrent requests}

Request defines how to construct an HTTP request to the API

typeRequestState

type RequestState struct {Methodstring         `yaml:"method" json:"method"`URLstring         `yaml:"url" json:"url"`Headers  map[string]any `yaml:"headers" json:"headers"`Payloadany            `yaml:"payload" json:"payload"`Attemptsint            `yaml:"attempts" json:"attempts"`}

RequestState captures the state of the HTTP request for reference and debugging

typeResponse

type Response struct {Formatdbio.FileType `yaml:"format" json:"format,omitempty"`// force response formatRecordsRecords       `yaml:"records" json:"records"`Processors []Processor   `yaml:"processors" json:"processors,omitempty"`Rules      []Rule        `yaml:"rules" json:"rules,omitempty"`// Modifier fields for prepending/appending to defaults (populated by custom unmarshal)// Use +rules to prepend rules (evaluated before defaults)// Use rules+ to append rules (evaluated after defaults, before hardcoded)PrependRules      []Rule      `yaml:"-" json:"-"`AppendRules       []Rule      `yaml:"-" json:"-"`PrependProcessors []Processor `yaml:"-" json:"-"`AppendProcessors  []Processor `yaml:"-" json:"-"`}

Response defines how to process the API response and extract records

func (*Response)UnmarshalYAMLadded inv1.5.1

func (r *Response) UnmarshalYAML(unmarshal func(interface{})error)error

UnmarshalYAML handles +rules/rules+ and +processors/processors+ modifier syntax

typeResponseState

type ResponseState struct {Statusint              `yaml:"status" json:"status"`Headers map[string]any   `yaml:"headers" json:"headers"`Textstring           `yaml:"text" json:"text"`JSONany              `yaml:"json" json:"json"`Records []map[string]any `yaml:"records" json:"records"`}

ResponseState captures the state of the HTTP response for reference and debugging

typeRule

type Rule struct {ActionRuleType    `yaml:"action" json:"action"`Conditionstring      `yaml:"condition" json:"condition"`// an expressionMaxAttemptsint         `yaml:"max_attempts" json:"max_attempts"`BackoffBackoffType `yaml:"backoff" json:"backoff"`BackoffBaseint         `yaml:"backoff_base" json:"backoff_base"`// base duration, number of seconds. default is 1Messagestring      `yaml:"message" json:"message"`}

Rule represents a response rule

typeRuleType

type RuleTypestring
const (RuleTypeRetryRuleType = "retry"// Retry the request up to MaxAttempts timesRuleTypeContinueRuleType = "continue"// Continue processing responses and rulesRuleTypeStopRuleType = "stop"// Stop processing requests for this endpointRuleTypeBreakRuleType = "break"// Stop processing requests for this iterationRuleTypeFailRuleType = "fail"// Stop processing and return an errorRuleTypeSkipRuleType = "skip"// Skip records from response and continue)

typeSequenceadded inv1.4.14

type Sequence []Call

Sequence is many calls (perfect for async jobs, custom auth)

typeSingleRequest

type SingleRequest struct {Request  *RequestState  `yaml:"request" json:"request"`Response *ResponseState `yaml:"response" json:"response"`// contains filtered or unexported fields}

SingleRequest represents a single HTTP request/response cycle

funcNewSingleRequest

func NewSingleRequest(iter *Iteration) *SingleRequest

func (*SingleRequest)Debug

func (lrs *SingleRequest) Debug(textstring, args ...any)

func (*SingleRequest)Map

func (lrs *SingleRequest) Map() map[string]any

func (*SingleRequest)Records

func (lrs *SingleRequest) Records() []map[string]any

func (*SingleRequest)Traceadded inv1.4.6

func (lrs *SingleRequest) Trace(textstring, args ...any)

typeSpec

type Spec struct {Namestring           `yaml:"name" json:"name"`Descriptionstring           `yaml:"description" json:"description"`Queues           []string         `yaml:"queues" json:"queues"`DefaultsEndpoint         `yaml:"defaults" json:"defaults"`AuthenticationAuthentication   `yaml:"authentication" json:"authentication"`EndpointMapEndpointMap      `yaml:"endpoints" json:"endpoints"`DynamicEndpointsDynamicEndpoints `yaml:"dynamic_endpoints" json:"dynamic_endpoints"`// contains filtered or unexported fields}

Spec defines the complete API specification with endpoints and authentication

funcLoadSpec

func LoadSpec(specBodystring) (specSpec, errerror)

func (*Spec)IsDynamic

func (s *Spec) IsDynamic()bool

func (*Spec)MD5added inv1.5.1

func (s *Spec) MD5()string

typeStateMap

type StateMap map[string]any

StateMap stores the current state of an endpoint's execution

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp