diff --git a/pkg/service/script_policy.go b/pkg/service/script_policy.go new file mode 100644 index 0000000..5b3e4e5 --- /dev/null +++ b/pkg/service/script_policy.go @@ -0,0 +1,50 @@ +package service + +import ( + "context" + "git.itzana.me/strafesnet/maps-service/pkg/api" +) + +var ( +) + +// CreateScriptPolicy implements createScriptPolicy operation. +// +// Create a new script policy. +// +// POST /script-policy +func (svc *Service) CreateScriptPolicy(ctx context.Context, req api.OptScriptPolicyCreate) (*api.ID, error){ + return nil,nil +} +// DeleteScriptPolicy implements deleteScriptPolicy operation. +// +// Delete the specified script policy by ID. +// +// DELETE /script-policy/id/{ScriptPolicyID} +func (svc *Service) DeleteScriptPolicy(ctx context.Context, params api.DeleteScriptPolicyParams) error{ + return nil +} +// GetScriptPolicy implements getScriptPolicy operation. +// +// Get the specified script policy by ID. +// +// GET /script-policy/id/{ScriptPolicyID} +func (svc *Service) GetScriptPolicy(ctx context.Context, params api.GetScriptPolicyParams) (*api.ScriptPolicy, error){ + return nil,nil +} +// GetScriptPolicyFromHash implements getScriptPolicyFromHash operation. +// +// Get the policy for the given hash of script source code. +// +// GET /script-policy/hash/{FromScriptHash} +func (svc *Service) GetScriptPolicyFromHash(ctx context.Context, params api.GetScriptPolicyFromHashParams) (*api.ScriptPolicy, error){ + return nil,nil +} +// UpdateScriptPolicy implements updateScriptPolicy operation. +// +// Update the specified script policy by ID. +// +// PATCH /script-policy/id/{ScriptPolicyID} +func (svc *Service) UpdateScriptPolicy(ctx context.Context, req api.OptScriptPolicyUpdate, params api.UpdateScriptPolicyParams) error{ + return nil +} diff --git a/pkg/service/scripts.go b/pkg/service/scripts.go new file mode 100644 index 0000000..33df013 --- /dev/null +++ b/pkg/service/scripts.go @@ -0,0 +1,42 @@ +package service + +import ( + "context" + "git.itzana.me/strafesnet/maps-service/pkg/api" +) + +var ( +) + +// CreateScript implements createScript operation. +// +// Create a new script. +// +// POST /scripts +func (svc *Service) CreateScript(ctx context.Context, req api.OptScriptCreate) (*api.ID, error){ + return nil,nil +} +// DeleteScript implements deleteScript operation. +// +// Delete the specified script by ID. +// +// DELETE /scripts/{ScriptID} +func (svc *Service) DeleteScript(ctx context.Context, params api.DeleteScriptParams) error{ + return nil +} +// GetScript implements getScript operation. +// +// Get the specified script by ID. +// +// GET /scripts/{ScriptID} +func (svc *Service) GetScript(ctx context.Context, params api.GetScriptParams) (*api.Script, error){ + return nil,nil +} +// UpdateScript implements updateScript operation. +// +// Update the specified script by ID. +// +// PATCH /scripts/{ScriptID} +func (svc *Service) UpdateScript(ctx context.Context, req api.OptScriptUpdate, params api.UpdateScriptParams) error{ + return nil +}