Documentation ¶
Index ¶
- func Bool(v bool) *bool
- func Byte(v byte) *byte
- func FindDeletePostStrategyFunc(ctx context.Context, action *Action, rest *SeederImpl) error
- func FindPatchPostStrategyFunc(ctx context.Context, action *Action, rest *SeederImpl) error
- func FindPostStrategyFunc(ctx context.Context, action *Action, rest *SeederImpl) error
- func FindPutPostStrategyFunc(ctx context.Context, action *Action, rest *SeederImpl) error
- func GetPostStrategyFunc(ctx context.Context, action *Action, rest *SeederImpl) error
- func GetPutPostStrategyFunc(ctx context.Context, action *Action, rest *SeederImpl) error
- func Int(v int) *int
- func NewAuth(am AuthMap) *actionAuthMap
- func NewClientCredentialsGrant(v AuthConfig) *clientcredentials.Config
- func NewPasswordCredentialsGrant(v AuthConfig) *passwordGrantConfig
- func PutPostStrategyFunc(ctx context.Context, action *Action, rest *SeederImpl) error
- func PutStrategyFunc(ctx context.Context, action *Action, rest *SeederImpl) error
- func String(v string) *string
- type Action
- type AuthConfig
- type AuthMap
- type AuthType
- type CMRetrieve
- type CapturedRuntimeVars
- type Client
- type ConfigOAuth
- type CustomFlowAuth
- func (c *CustomFlowAuth) Token(ctx context.Context, client Client, log log.Loggeriface) (CustomTokenResponse, error)
- func (cfa *CustomFlowAuth) WithAuthMap(v KvMapVarsAny) *CustomFlowAuth
- func (cfa *CustomFlowAuth) WithAuthUrl(v string) *CustomFlowAuth
- func (cfa *CustomFlowAuth) WithHeaderKey(v string) *CustomFlowAuth
- func (cfa *CustomFlowAuth) WithResponseKey(v string) *CustomFlowAuth
- func (cfa *CustomFlowAuth) WithSendInHeader(v bool) *CustomFlowAuth
- func (cfa *CustomFlowAuth) WithTokenPrefix(v string) *CustomFlowAuth
- type CustomToken
- type CustomTokenResponse
- type Diagnostic
- type KvMapVarsAny
- type SeederImpl
- func (r *SeederImpl) FindDeletePost(ctx context.Context, action *Action) error
- func (r *SeederImpl) FindPatchPost(ctx context.Context, action *Action) error
- func (r *SeederImpl) FindPathByExpression(resp []byte, pathExpression string) (string, error)
- func (r *SeederImpl) FindPost(ctx context.Context, action *Action) error
- func (r *SeederImpl) FindPutPost(ctx context.Context, action *Action) error
- func (r *SeederImpl) GetPost(ctx context.Context, action *Action) error
- func (r *SeederImpl) GetPutPost(ctx context.Context, action *Action) error
- func (r *SeederImpl) Put(ctx context.Context, action *Action) error
- func (r *SeederImpl) PutPost(ctx context.Context, action *Action) error
- func (r *SeederImpl) RuntimeVars() map[string]any
- func (r *SeederImpl) SetRuntimeVar(key string, val any)
- func (r *SeederImpl) TemplatePayload(payload string, vars KvMapVarsAny) string
- func (r *SeederImpl) WithAuth(a AuthMap) *SeederImpl
- func (r *SeederImpl) WithClient(c Client) *SeederImpl
- type Seeders
- type Status
- type StrategyConfig
- type StrategyFunc
- type StrategyRestSeeder
- func (s *StrategyRestSeeder) Execute(ctx context.Context) error
- func (s *StrategyRestSeeder) WithActions(actions map[string]Action) *StrategyRestSeeder
- func (s *StrategyRestSeeder) WithActionsList(actions []Action) *StrategyRestSeeder
- func (s *StrategyRestSeeder) WithAuth(ra AuthMap) *StrategyRestSeeder
- func (s *StrategyRestSeeder) WithAuthFromList(ra []AuthConfig) *StrategyRestSeeder
- func (s *StrategyRestSeeder) WithConfigManager(configManager CMRetrieve) *StrategyRestSeeder
- func (s *StrategyRestSeeder) WithConfigManagerOptions(configManagerOptions *generator.GenVarsConfig) *StrategyRestSeeder
- func (s *StrategyRestSeeder) WithRestClient(rc Client) *StrategyRestSeeder
- type StrategyType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindDeletePostStrategyFunc ¶
func FindDeletePostStrategyFunc(ctx context.Context, action *Action, rest *SeederImpl) error
FindDeletePostStrategyFunc is useful for when you cannot update a resource but it can be safely destroyed an recreated
func FindPatchPostStrategyFunc ¶
func FindPatchPostStrategyFunc(ctx context.Context, action *Action, rest *SeederImpl) error
FindPatchPostStrategyFunc same as FindPutPostStrategyFunc but uses PATCH instead of PUT
func FindPostStrategyFunc ¶
func FindPostStrategyFunc(ctx context.Context, action *Action, rest *SeederImpl) error
FindPostStrategyFunc strategy calls a GET endpoint and expects a list of items to match against a FilterPathExpre and if item ***FOUND*** it does _NOT_ do a ***POST*** this strategy should be used sparingly and only in cases where the service REST implementation does not support an update of existing item.
func FindPutPostStrategyFunc ¶
func FindPutPostStrategyFunc(ctx context.Context, action *Action, rest *SeederImpl) error
FindPutPostStrategyFunc is useful when the resource Id is unknown i.e. handled by the system. providing a pathExpression will evaluate the response. the pathExpression must not evaluate to an empty string in order to for the PUT to be called else POST will be called as item was not present
func GetPostStrategyFunc ¶
func GetPostStrategyFunc(ctx context.Context, action *Action, rest *SeederImpl) error
GetPostStrategyFunc strategy calls a GET endpoint by an ID and if item ***FOUND*** it does _NOT_ do a ***POST*** this strategy should be used sparingly and only in cases where the service REST implementation does not support an update of existing item.
func GetPutPostStrategyFunc ¶
func GetPutPostStrategyFunc(ctx context.Context, action *Action, rest *SeederImpl) error
GetPutPostStrategyFunc known ID and only know a name or other indicator the pathExpression must not evaluate to an empty string in order to for the PUT to be called else POST will be called as item was not present
func NewClientCredentialsGrant ¶ added in v0.10.0
func NewClientCredentialsGrant(v AuthConfig) *clientcredentials.Config
func NewPasswordCredentialsGrant ¶ added in v0.10.0
func NewPasswordCredentialsGrant(v AuthConfig) *passwordGrantConfig
func PutPostStrategyFunc ¶
func PutPostStrategyFunc(ctx context.Context, action *Action, rest *SeederImpl) error
PutPostStrategyFunc is useful when the resource is created a user specified Id the PUT endpoint DOES NOT support a creation of the resource. PUT should throw a 4XX for the POST fallback to take effect
func PutStrategyFunc ¶
func PutStrategyFunc(ctx context.Context, action *Action, rest *SeederImpl) error
PutStrategyFunc calls a PUT endpoint fails if an error occurs useful when there is a known Id of a resource and PUT supports creation
Types ¶
type Action ¶ added in v0.10.0
type Action struct { Name string `yaml:"name" json:"name"` Strategy string `yaml:"strategy" json:"strategy"` Order *int `yaml:"order,omitempty" json:"order,omitempty"` Endpoint string `yaml:"endpoint" json:"endpoint"` GetEndpointSuffix *string `yaml:"getEndpointSuffix,omitempty" json:"getEndpointSuffix,omitempty"` PostEndpointSuffix *string `yaml:"postEndpointSuffix,omitempty" json:"postEndpointSuffix,omitempty"` PatchEndpointSuffix *string `yaml:"patchEndpointSuffix,omitempty" json:"patchEndpointSuffix,omitempty"` PutEndpointSuffix *string `yaml:"putEndpointSuffix,omitempty" json:"putEndpointSuffix,omitempty"` DeleteEndpointSuffix *string `yaml:"deleteEndpointSuffix,omitempty" json:"deleteEndpointSuffix,omitempty"` FindByJsonPathExpr string `yaml:"findByJsonPathExpr,omitempty" json:"findByJsonPathExpr,omitempty"` PayloadTemplate string `yaml:"payloadTemplate" json:"payloadTemplate"` PatchPayloadTemplate string `yaml:"patchPayloadTemplate,omitempty" json:"patchPayloadTemplate,omitempty"` // +kubebuilder:pruning:PreserveUnknownFields RuntimeVars map[string]string `yaml:"runtimeVars,omitempty" json:"runtimeVars,omitempty"` AuthMapRef string `yaml:"authMapRef" json:"authMapRef"` // +kubebuilder:pruning:PreserveUnknownFields HttpHeaders *map[string]string `yaml:"httpHeaders,omitempty" json:"httpHeaders,omitempty"` // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless // +kubebuilder:validation:Optional Variables KvMapVarsAny `yaml:"variables,omitempty" json:"variables,omitempty"` // contains filtered or unexported fields }
+k8s:deepcopy-gen=true +kubebuilder:object:generate=true
Action defines the single action to make agains an endpoint and selecting a strategy
Endpoint is the base url to make the requests against GetEndpointSuffix can be used to specify a direct ID or query params PostEndpointSuffix RuntimeVars should include a Json Path Expression eg. myRuntimeVar: "$.bar"
func (*Action) DeepCopy ¶ added in v0.10.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Action.
func (*Action) DeepCopyInto ¶ added in v0.10.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Action) WithHeader ¶ added in v0.10.0
WithHeader allows the overwrite of default Accept and Content-Type headers both default to `application/json` and adding additional header params on per Action basis. NOTE: each rest call inside the action will inherit the same header
type AuthConfig ¶ added in v0.10.0
type AuthConfig struct { Name string `yaml:"name" json:"name"` // AuthStrategyType must be specified // and conform to the type's enum AuthStrategy AuthType `yaml:"type" json:"type"` // Username must be specified with all AuthTypes // will be ignored for CustomToken // an empty string can be provided in that case Username string `yaml:"username" json:"username"` // Password will be used as client secret in the oauth flows // and in basic flow as well as the StaticToken value in the header. // // Can be provided in a configmanager https://github.com/dnitsch/configmanager#config-tokens format Password string `yaml:"password" json:"password"` OAuth *ConfigOAuth `yaml:"oauth,omitempty" json:"oauth,omitempty"` CustomToken *CustomToken `yaml:"custom,omitempty" json:"custom,omitempty"` }
+k8s:deepcopy-gen=true +kubebuilder:object:generate=true Auth holds the auth strategy for all Seeders
func (*AuthConfig) DeepCopy ¶ added in v0.10.0
func (in *AuthConfig) DeepCopy() *AuthConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthConfig.
func (*AuthConfig) DeepCopyInto ¶ added in v0.10.0
func (in *AuthConfig) DeepCopyInto(out *AuthConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AuthMap ¶ added in v0.10.0
type AuthMap map[string]AuthConfig
+k8s:deepcopy-gen=true +kubebuilder:object:generate=true
func (AuthMap) DeepCopy ¶ added in v0.10.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthMap.
func (AuthMap) DeepCopyInto ¶ added in v0.10.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AuthType ¶ added in v0.10.0
type AuthType string
+kubebuilder:validation:Enum=NoAuth;BasicAuth;OAuthClientCredentials;OAuthPassCredentials;CustomToToken;StaticToken AuthType specifies the type of authentication to perform currently only a single authType per instance is allowed
type CMRetrieve ¶ added in v0.12.0
type CMRetrieve interface {
RetrieveWithInputReplaced(input string, config generator.GenVarsConfig) (string, error)
}
type CapturedRuntimeVars ¶ added in v0.11.4
type CapturedRuntimeVars struct {
// contains filtered or unexported fields
}
Runtime vars captured by JSON path expression from the response
type ConfigOAuth ¶ added in v0.10.0
type ConfigOAuth struct { ServerUrl string `yaml:"serverUrl" json:"serverUrl"` Scopes []string `yaml:"scopes" json:"scopes"` // +kubebuilder:pruning:PreserveUnknownFields EndpointParams map[string][]string `yaml:"endpointParams" json:"endpointParams"` OAuthSendParamsInHeader bool `yaml:"oAuthSendParamsInHeader" json:"oAuthSendParamsInHeader"` // for grant_type=password use these for the addition RO auth ResourceOwnerUser *string `yaml:"resourceOwnerUser,omitempty" json:"resourceOwnerUser,omitempty"` ResourceOwnerPassword *string `yaml:"resourceOwnerPass,omitempty" json:"resourceOwnerPass,omitempty"` }
func (*ConfigOAuth) DeepCopy ¶ added in v0.10.0
func (in *ConfigOAuth) DeepCopy() *ConfigOAuth
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigOAuth.
func (*ConfigOAuth) DeepCopyInto ¶ added in v0.10.0
func (in *ConfigOAuth) DeepCopyInto(out *ConfigOAuth)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CustomFlowAuth ¶ added in v0.10.0
type CustomFlowAuth struct {
// contains filtered or unexported fields
}
func NewCustomFlowAuth ¶ added in v0.10.0
func NewCustomFlowAuth() *CustomFlowAuth
func (*CustomFlowAuth) Token ¶ added in v0.10.0
func (c *CustomFlowAuth) Token(ctx context.Context, client Client, log log.Loggeriface) (CustomTokenResponse, error)
NOTE: for oauth an basicAuthToToken it might make sense to build a in-memory map of tokens to strategy name
func (*CustomFlowAuth) WithAuthMap ¶ added in v0.10.0
func (cfa *CustomFlowAuth) WithAuthMap(v KvMapVarsAny) *CustomFlowAuth
func (*CustomFlowAuth) WithAuthUrl ¶ added in v0.10.0
func (cfa *CustomFlowAuth) WithAuthUrl(v string) *CustomFlowAuth
func (*CustomFlowAuth) WithHeaderKey ¶ added in v0.10.0
func (cfa *CustomFlowAuth) WithHeaderKey(v string) *CustomFlowAuth
WithHeaderKey overwrites the detault `Authorization`
func (*CustomFlowAuth) WithResponseKey ¶ added in v0.10.0
func (cfa *CustomFlowAuth) WithResponseKey(v string) *CustomFlowAuth
WithResponseKey overwrites the default "$.access_token"
func (*CustomFlowAuth) WithSendInHeader ¶ added in v0.10.0
func (cfa *CustomFlowAuth) WithSendInHeader(v bool) *CustomFlowAuth
WithSendInHeader sends custom request in the header
as opposed to a in url encoded form in body POST
func (*CustomFlowAuth) WithTokenPrefix ¶ added in v0.10.0
func (cfa *CustomFlowAuth) WithTokenPrefix(v string) *CustomFlowAuth
WithTokenPrefix overwrites the detault `Bearer`
type CustomToken ¶ added in v0.10.0
type CustomToken struct { // Url to use to POST the customRequest AuthUrl string `yaml:"authUrl" json:"authUrl"` // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless // // holds the K/V credential pair. e.g. // // email: some@one.com // password: pass123 // id: 12312345 // // will post this body or send in header params that payload CustomAuthMap KvMapVarsAny `yaml:"credential" json:"credential"` // whether to send the values in the header as params // defaults to false and CustomAuthMap // is posted in the body as json post SendInHeader bool `yaml:"inHeader,omitempty" json:"inHeader,omitempty"` // +kubebuilder:default="$.access_token" // JSONPath expression to use to get the token from response // // e.g. "$.token" // // empty will take the entire response as the token - raw response must be string ResponseKey string `yaml:"responseKey" json:"responseKey" ` // +kubebuilder:default=Authorization // if omitted `Authorization` will be used // Could be X-API-Token etc.. HeaderKey string `yaml:"headerKey" json:"headerKey"` // +kubebuilder:default=Bearer // Token prefix - if omitted Bearer will be used // e.g. Admin ==> `Authorization: "Admin [TOKEN]"` TokenPrefix string `yaml:"tokenPrefix" json:"tokenPrefix"` }
+k8s:deepcopy-gen=true +kubebuilder:object:generate=true CustomToken stores the required data to call and process custom auth Endpoints returning a token. the token will need to be extracted from the response it will then need adding to subsequent requests in the header under specified key and in specified format
func (*CustomToken) DeepCopy ¶ added in v0.10.0
func (in *CustomToken) DeepCopy() *CustomToken
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomToken.
func (*CustomToken) DeepCopyInto ¶ added in v0.10.0
func (in *CustomToken) DeepCopyInto(out *CustomToken)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CustomTokenResponse ¶ added in v0.10.0
type Diagnostic ¶ added in v0.10.0
type Diagnostic struct { Status int Name string Message string HostPathMethod string ProceedFallback bool IsFatal bool }
func (*Diagnostic) Error ¶ added in v0.10.0
func (d *Diagnostic) Error() string
func (*Diagnostic) WithIsFatal ¶ added in v0.10.0
func (d *Diagnostic) WithIsFatal(v bool) *Diagnostic
func (*Diagnostic) WithMessage ¶ added in v0.10.0
func (d *Diagnostic) WithMessage(m string) *Diagnostic
func (*Diagnostic) WithProceedFallback ¶ added in v0.10.0
func (d *Diagnostic) WithProceedFallback(v bool) *Diagnostic
func (*Diagnostic) WithStatus ¶ added in v0.10.0
func (d *Diagnostic) WithStatus(s int) *Diagnostic
type KvMapVarsAny ¶ added in v0.10.0
+kubebuilder:object:generate=false +k8s:deepcopy-gen=false
NOTE: currently need to generate the below functions manually To allow for both integer or string in x-kubernetes unknown fields
func (*KvMapVarsAny) DeepCopy ¶ added in v0.10.0
func (in *KvMapVarsAny) DeepCopy() *KvMapVarsAny
func (*KvMapVarsAny) DeepCopyInto ¶ added in v0.10.0
func (in *KvMapVarsAny) DeepCopyInto(out *KvMapVarsAny)
type SeederImpl ¶ added in v0.10.0
type SeederImpl struct {
// contains filtered or unexported fields
}
func NewSeederImpl ¶ added in v0.10.0
func NewSeederImpl(log log.Loggeriface) *SeederImpl
func (*SeederImpl) FindDeletePost ¶ added in v0.10.0
func (r *SeederImpl) FindDeletePost(ctx context.Context, action *Action) error
FindDeletePost
func (*SeederImpl) FindPatchPost ¶ added in v0.10.0
func (r *SeederImpl) FindPatchPost(ctx context.Context, action *Action) error
FindPatchPost is same as FindPutPost strategy but uses PATCH
func (*SeederImpl) FindPathByExpression ¶ added in v0.10.0
func (r *SeederImpl) FindPathByExpression(resp []byte, pathExpression string) (string, error)
func (*SeederImpl) FindPost ¶ added in v0.10.0
func (r *SeederImpl) FindPost(ctx context.Context, action *Action) error
FindPost strategy calls a GET endpoint and if item ***FOUND it does NOT do a POST*** this strategy should be used sparingly and only in cases where the service REST implementation does not support an update of existing item.
func (*SeederImpl) FindPutPost ¶ added in v0.10.0
func (r *SeederImpl) FindPutPost(ctx context.Context, action *Action) error
FindPutPost strategy gets an item either by specifying a known ID in the endpoint suffix or by pathExpression. Get can look for a response in an array or in a single response object. once a single item that matches is found and the relevant ID is extracted it will do a PUT else it will do a POST as the item can be created
func (*SeederImpl) GetPost ¶ added in v0.10.0
func (r *SeederImpl) GetPost(ctx context.Context, action *Action) error
GetPost strategy calls a GET endpoint and if item ***FOUND it does NOT do a POST*** this strategy should be used sparingly and only in cases where the service REST implementation does not support an update of existing item.
func (*SeederImpl) GetPutPost ¶ added in v0.10.0
func (r *SeederImpl) GetPutPost(ctx context.Context, action *Action) error
GetPutPost strategy gets an item by specifying a known ID in the endpoint suffix If a non error or non empty response is found it will do a PUT else it will do a POST as the item can be created
func (*SeederImpl) Put ¶ added in v0.10.0
func (r *SeederImpl) Put(ctx context.Context, action *Action) error
Put strategy calls a PUT endpoint if standards compliant this should be an idempotent operation
func (*SeederImpl) PutPost ¶ added in v0.10.0
func (r *SeederImpl) PutPost(ctx context.Context, action *Action) error
Put strategy calls a PUT endpoint if standards compliant this should be an idempotent operation
func (*SeederImpl) RuntimeVars ¶ added in v0.10.0
func (r *SeederImpl) RuntimeVars() map[string]any
func (*SeederImpl) SetRuntimeVar ¶ added in v0.10.0
func (r *SeederImpl) SetRuntimeVar(key string, val any)
func (*SeederImpl) TemplatePayload ¶ added in v0.10.0
func (r *SeederImpl) TemplatePayload(payload string, vars KvMapVarsAny) string
TemplatePayload parses input payload and replaces all $var ${var} with existing global env variable as well as injected from inside RestAction into the local context
func (*SeederImpl) WithAuth ¶ added in v0.10.0
func (r *SeederImpl) WithAuth(a AuthMap) *SeederImpl
WithAuth assigns auth options used by AuthMapRef within the actions
func (*SeederImpl) WithClient ¶ added in v0.10.0
func (r *SeederImpl) WithClient(c Client) *SeederImpl
type Seeders ¶ added in v0.10.0
+k8s:deepcopy-gen=true +kubebuilder:object:generate=true
func (Seeders) DeepCopy ¶ added in v0.10.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Seeders.
func (Seeders) DeepCopyInto ¶ added in v0.10.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StrategyConfig ¶ added in v0.10.0
type StrategyConfig struct { AuthConfig AuthMap `yaml:"auth" json:"auth"` Seeders Seeders `yaml:"seed" json:"seed"` }
+kubebuilder:object:generate=true +k8s:deepcopy-gen=true StrategyConfig defines top level Spec
func (*StrategyConfig) DeepCopy ¶ added in v0.10.0
func (in *StrategyConfig) DeepCopy() *StrategyConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StrategyConfig.
func (*StrategyConfig) DeepCopyInto ¶ added in v0.10.0
func (in *StrategyConfig) DeepCopyInto(out *StrategyConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StrategyFunc ¶
type StrategyFunc func(ctx context.Context, action *Action, rest *SeederImpl) error
type StrategyRestSeeder ¶
type StrategyRestSeeder struct { Strategy map[StrategyType]StrategyFunc // contains filtered or unexported fields }
func New ¶
func New(log log.Loggeriface) *StrategyRestSeeder
New initializes a default StrategySeeder with error log level and os.StdErr as log writer uses standard http.Client as rest client for rest SeederImplementation
func (*StrategyRestSeeder) Execute ¶
func (s *StrategyRestSeeder) Execute(ctx context.Context) error
Execute the built actions list
func (*StrategyRestSeeder) WithActions ¶
func (s *StrategyRestSeeder) WithActions(actions map[string]Action) *StrategyRestSeeder
WithActions builds the actions list empty actions will result in no restActions executing
func (*StrategyRestSeeder) WithActionsList ¶ added in v0.12.0
func (s *StrategyRestSeeder) WithActionsList(actions []Action) *StrategyRestSeeder
WithActionsList same as WithActions but accepts a list
func (*StrategyRestSeeder) WithAuth ¶
func (s *StrategyRestSeeder) WithAuth(ra AuthMap) *StrategyRestSeeder
WithAuth adds the AuthLogic to the entire seeder NOTE: might make more sense to have a per RestAction authTemplate (might make it very inefficient)
func (*StrategyRestSeeder) WithAuthFromList ¶ added in v0.12.0
func (s *StrategyRestSeeder) WithAuthFromList(ra []AuthConfig) *StrategyRestSeeder
WithAuthFromList same as WithAuth but accepts a list
func (*StrategyRestSeeder) WithConfigManager ¶ added in v0.12.0
func (s *StrategyRestSeeder) WithConfigManager(configManager CMRetrieve) *StrategyRestSeeder
WithConfigManager overwrites the default ConfigManager
func (*StrategyRestSeeder) WithConfigManagerOptions ¶ added in v0.12.0
func (s *StrategyRestSeeder) WithConfigManagerOptions(configManagerOptions *generator.GenVarsConfig) *StrategyRestSeeder
WithConfigManagerOptions overwrites the default ConfigManager Options
func (*StrategyRestSeeder) WithRestClient ¶
func (s *StrategyRestSeeder) WithRestClient(rc Client) *StrategyRestSeeder
WithRestClient overwrites the default RestClient
type StrategyType ¶
type StrategyType string
const ( GET_POST StrategyType = "GET/POST" FIND_POST StrategyType = "FIND/POST" PUT_POST StrategyType = "PUT/POST" GET_PUT_POST StrategyType = "GET/PUT/POST" FIND_PUT_POST StrategyType = "FIND/PUT/POST" FIND_PATCH_POST StrategyType = "FIND/PATCH/POST" FIND_DELETE StrategyType = "FIND/DELETE" FIND_DELETE_POST StrategyType = "FIND/DELETE/POST" PUT StrategyType = "PUT" )