func (a ScmpAction) String() string {
	switch a & 0xFFFF {
	case ActKill:
		return "Action: Kill Process"
	case ActTrap:
		return "Action: Send SIGSYS"
	case ActErrno:
		return fmt.Sprintf("Action: Return error code %d", (a >> 16))
	case ActTrace:
		return fmt.Sprintf("Action: Notify tracing processes with code %d",
			(a >> 16))
	case ActAllow:
		return "Action: Allow system call"
	default:
		return "Unrecognized Action"
	}
}
String returns a string representation of a seccomp match action
package seccomp
import (
	"fmt"
	"os"
	"runtime"
	"strings"
	"sync"
	"syscall"
	"unsafe"
)
import "C"
type VersionError struct {
	message string
	minimum string
}
func (e VersionError) Error() string {
	format := "Libseccomp version too low: "
	if e.message != "" {
		format += e.message + ": "
	}
	format += "minimum supported is "
	if e.minimum != "" {
		format += e.minimum + ": "
	} else {
		format += "2.1.0: "
	}
	format += "detected %d.%d.%d"
	return fmt.Sprintf(format, verMajor, verMinor, verMicro)
}
type ScmpArch uint
type ScmpAction uint
type ScmpCompareOp uint
type ScmpCondition struct {
	Argument uint          `json:"argument,omitempty"`
	Op       ScmpCompareOp `json:"operator,omitempty"`
	Operand1 uint64        `json:"operand_one,omitempty"`
	Operand2 uint64        `json:"operand_two,omitempty"`
}
type ScmpSyscall int32
const (
	ArchInvalid ScmpArch = iota
	ArchNative ScmpArch = iota
	ArchX86 ScmpArch = iota
	ArchAMD64 ScmpArch = iota
	ArchX32 ScmpArch = iota
	ArchARM ScmpArch = iota
	ArchARM64 ScmpArch = iota
	ArchMIPS ScmpArch = iota
	ArchMIPS64 ScmpArch = iota
	ArchMIPS64N32 ScmpArch = iota
	ArchMIPSEL ScmpArch = iota
	ArchMIPSEL64 ScmpArch = iota
	ArchMIPSEL64N32 ScmpArch = iota
	ArchPPC ScmpArch = iota
	ArchPPC64 ScmpArch = iota
	ArchPPC64LE ScmpArch = iota
	ArchS390 ScmpArch = iota
	ArchS390X ScmpArch = iota
)
const (
	ActInvalid ScmpAction = iota
	ActKill ScmpAction = iota
	ActTrap ScmpAction = iota
	ActErrno ScmpAction = iota
	ActTrace ScmpAction = iota
	ActAllow ScmpAction = iota
)
const (
	CompareInvalid ScmpCompareOp = iota
	CompareNotEqual ScmpCompareOp = iota
	CompareLess ScmpCompareOp = iota
	CompareLessOrEqual ScmpCompareOp = iota
	CompareEqual ScmpCompareOp = iota
	CompareGreaterEqual ScmpCompareOp = iota
	CompareGreater ScmpCompareOp = iota
	CompareMaskedEqual ScmpCompareOp = iota
)
func GetArchFromString(arch string) (ScmpArch, error) {
	if err := ensureSupportedVersion(); err != nil {
		return ArchInvalid, err
	}
	switch strings.ToLower(arch) {
	case "x86":
		return ArchX86, nil
	case "amd64", "x86-64", "x86_64", "x64":
		return ArchAMD64, nil
	case "x32":
		return ArchX32, nil
	case "arm":
		return ArchARM, nil
	case "arm64", "aarch64":
		return ArchARM64, nil
	case "mips":
		return ArchMIPS, nil
	case "mips64":
		return ArchMIPS64, nil
	case "mips64n32":
		return ArchMIPS64N32, nil
	case "mipsel":
		return ArchMIPSEL, nil
	case "mipsel64":
		return ArchMIPSEL64, nil
	case "mipsel64n32":
		return ArchMIPSEL64N32, nil
	case "ppc":
		return ArchPPC, nil
	case "ppc64":
		return ArchPPC64, nil
	case "ppc64le":
		return ArchPPC64LE, nil
	case "s390":
		return ArchS390, nil
	case "s390x":
		return ArchS390X, nil
	default:
		return ArchInvalid, fmt.Errorf("cannot convert unrecognized string %s", arch)
	}
}
func (a ScmpArch) String() string {
	switch a {
	case ArchX86:
		return "x86"
	case ArchAMD64:
		return "amd64"
	case ArchX32:
		return "x32"
	case ArchARM:
		return "arm"
	case ArchARM64:
		return "arm64"
	case ArchMIPS:
		return "mips"
	case ArchMIPS64:
		return "mips64"
	case ArchMIPS64N32:
		return "mips64n32"
	case ArchMIPSEL:
		return "mipsel"
	case ArchMIPSEL64:
		return "mipsel64"
	case ArchMIPSEL64N32:
		return "mipsel64n32"
	case ArchPPC:
		return "ppc"
	case ArchPPC64:
		return "ppc64"
	case ArchPPC64LE:
		return "ppc64le"
	case ArchS390:
		return "s390"
	case ArchS390X:
		return "s390x"
	case ArchNative:
		return "native"
	case ArchInvalid:
		return "Invalid architecture"
	default:
		return "Unknown architecture"
	}
}
func (a ScmpCompareOp) String() string {
	switch a {
	case CompareNotEqual:
		return "Not equal"
	case CompareLess:
		return "Less than"
	case CompareLessOrEqual:
		return "Less than or equal to"
	case CompareEqual:
		return "Equal"
	case CompareGreaterEqual:
		return "Greater than or equal to"
	case CompareGreater:
		return "Greater than"
	case CompareMaskedEqual:
		return "Masked equality"
	case CompareInvalid:
		return "Invalid comparison operator"
	default:
		return "Unrecognized comparison operator"
	}
}