mirror of https://github.com/docker/docs.git
Merge pull request #3436 from tyrken/upgrade-govmomi-netip
Upgrade govmomi to 0.6.2, use WaitForNetIP
This commit is contained in:
commit
a482479f5b
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"ImportPath": "github.com/docker/machine",
|
||||
"GoVersion": "go1.6",
|
||||
"GodepVersion": "v66",
|
||||
"Packages": [
|
||||
"github.com/docker/machine",
|
||||
"github.com/docker/machine/cmd",
|
||||
|
|
@ -230,6 +231,7 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "github.com/bugsnag/panicwrap",
|
||||
"Comment": "1.0.0",
|
||||
"Rev": "e5f9854865b9778a45169fc249e99e338d4d6f27"
|
||||
},
|
||||
{
|
||||
|
|
@ -238,7 +240,7 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "github.com/codegangsta/cli",
|
||||
"Comment": "1.2.0-179-g0302d39",
|
||||
"Comment": "v1.11.0-6-g0302d39",
|
||||
"Rev": "0302d3914d2a6ad61404584cdae6e6dbc9c03599"
|
||||
},
|
||||
{
|
||||
|
|
@ -433,83 +435,83 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "github.com/vmware/govmomi",
|
||||
"Comment": "v0.3.0-11-g20c009c",
|
||||
"Rev": "20c009ce9c493f0c714a9fffa5bda5fb84df2b6c"
|
||||
"Comment": "v0.1.0-454-g9051bd6",
|
||||
"Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/vmware/govmomi/find",
|
||||
"Comment": "v0.3.0-11-g20c009c",
|
||||
"Rev": "20c009ce9c493f0c714a9fffa5bda5fb84df2b6c"
|
||||
"Comment": "v0.1.0-454-g9051bd6",
|
||||
"Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/vmware/govmomi/guest",
|
||||
"Comment": "v0.3.0-11-g20c009c",
|
||||
"Rev": "20c009ce9c493f0c714a9fffa5bda5fb84df2b6c"
|
||||
"Comment": "v0.1.0-454-g9051bd6",
|
||||
"Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/vmware/govmomi/list",
|
||||
"Comment": "v0.3.0-11-g20c009c",
|
||||
"Rev": "20c009ce9c493f0c714a9fffa5bda5fb84df2b6c"
|
||||
"Comment": "v0.1.0-454-g9051bd6",
|
||||
"Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/vmware/govmomi/object",
|
||||
"Comment": "v0.3.0-11-g20c009c",
|
||||
"Rev": "20c009ce9c493f0c714a9fffa5bda5fb84df2b6c"
|
||||
"Comment": "v0.1.0-454-g9051bd6",
|
||||
"Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/vmware/govmomi/property",
|
||||
"Comment": "v0.3.0-11-g20c009c",
|
||||
"Rev": "20c009ce9c493f0c714a9fffa5bda5fb84df2b6c"
|
||||
"Comment": "v0.1.0-454-g9051bd6",
|
||||
"Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/vmware/govmomi/session",
|
||||
"Comment": "v0.3.0-11-g20c009c",
|
||||
"Rev": "20c009ce9c493f0c714a9fffa5bda5fb84df2b6c"
|
||||
"Comment": "v0.1.0-454-g9051bd6",
|
||||
"Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/vmware/govmomi/task",
|
||||
"Comment": "v0.3.0-11-g20c009c",
|
||||
"Rev": "20c009ce9c493f0c714a9fffa5bda5fb84df2b6c"
|
||||
"Comment": "v0.1.0-454-g9051bd6",
|
||||
"Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/vmware/govmomi/vim25",
|
||||
"Comment": "v0.3.0-11-g20c009c",
|
||||
"Rev": "20c009ce9c493f0c714a9fffa5bda5fb84df2b6c"
|
||||
"Comment": "v0.1.0-454-g9051bd6",
|
||||
"Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/vmware/govmomi/vim25/debug",
|
||||
"Comment": "v0.3.0-11-g20c009c",
|
||||
"Rev": "20c009ce9c493f0c714a9fffa5bda5fb84df2b6c"
|
||||
"Comment": "v0.1.0-454-g9051bd6",
|
||||
"Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/vmware/govmomi/vim25/methods",
|
||||
"Comment": "v0.3.0-11-g20c009c",
|
||||
"Rev": "20c009ce9c493f0c714a9fffa5bda5fb84df2b6c"
|
||||
"Comment": "v0.1.0-454-g9051bd6",
|
||||
"Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/vmware/govmomi/vim25/mo",
|
||||
"Comment": "v0.3.0-11-g20c009c",
|
||||
"Rev": "20c009ce9c493f0c714a9fffa5bda5fb84df2b6c"
|
||||
"Comment": "v0.1.0-454-g9051bd6",
|
||||
"Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/vmware/govmomi/vim25/progress",
|
||||
"Comment": "v0.3.0-11-g20c009c",
|
||||
"Rev": "20c009ce9c493f0c714a9fffa5bda5fb84df2b6c"
|
||||
"Comment": "v0.1.0-454-g9051bd6",
|
||||
"Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/vmware/govmomi/vim25/soap",
|
||||
"Comment": "v0.3.0-11-g20c009c",
|
||||
"Rev": "20c009ce9c493f0c714a9fffa5bda5fb84df2b6c"
|
||||
"Comment": "v0.1.0-454-g9051bd6",
|
||||
"Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/vmware/govmomi/vim25/types",
|
||||
"Comment": "v0.3.0-11-g20c009c",
|
||||
"Rev": "20c009ce9c493f0c714a9fffa5bda5fb84df2b6c"
|
||||
"Comment": "v0.1.0-454-g9051bd6",
|
||||
"Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/vmware/govmomi/vim25/xml",
|
||||
"Comment": "v0.3.0-11-g20c009c",
|
||||
"Rev": "20c009ce9c493f0c714a9fffa5bda5fb84df2b6c"
|
||||
"Comment": "v0.1.0-454-g9051bd6",
|
||||
"Rev": "9051bd6b44125d9472e0c148b5965692ab283d4a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/crypto/curve25519",
|
||||
|
|
|
|||
|
|
@ -239,13 +239,26 @@ func (d *Driver) GetIP() (string, error) {
|
|||
return "", err
|
||||
}
|
||||
|
||||
rawIP, err := vm.WaitForIP(ctx)
|
||||
configuredMacIPs, err := vm.WaitForNetIP(ctx, false)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
ip := strings.Trim(strings.Split(rawIP, "\n")[0], " ")
|
||||
return ip, nil
|
||||
for _, ips := range configuredMacIPs {
|
||||
if len(ips) >= 0 {
|
||||
// Prefer IPv4 address, but fall back to first/IPv6
|
||||
preferredIP := ips[0]
|
||||
for _, ip := range ips {
|
||||
if net.ParseIP(ip).To4() != nil {
|
||||
preferredIP = ip
|
||||
break
|
||||
}
|
||||
}
|
||||
return preferredIP, nil
|
||||
}
|
||||
}
|
||||
|
||||
return "", errors.New("No IP despite waiting for one - check DHCP status")
|
||||
}
|
||||
|
||||
func (d *Driver) GetState() (state.State, error) {
|
||||
|
|
@ -404,7 +417,7 @@ func (d *Driver) Create() error {
|
|||
Name: d.MachineName,
|
||||
GuestId: "otherLinux64Guest",
|
||||
Files: &types.VirtualMachineFileInfo{VmPathName: fmt.Sprintf("[%s]", dss.Name())},
|
||||
NumCPUs: d.CPU,
|
||||
NumCPUs: int32(d.CPU),
|
||||
MemoryMB: int64(d.Memory),
|
||||
}
|
||||
|
||||
|
|
@ -455,7 +468,8 @@ func (d *Driver) Create() error {
|
|||
return err
|
||||
}
|
||||
|
||||
disk := devices.CreateDisk(controller, dss.Path(fmt.Sprintf("%s/%s.vmdk", d.MachineName, d.MachineName)))
|
||||
disk := devices.CreateDisk(controller, dss.Reference(),
|
||||
dss.Path(fmt.Sprintf("%s/%s.vmdk", d.MachineName, d.MachineName)))
|
||||
|
||||
// Convert MB to KB
|
||||
disk.CapacityInKB = int64(d.DiskSize) * 1024
|
||||
|
|
@ -864,8 +878,8 @@ type FileAttrFlag struct {
|
|||
}
|
||||
|
||||
func (f *FileAttrFlag) SetPerms(owner, group, perms int) {
|
||||
f.OwnerId = owner
|
||||
f.GroupId = group
|
||||
f.OwnerId = int32(owner)
|
||||
f.GroupId = int32(group)
|
||||
f.Permissions = int64(perms)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,792 +0,0 @@
|
|||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
// Package ec2iface provides an interface for the Amazon Elastic Compute Cloud.
|
||||
package ec2iface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
)
|
||||
|
||||
// EC2API is the interface type for ec2.EC2.
|
||||
type EC2API interface {
|
||||
AcceptVpcPeeringConnectionRequest(*ec2.AcceptVpcPeeringConnectionInput) (*request.Request, *ec2.AcceptVpcPeeringConnectionOutput)
|
||||
|
||||
AcceptVpcPeeringConnection(*ec2.AcceptVpcPeeringConnectionInput) (*ec2.AcceptVpcPeeringConnectionOutput, error)
|
||||
|
||||
AllocateAddressRequest(*ec2.AllocateAddressInput) (*request.Request, *ec2.AllocateAddressOutput)
|
||||
|
||||
AllocateAddress(*ec2.AllocateAddressInput) (*ec2.AllocateAddressOutput, error)
|
||||
|
||||
AllocateHostsRequest(*ec2.AllocateHostsInput) (*request.Request, *ec2.AllocateHostsOutput)
|
||||
|
||||
AllocateHosts(*ec2.AllocateHostsInput) (*ec2.AllocateHostsOutput, error)
|
||||
|
||||
AssignPrivateIpAddressesRequest(*ec2.AssignPrivateIpAddressesInput) (*request.Request, *ec2.AssignPrivateIpAddressesOutput)
|
||||
|
||||
AssignPrivateIpAddresses(*ec2.AssignPrivateIpAddressesInput) (*ec2.AssignPrivateIpAddressesOutput, error)
|
||||
|
||||
AssociateAddressRequest(*ec2.AssociateAddressInput) (*request.Request, *ec2.AssociateAddressOutput)
|
||||
|
||||
AssociateAddress(*ec2.AssociateAddressInput) (*ec2.AssociateAddressOutput, error)
|
||||
|
||||
AssociateDhcpOptionsRequest(*ec2.AssociateDhcpOptionsInput) (*request.Request, *ec2.AssociateDhcpOptionsOutput)
|
||||
|
||||
AssociateDhcpOptions(*ec2.AssociateDhcpOptionsInput) (*ec2.AssociateDhcpOptionsOutput, error)
|
||||
|
||||
AssociateRouteTableRequest(*ec2.AssociateRouteTableInput) (*request.Request, *ec2.AssociateRouteTableOutput)
|
||||
|
||||
AssociateRouteTable(*ec2.AssociateRouteTableInput) (*ec2.AssociateRouteTableOutput, error)
|
||||
|
||||
AttachClassicLinkVpcRequest(*ec2.AttachClassicLinkVpcInput) (*request.Request, *ec2.AttachClassicLinkVpcOutput)
|
||||
|
||||
AttachClassicLinkVpc(*ec2.AttachClassicLinkVpcInput) (*ec2.AttachClassicLinkVpcOutput, error)
|
||||
|
||||
AttachInternetGatewayRequest(*ec2.AttachInternetGatewayInput) (*request.Request, *ec2.AttachInternetGatewayOutput)
|
||||
|
||||
AttachInternetGateway(*ec2.AttachInternetGatewayInput) (*ec2.AttachInternetGatewayOutput, error)
|
||||
|
||||
AttachNetworkInterfaceRequest(*ec2.AttachNetworkInterfaceInput) (*request.Request, *ec2.AttachNetworkInterfaceOutput)
|
||||
|
||||
AttachNetworkInterface(*ec2.AttachNetworkInterfaceInput) (*ec2.AttachNetworkInterfaceOutput, error)
|
||||
|
||||
AttachVolumeRequest(*ec2.AttachVolumeInput) (*request.Request, *ec2.VolumeAttachment)
|
||||
|
||||
AttachVolume(*ec2.AttachVolumeInput) (*ec2.VolumeAttachment, error)
|
||||
|
||||
AttachVpnGatewayRequest(*ec2.AttachVpnGatewayInput) (*request.Request, *ec2.AttachVpnGatewayOutput)
|
||||
|
||||
AttachVpnGateway(*ec2.AttachVpnGatewayInput) (*ec2.AttachVpnGatewayOutput, error)
|
||||
|
||||
AuthorizeSecurityGroupEgressRequest(*ec2.AuthorizeSecurityGroupEgressInput) (*request.Request, *ec2.AuthorizeSecurityGroupEgressOutput)
|
||||
|
||||
AuthorizeSecurityGroupEgress(*ec2.AuthorizeSecurityGroupEgressInput) (*ec2.AuthorizeSecurityGroupEgressOutput, error)
|
||||
|
||||
AuthorizeSecurityGroupIngressRequest(*ec2.AuthorizeSecurityGroupIngressInput) (*request.Request, *ec2.AuthorizeSecurityGroupIngressOutput)
|
||||
|
||||
AuthorizeSecurityGroupIngress(*ec2.AuthorizeSecurityGroupIngressInput) (*ec2.AuthorizeSecurityGroupIngressOutput, error)
|
||||
|
||||
BundleInstanceRequest(*ec2.BundleInstanceInput) (*request.Request, *ec2.BundleInstanceOutput)
|
||||
|
||||
BundleInstance(*ec2.BundleInstanceInput) (*ec2.BundleInstanceOutput, error)
|
||||
|
||||
CancelBundleTaskRequest(*ec2.CancelBundleTaskInput) (*request.Request, *ec2.CancelBundleTaskOutput)
|
||||
|
||||
CancelBundleTask(*ec2.CancelBundleTaskInput) (*ec2.CancelBundleTaskOutput, error)
|
||||
|
||||
CancelConversionTaskRequest(*ec2.CancelConversionTaskInput) (*request.Request, *ec2.CancelConversionTaskOutput)
|
||||
|
||||
CancelConversionTask(*ec2.CancelConversionTaskInput) (*ec2.CancelConversionTaskOutput, error)
|
||||
|
||||
CancelExportTaskRequest(*ec2.CancelExportTaskInput) (*request.Request, *ec2.CancelExportTaskOutput)
|
||||
|
||||
CancelExportTask(*ec2.CancelExportTaskInput) (*ec2.CancelExportTaskOutput, error)
|
||||
|
||||
CancelImportTaskRequest(*ec2.CancelImportTaskInput) (*request.Request, *ec2.CancelImportTaskOutput)
|
||||
|
||||
CancelImportTask(*ec2.CancelImportTaskInput) (*ec2.CancelImportTaskOutput, error)
|
||||
|
||||
CancelReservedInstancesListingRequest(*ec2.CancelReservedInstancesListingInput) (*request.Request, *ec2.CancelReservedInstancesListingOutput)
|
||||
|
||||
CancelReservedInstancesListing(*ec2.CancelReservedInstancesListingInput) (*ec2.CancelReservedInstancesListingOutput, error)
|
||||
|
||||
CancelSpotFleetRequestsRequest(*ec2.CancelSpotFleetRequestsInput) (*request.Request, *ec2.CancelSpotFleetRequestsOutput)
|
||||
|
||||
CancelSpotFleetRequests(*ec2.CancelSpotFleetRequestsInput) (*ec2.CancelSpotFleetRequestsOutput, error)
|
||||
|
||||
CancelSpotInstanceRequestsRequest(*ec2.CancelSpotInstanceRequestsInput) (*request.Request, *ec2.CancelSpotInstanceRequestsOutput)
|
||||
|
||||
CancelSpotInstanceRequests(*ec2.CancelSpotInstanceRequestsInput) (*ec2.CancelSpotInstanceRequestsOutput, error)
|
||||
|
||||
ConfirmProductInstanceRequest(*ec2.ConfirmProductInstanceInput) (*request.Request, *ec2.ConfirmProductInstanceOutput)
|
||||
|
||||
ConfirmProductInstance(*ec2.ConfirmProductInstanceInput) (*ec2.ConfirmProductInstanceOutput, error)
|
||||
|
||||
CopyImageRequest(*ec2.CopyImageInput) (*request.Request, *ec2.CopyImageOutput)
|
||||
|
||||
CopyImage(*ec2.CopyImageInput) (*ec2.CopyImageOutput, error)
|
||||
|
||||
CopySnapshotRequest(*ec2.CopySnapshotInput) (*request.Request, *ec2.CopySnapshotOutput)
|
||||
|
||||
CopySnapshot(*ec2.CopySnapshotInput) (*ec2.CopySnapshotOutput, error)
|
||||
|
||||
CreateCustomerGatewayRequest(*ec2.CreateCustomerGatewayInput) (*request.Request, *ec2.CreateCustomerGatewayOutput)
|
||||
|
||||
CreateCustomerGateway(*ec2.CreateCustomerGatewayInput) (*ec2.CreateCustomerGatewayOutput, error)
|
||||
|
||||
CreateDhcpOptionsRequest(*ec2.CreateDhcpOptionsInput) (*request.Request, *ec2.CreateDhcpOptionsOutput)
|
||||
|
||||
CreateDhcpOptions(*ec2.CreateDhcpOptionsInput) (*ec2.CreateDhcpOptionsOutput, error)
|
||||
|
||||
CreateFlowLogsRequest(*ec2.CreateFlowLogsInput) (*request.Request, *ec2.CreateFlowLogsOutput)
|
||||
|
||||
CreateFlowLogs(*ec2.CreateFlowLogsInput) (*ec2.CreateFlowLogsOutput, error)
|
||||
|
||||
CreateImageRequest(*ec2.CreateImageInput) (*request.Request, *ec2.CreateImageOutput)
|
||||
|
||||
CreateImage(*ec2.CreateImageInput) (*ec2.CreateImageOutput, error)
|
||||
|
||||
CreateInstanceExportTaskRequest(*ec2.CreateInstanceExportTaskInput) (*request.Request, *ec2.CreateInstanceExportTaskOutput)
|
||||
|
||||
CreateInstanceExportTask(*ec2.CreateInstanceExportTaskInput) (*ec2.CreateInstanceExportTaskOutput, error)
|
||||
|
||||
CreateInternetGatewayRequest(*ec2.CreateInternetGatewayInput) (*request.Request, *ec2.CreateInternetGatewayOutput)
|
||||
|
||||
CreateInternetGateway(*ec2.CreateInternetGatewayInput) (*ec2.CreateInternetGatewayOutput, error)
|
||||
|
||||
CreateKeyPairRequest(*ec2.CreateKeyPairInput) (*request.Request, *ec2.CreateKeyPairOutput)
|
||||
|
||||
CreateKeyPair(*ec2.CreateKeyPairInput) (*ec2.CreateKeyPairOutput, error)
|
||||
|
||||
CreateNetworkAclRequest(*ec2.CreateNetworkAclInput) (*request.Request, *ec2.CreateNetworkAclOutput)
|
||||
|
||||
CreateNetworkAcl(*ec2.CreateNetworkAclInput) (*ec2.CreateNetworkAclOutput, error)
|
||||
|
||||
CreateNetworkAclEntryRequest(*ec2.CreateNetworkAclEntryInput) (*request.Request, *ec2.CreateNetworkAclEntryOutput)
|
||||
|
||||
CreateNetworkAclEntry(*ec2.CreateNetworkAclEntryInput) (*ec2.CreateNetworkAclEntryOutput, error)
|
||||
|
||||
CreateNetworkInterfaceRequest(*ec2.CreateNetworkInterfaceInput) (*request.Request, *ec2.CreateNetworkInterfaceOutput)
|
||||
|
||||
CreateNetworkInterface(*ec2.CreateNetworkInterfaceInput) (*ec2.CreateNetworkInterfaceOutput, error)
|
||||
|
||||
CreatePlacementGroupRequest(*ec2.CreatePlacementGroupInput) (*request.Request, *ec2.CreatePlacementGroupOutput)
|
||||
|
||||
CreatePlacementGroup(*ec2.CreatePlacementGroupInput) (*ec2.CreatePlacementGroupOutput, error)
|
||||
|
||||
CreateReservedInstancesListingRequest(*ec2.CreateReservedInstancesListingInput) (*request.Request, *ec2.CreateReservedInstancesListingOutput)
|
||||
|
||||
CreateReservedInstancesListing(*ec2.CreateReservedInstancesListingInput) (*ec2.CreateReservedInstancesListingOutput, error)
|
||||
|
||||
CreateRouteRequest(*ec2.CreateRouteInput) (*request.Request, *ec2.CreateRouteOutput)
|
||||
|
||||
CreateRoute(*ec2.CreateRouteInput) (*ec2.CreateRouteOutput, error)
|
||||
|
||||
CreateRouteTableRequest(*ec2.CreateRouteTableInput) (*request.Request, *ec2.CreateRouteTableOutput)
|
||||
|
||||
CreateRouteTable(*ec2.CreateRouteTableInput) (*ec2.CreateRouteTableOutput, error)
|
||||
|
||||
CreateSecurityGroupRequest(*ec2.CreateSecurityGroupInput) (*request.Request, *ec2.CreateSecurityGroupOutput)
|
||||
|
||||
CreateSecurityGroup(*ec2.CreateSecurityGroupInput) (*ec2.CreateSecurityGroupOutput, error)
|
||||
|
||||
CreateSnapshotRequest(*ec2.CreateSnapshotInput) (*request.Request, *ec2.Snapshot)
|
||||
|
||||
CreateSnapshot(*ec2.CreateSnapshotInput) (*ec2.Snapshot, error)
|
||||
|
||||
CreateSpotDatafeedSubscriptionRequest(*ec2.CreateSpotDatafeedSubscriptionInput) (*request.Request, *ec2.CreateSpotDatafeedSubscriptionOutput)
|
||||
|
||||
CreateSpotDatafeedSubscription(*ec2.CreateSpotDatafeedSubscriptionInput) (*ec2.CreateSpotDatafeedSubscriptionOutput, error)
|
||||
|
||||
CreateSubnetRequest(*ec2.CreateSubnetInput) (*request.Request, *ec2.CreateSubnetOutput)
|
||||
|
||||
CreateSubnet(*ec2.CreateSubnetInput) (*ec2.CreateSubnetOutput, error)
|
||||
|
||||
CreateTagsRequest(*ec2.CreateTagsInput) (*request.Request, *ec2.CreateTagsOutput)
|
||||
|
||||
CreateTags(*ec2.CreateTagsInput) (*ec2.CreateTagsOutput, error)
|
||||
|
||||
CreateVolumeRequest(*ec2.CreateVolumeInput) (*request.Request, *ec2.Volume)
|
||||
|
||||
CreateVolume(*ec2.CreateVolumeInput) (*ec2.Volume, error)
|
||||
|
||||
CreateVpcRequest(*ec2.CreateVpcInput) (*request.Request, *ec2.CreateVpcOutput)
|
||||
|
||||
CreateVpc(*ec2.CreateVpcInput) (*ec2.CreateVpcOutput, error)
|
||||
|
||||
CreateVpcEndpointRequest(*ec2.CreateVpcEndpointInput) (*request.Request, *ec2.CreateVpcEndpointOutput)
|
||||
|
||||
CreateVpcEndpoint(*ec2.CreateVpcEndpointInput) (*ec2.CreateVpcEndpointOutput, error)
|
||||
|
||||
CreateVpcPeeringConnectionRequest(*ec2.CreateVpcPeeringConnectionInput) (*request.Request, *ec2.CreateVpcPeeringConnectionOutput)
|
||||
|
||||
CreateVpcPeeringConnection(*ec2.CreateVpcPeeringConnectionInput) (*ec2.CreateVpcPeeringConnectionOutput, error)
|
||||
|
||||
CreateVpnConnectionRequest(*ec2.CreateVpnConnectionInput) (*request.Request, *ec2.CreateVpnConnectionOutput)
|
||||
|
||||
CreateVpnConnection(*ec2.CreateVpnConnectionInput) (*ec2.CreateVpnConnectionOutput, error)
|
||||
|
||||
CreateVpnConnectionRouteRequest(*ec2.CreateVpnConnectionRouteInput) (*request.Request, *ec2.CreateVpnConnectionRouteOutput)
|
||||
|
||||
CreateVpnConnectionRoute(*ec2.CreateVpnConnectionRouteInput) (*ec2.CreateVpnConnectionRouteOutput, error)
|
||||
|
||||
CreateVpnGatewayRequest(*ec2.CreateVpnGatewayInput) (*request.Request, *ec2.CreateVpnGatewayOutput)
|
||||
|
||||
CreateVpnGateway(*ec2.CreateVpnGatewayInput) (*ec2.CreateVpnGatewayOutput, error)
|
||||
|
||||
DeleteCustomerGatewayRequest(*ec2.DeleteCustomerGatewayInput) (*request.Request, *ec2.DeleteCustomerGatewayOutput)
|
||||
|
||||
DeleteCustomerGateway(*ec2.DeleteCustomerGatewayInput) (*ec2.DeleteCustomerGatewayOutput, error)
|
||||
|
||||
DeleteDhcpOptionsRequest(*ec2.DeleteDhcpOptionsInput) (*request.Request, *ec2.DeleteDhcpOptionsOutput)
|
||||
|
||||
DeleteDhcpOptions(*ec2.DeleteDhcpOptionsInput) (*ec2.DeleteDhcpOptionsOutput, error)
|
||||
|
||||
DeleteFlowLogsRequest(*ec2.DeleteFlowLogsInput) (*request.Request, *ec2.DeleteFlowLogsOutput)
|
||||
|
||||
DeleteFlowLogs(*ec2.DeleteFlowLogsInput) (*ec2.DeleteFlowLogsOutput, error)
|
||||
|
||||
DeleteInternetGatewayRequest(*ec2.DeleteInternetGatewayInput) (*request.Request, *ec2.DeleteInternetGatewayOutput)
|
||||
|
||||
DeleteInternetGateway(*ec2.DeleteInternetGatewayInput) (*ec2.DeleteInternetGatewayOutput, error)
|
||||
|
||||
DeleteKeyPairRequest(*ec2.DeleteKeyPairInput) (*request.Request, *ec2.DeleteKeyPairOutput)
|
||||
|
||||
DeleteKeyPair(*ec2.DeleteKeyPairInput) (*ec2.DeleteKeyPairOutput, error)
|
||||
|
||||
DeleteNetworkAclRequest(*ec2.DeleteNetworkAclInput) (*request.Request, *ec2.DeleteNetworkAclOutput)
|
||||
|
||||
DeleteNetworkAcl(*ec2.DeleteNetworkAclInput) (*ec2.DeleteNetworkAclOutput, error)
|
||||
|
||||
DeleteNetworkAclEntryRequest(*ec2.DeleteNetworkAclEntryInput) (*request.Request, *ec2.DeleteNetworkAclEntryOutput)
|
||||
|
||||
DeleteNetworkAclEntry(*ec2.DeleteNetworkAclEntryInput) (*ec2.DeleteNetworkAclEntryOutput, error)
|
||||
|
||||
DeleteNetworkInterfaceRequest(*ec2.DeleteNetworkInterfaceInput) (*request.Request, *ec2.DeleteNetworkInterfaceOutput)
|
||||
|
||||
DeleteNetworkInterface(*ec2.DeleteNetworkInterfaceInput) (*ec2.DeleteNetworkInterfaceOutput, error)
|
||||
|
||||
DeletePlacementGroupRequest(*ec2.DeletePlacementGroupInput) (*request.Request, *ec2.DeletePlacementGroupOutput)
|
||||
|
||||
DeletePlacementGroup(*ec2.DeletePlacementGroupInput) (*ec2.DeletePlacementGroupOutput, error)
|
||||
|
||||
DeleteRouteRequest(*ec2.DeleteRouteInput) (*request.Request, *ec2.DeleteRouteOutput)
|
||||
|
||||
DeleteRoute(*ec2.DeleteRouteInput) (*ec2.DeleteRouteOutput, error)
|
||||
|
||||
DeleteRouteTableRequest(*ec2.DeleteRouteTableInput) (*request.Request, *ec2.DeleteRouteTableOutput)
|
||||
|
||||
DeleteRouteTable(*ec2.DeleteRouteTableInput) (*ec2.DeleteRouteTableOutput, error)
|
||||
|
||||
DeleteSecurityGroupRequest(*ec2.DeleteSecurityGroupInput) (*request.Request, *ec2.DeleteSecurityGroupOutput)
|
||||
|
||||
DeleteSecurityGroup(*ec2.DeleteSecurityGroupInput) (*ec2.DeleteSecurityGroupOutput, error)
|
||||
|
||||
DeleteSnapshotRequest(*ec2.DeleteSnapshotInput) (*request.Request, *ec2.DeleteSnapshotOutput)
|
||||
|
||||
DeleteSnapshot(*ec2.DeleteSnapshotInput) (*ec2.DeleteSnapshotOutput, error)
|
||||
|
||||
DeleteSpotDatafeedSubscriptionRequest(*ec2.DeleteSpotDatafeedSubscriptionInput) (*request.Request, *ec2.DeleteSpotDatafeedSubscriptionOutput)
|
||||
|
||||
DeleteSpotDatafeedSubscription(*ec2.DeleteSpotDatafeedSubscriptionInput) (*ec2.DeleteSpotDatafeedSubscriptionOutput, error)
|
||||
|
||||
DeleteSubnetRequest(*ec2.DeleteSubnetInput) (*request.Request, *ec2.DeleteSubnetOutput)
|
||||
|
||||
DeleteSubnet(*ec2.DeleteSubnetInput) (*ec2.DeleteSubnetOutput, error)
|
||||
|
||||
DeleteTagsRequest(*ec2.DeleteTagsInput) (*request.Request, *ec2.DeleteTagsOutput)
|
||||
|
||||
DeleteTags(*ec2.DeleteTagsInput) (*ec2.DeleteTagsOutput, error)
|
||||
|
||||
DeleteVolumeRequest(*ec2.DeleteVolumeInput) (*request.Request, *ec2.DeleteVolumeOutput)
|
||||
|
||||
DeleteVolume(*ec2.DeleteVolumeInput) (*ec2.DeleteVolumeOutput, error)
|
||||
|
||||
DeleteVpcRequest(*ec2.DeleteVpcInput) (*request.Request, *ec2.DeleteVpcOutput)
|
||||
|
||||
DeleteVpc(*ec2.DeleteVpcInput) (*ec2.DeleteVpcOutput, error)
|
||||
|
||||
DeleteVpcEndpointsRequest(*ec2.DeleteVpcEndpointsInput) (*request.Request, *ec2.DeleteVpcEndpointsOutput)
|
||||
|
||||
DeleteVpcEndpoints(*ec2.DeleteVpcEndpointsInput) (*ec2.DeleteVpcEndpointsOutput, error)
|
||||
|
||||
DeleteVpcPeeringConnectionRequest(*ec2.DeleteVpcPeeringConnectionInput) (*request.Request, *ec2.DeleteVpcPeeringConnectionOutput)
|
||||
|
||||
DeleteVpcPeeringConnection(*ec2.DeleteVpcPeeringConnectionInput) (*ec2.DeleteVpcPeeringConnectionOutput, error)
|
||||
|
||||
DeleteVpnConnectionRequest(*ec2.DeleteVpnConnectionInput) (*request.Request, *ec2.DeleteVpnConnectionOutput)
|
||||
|
||||
DeleteVpnConnection(*ec2.DeleteVpnConnectionInput) (*ec2.DeleteVpnConnectionOutput, error)
|
||||
|
||||
DeleteVpnConnectionRouteRequest(*ec2.DeleteVpnConnectionRouteInput) (*request.Request, *ec2.DeleteVpnConnectionRouteOutput)
|
||||
|
||||
DeleteVpnConnectionRoute(*ec2.DeleteVpnConnectionRouteInput) (*ec2.DeleteVpnConnectionRouteOutput, error)
|
||||
|
||||
DeleteVpnGatewayRequest(*ec2.DeleteVpnGatewayInput) (*request.Request, *ec2.DeleteVpnGatewayOutput)
|
||||
|
||||
DeleteVpnGateway(*ec2.DeleteVpnGatewayInput) (*ec2.DeleteVpnGatewayOutput, error)
|
||||
|
||||
DeregisterImageRequest(*ec2.DeregisterImageInput) (*request.Request, *ec2.DeregisterImageOutput)
|
||||
|
||||
DeregisterImage(*ec2.DeregisterImageInput) (*ec2.DeregisterImageOutput, error)
|
||||
|
||||
DescribeAccountAttributesRequest(*ec2.DescribeAccountAttributesInput) (*request.Request, *ec2.DescribeAccountAttributesOutput)
|
||||
|
||||
DescribeAccountAttributes(*ec2.DescribeAccountAttributesInput) (*ec2.DescribeAccountAttributesOutput, error)
|
||||
|
||||
DescribeAddressesRequest(*ec2.DescribeAddressesInput) (*request.Request, *ec2.DescribeAddressesOutput)
|
||||
|
||||
DescribeAddresses(*ec2.DescribeAddressesInput) (*ec2.DescribeAddressesOutput, error)
|
||||
|
||||
DescribeAvailabilityZonesRequest(*ec2.DescribeAvailabilityZonesInput) (*request.Request, *ec2.DescribeAvailabilityZonesOutput)
|
||||
|
||||
DescribeAvailabilityZones(*ec2.DescribeAvailabilityZonesInput) (*ec2.DescribeAvailabilityZonesOutput, error)
|
||||
|
||||
DescribeBundleTasksRequest(*ec2.DescribeBundleTasksInput) (*request.Request, *ec2.DescribeBundleTasksOutput)
|
||||
|
||||
DescribeBundleTasks(*ec2.DescribeBundleTasksInput) (*ec2.DescribeBundleTasksOutput, error)
|
||||
|
||||
DescribeClassicLinkInstancesRequest(*ec2.DescribeClassicLinkInstancesInput) (*request.Request, *ec2.DescribeClassicLinkInstancesOutput)
|
||||
|
||||
DescribeClassicLinkInstances(*ec2.DescribeClassicLinkInstancesInput) (*ec2.DescribeClassicLinkInstancesOutput, error)
|
||||
|
||||
DescribeConversionTasksRequest(*ec2.DescribeConversionTasksInput) (*request.Request, *ec2.DescribeConversionTasksOutput)
|
||||
|
||||
DescribeConversionTasks(*ec2.DescribeConversionTasksInput) (*ec2.DescribeConversionTasksOutput, error)
|
||||
|
||||
DescribeCustomerGatewaysRequest(*ec2.DescribeCustomerGatewaysInput) (*request.Request, *ec2.DescribeCustomerGatewaysOutput)
|
||||
|
||||
DescribeCustomerGateways(*ec2.DescribeCustomerGatewaysInput) (*ec2.DescribeCustomerGatewaysOutput, error)
|
||||
|
||||
DescribeDhcpOptionsRequest(*ec2.DescribeDhcpOptionsInput) (*request.Request, *ec2.DescribeDhcpOptionsOutput)
|
||||
|
||||
DescribeDhcpOptions(*ec2.DescribeDhcpOptionsInput) (*ec2.DescribeDhcpOptionsOutput, error)
|
||||
|
||||
DescribeExportTasksRequest(*ec2.DescribeExportTasksInput) (*request.Request, *ec2.DescribeExportTasksOutput)
|
||||
|
||||
DescribeExportTasks(*ec2.DescribeExportTasksInput) (*ec2.DescribeExportTasksOutput, error)
|
||||
|
||||
DescribeFlowLogsRequest(*ec2.DescribeFlowLogsInput) (*request.Request, *ec2.DescribeFlowLogsOutput)
|
||||
|
||||
DescribeFlowLogs(*ec2.DescribeFlowLogsInput) (*ec2.DescribeFlowLogsOutput, error)
|
||||
|
||||
DescribeHostsRequest(*ec2.DescribeHostsInput) (*request.Request, *ec2.DescribeHostsOutput)
|
||||
|
||||
DescribeHosts(*ec2.DescribeHostsInput) (*ec2.DescribeHostsOutput, error)
|
||||
|
||||
DescribeIdFormatRequest(*ec2.DescribeIdFormatInput) (*request.Request, *ec2.DescribeIdFormatOutput)
|
||||
|
||||
DescribeIdFormat(*ec2.DescribeIdFormatInput) (*ec2.DescribeIdFormatOutput, error)
|
||||
|
||||
DescribeImageAttributeRequest(*ec2.DescribeImageAttributeInput) (*request.Request, *ec2.DescribeImageAttributeOutput)
|
||||
|
||||
DescribeImageAttribute(*ec2.DescribeImageAttributeInput) (*ec2.DescribeImageAttributeOutput, error)
|
||||
|
||||
DescribeImagesRequest(*ec2.DescribeImagesInput) (*request.Request, *ec2.DescribeImagesOutput)
|
||||
|
||||
DescribeImages(*ec2.DescribeImagesInput) (*ec2.DescribeImagesOutput, error)
|
||||
|
||||
DescribeImportImageTasksRequest(*ec2.DescribeImportImageTasksInput) (*request.Request, *ec2.DescribeImportImageTasksOutput)
|
||||
|
||||
DescribeImportImageTasks(*ec2.DescribeImportImageTasksInput) (*ec2.DescribeImportImageTasksOutput, error)
|
||||
|
||||
DescribeImportSnapshotTasksRequest(*ec2.DescribeImportSnapshotTasksInput) (*request.Request, *ec2.DescribeImportSnapshotTasksOutput)
|
||||
|
||||
DescribeImportSnapshotTasks(*ec2.DescribeImportSnapshotTasksInput) (*ec2.DescribeImportSnapshotTasksOutput, error)
|
||||
|
||||
DescribeInstanceAttributeRequest(*ec2.DescribeInstanceAttributeInput) (*request.Request, *ec2.DescribeInstanceAttributeOutput)
|
||||
|
||||
DescribeInstanceAttribute(*ec2.DescribeInstanceAttributeInput) (*ec2.DescribeInstanceAttributeOutput, error)
|
||||
|
||||
DescribeInstanceStatusRequest(*ec2.DescribeInstanceStatusInput) (*request.Request, *ec2.DescribeInstanceStatusOutput)
|
||||
|
||||
DescribeInstanceStatus(*ec2.DescribeInstanceStatusInput) (*ec2.DescribeInstanceStatusOutput, error)
|
||||
|
||||
DescribeInstanceStatusPages(*ec2.DescribeInstanceStatusInput, func(*ec2.DescribeInstanceStatusOutput, bool) bool) error
|
||||
|
||||
DescribeInstancesRequest(*ec2.DescribeInstancesInput) (*request.Request, *ec2.DescribeInstancesOutput)
|
||||
|
||||
DescribeInstances(*ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error)
|
||||
|
||||
DescribeInstancesPages(*ec2.DescribeInstancesInput, func(*ec2.DescribeInstancesOutput, bool) bool) error
|
||||
|
||||
DescribeInternetGatewaysRequest(*ec2.DescribeInternetGatewaysInput) (*request.Request, *ec2.DescribeInternetGatewaysOutput)
|
||||
|
||||
DescribeInternetGateways(*ec2.DescribeInternetGatewaysInput) (*ec2.DescribeInternetGatewaysOutput, error)
|
||||
|
||||
DescribeKeyPairsRequest(*ec2.DescribeKeyPairsInput) (*request.Request, *ec2.DescribeKeyPairsOutput)
|
||||
|
||||
DescribeKeyPairs(*ec2.DescribeKeyPairsInput) (*ec2.DescribeKeyPairsOutput, error)
|
||||
|
||||
DescribeMovingAddressesRequest(*ec2.DescribeMovingAddressesInput) (*request.Request, *ec2.DescribeMovingAddressesOutput)
|
||||
|
||||
DescribeMovingAddresses(*ec2.DescribeMovingAddressesInput) (*ec2.DescribeMovingAddressesOutput, error)
|
||||
|
||||
DescribeNetworkAclsRequest(*ec2.DescribeNetworkAclsInput) (*request.Request, *ec2.DescribeNetworkAclsOutput)
|
||||
|
||||
DescribeNetworkAcls(*ec2.DescribeNetworkAclsInput) (*ec2.DescribeNetworkAclsOutput, error)
|
||||
|
||||
DescribeNetworkInterfaceAttributeRequest(*ec2.DescribeNetworkInterfaceAttributeInput) (*request.Request, *ec2.DescribeNetworkInterfaceAttributeOutput)
|
||||
|
||||
DescribeNetworkInterfaceAttribute(*ec2.DescribeNetworkInterfaceAttributeInput) (*ec2.DescribeNetworkInterfaceAttributeOutput, error)
|
||||
|
||||
DescribeNetworkInterfacesRequest(*ec2.DescribeNetworkInterfacesInput) (*request.Request, *ec2.DescribeNetworkInterfacesOutput)
|
||||
|
||||
DescribeNetworkInterfaces(*ec2.DescribeNetworkInterfacesInput) (*ec2.DescribeNetworkInterfacesOutput, error)
|
||||
|
||||
DescribePlacementGroupsRequest(*ec2.DescribePlacementGroupsInput) (*request.Request, *ec2.DescribePlacementGroupsOutput)
|
||||
|
||||
DescribePlacementGroups(*ec2.DescribePlacementGroupsInput) (*ec2.DescribePlacementGroupsOutput, error)
|
||||
|
||||
DescribePrefixListsRequest(*ec2.DescribePrefixListsInput) (*request.Request, *ec2.DescribePrefixListsOutput)
|
||||
|
||||
DescribePrefixLists(*ec2.DescribePrefixListsInput) (*ec2.DescribePrefixListsOutput, error)
|
||||
|
||||
DescribeRegionsRequest(*ec2.DescribeRegionsInput) (*request.Request, *ec2.DescribeRegionsOutput)
|
||||
|
||||
DescribeRegions(*ec2.DescribeRegionsInput) (*ec2.DescribeRegionsOutput, error)
|
||||
|
||||
DescribeReservedInstancesRequest(*ec2.DescribeReservedInstancesInput) (*request.Request, *ec2.DescribeReservedInstancesOutput)
|
||||
|
||||
DescribeReservedInstances(*ec2.DescribeReservedInstancesInput) (*ec2.DescribeReservedInstancesOutput, error)
|
||||
|
||||
DescribeReservedInstancesListingsRequest(*ec2.DescribeReservedInstancesListingsInput) (*request.Request, *ec2.DescribeReservedInstancesListingsOutput)
|
||||
|
||||
DescribeReservedInstancesListings(*ec2.DescribeReservedInstancesListingsInput) (*ec2.DescribeReservedInstancesListingsOutput, error)
|
||||
|
||||
DescribeReservedInstancesModificationsRequest(*ec2.DescribeReservedInstancesModificationsInput) (*request.Request, *ec2.DescribeReservedInstancesModificationsOutput)
|
||||
|
||||
DescribeReservedInstancesModifications(*ec2.DescribeReservedInstancesModificationsInput) (*ec2.DescribeReservedInstancesModificationsOutput, error)
|
||||
|
||||
DescribeReservedInstancesModificationsPages(*ec2.DescribeReservedInstancesModificationsInput, func(*ec2.DescribeReservedInstancesModificationsOutput, bool) bool) error
|
||||
|
||||
DescribeReservedInstancesOfferingsRequest(*ec2.DescribeReservedInstancesOfferingsInput) (*request.Request, *ec2.DescribeReservedInstancesOfferingsOutput)
|
||||
|
||||
DescribeReservedInstancesOfferings(*ec2.DescribeReservedInstancesOfferingsInput) (*ec2.DescribeReservedInstancesOfferingsOutput, error)
|
||||
|
||||
DescribeReservedInstancesOfferingsPages(*ec2.DescribeReservedInstancesOfferingsInput, func(*ec2.DescribeReservedInstancesOfferingsOutput, bool) bool) error
|
||||
|
||||
DescribeRouteTablesRequest(*ec2.DescribeRouteTablesInput) (*request.Request, *ec2.DescribeRouteTablesOutput)
|
||||
|
||||
DescribeRouteTables(*ec2.DescribeRouteTablesInput) (*ec2.DescribeRouteTablesOutput, error)
|
||||
|
||||
DescribeSecurityGroupsRequest(*ec2.DescribeSecurityGroupsInput) (*request.Request, *ec2.DescribeSecurityGroupsOutput)
|
||||
|
||||
DescribeSecurityGroups(*ec2.DescribeSecurityGroupsInput) (*ec2.DescribeSecurityGroupsOutput, error)
|
||||
|
||||
DescribeSnapshotAttributeRequest(*ec2.DescribeSnapshotAttributeInput) (*request.Request, *ec2.DescribeSnapshotAttributeOutput)
|
||||
|
||||
DescribeSnapshotAttribute(*ec2.DescribeSnapshotAttributeInput) (*ec2.DescribeSnapshotAttributeOutput, error)
|
||||
|
||||
DescribeSnapshotsRequest(*ec2.DescribeSnapshotsInput) (*request.Request, *ec2.DescribeSnapshotsOutput)
|
||||
|
||||
DescribeSnapshots(*ec2.DescribeSnapshotsInput) (*ec2.DescribeSnapshotsOutput, error)
|
||||
|
||||
DescribeSnapshotsPages(*ec2.DescribeSnapshotsInput, func(*ec2.DescribeSnapshotsOutput, bool) bool) error
|
||||
|
||||
DescribeSpotDatafeedSubscriptionRequest(*ec2.DescribeSpotDatafeedSubscriptionInput) (*request.Request, *ec2.DescribeSpotDatafeedSubscriptionOutput)
|
||||
|
||||
DescribeSpotDatafeedSubscription(*ec2.DescribeSpotDatafeedSubscriptionInput) (*ec2.DescribeSpotDatafeedSubscriptionOutput, error)
|
||||
|
||||
DescribeSpotFleetInstancesRequest(*ec2.DescribeSpotFleetInstancesInput) (*request.Request, *ec2.DescribeSpotFleetInstancesOutput)
|
||||
|
||||
DescribeSpotFleetInstances(*ec2.DescribeSpotFleetInstancesInput) (*ec2.DescribeSpotFleetInstancesOutput, error)
|
||||
|
||||
DescribeSpotFleetRequestHistoryRequest(*ec2.DescribeSpotFleetRequestHistoryInput) (*request.Request, *ec2.DescribeSpotFleetRequestHistoryOutput)
|
||||
|
||||
DescribeSpotFleetRequestHistory(*ec2.DescribeSpotFleetRequestHistoryInput) (*ec2.DescribeSpotFleetRequestHistoryOutput, error)
|
||||
|
||||
DescribeSpotFleetRequestsRequest(*ec2.DescribeSpotFleetRequestsInput) (*request.Request, *ec2.DescribeSpotFleetRequestsOutput)
|
||||
|
||||
DescribeSpotFleetRequests(*ec2.DescribeSpotFleetRequestsInput) (*ec2.DescribeSpotFleetRequestsOutput, error)
|
||||
|
||||
DescribeSpotInstanceRequestsRequest(*ec2.DescribeSpotInstanceRequestsInput) (*request.Request, *ec2.DescribeSpotInstanceRequestsOutput)
|
||||
|
||||
DescribeSpotInstanceRequests(*ec2.DescribeSpotInstanceRequestsInput) (*ec2.DescribeSpotInstanceRequestsOutput, error)
|
||||
|
||||
DescribeSpotPriceHistoryRequest(*ec2.DescribeSpotPriceHistoryInput) (*request.Request, *ec2.DescribeSpotPriceHistoryOutput)
|
||||
|
||||
DescribeSpotPriceHistory(*ec2.DescribeSpotPriceHistoryInput) (*ec2.DescribeSpotPriceHistoryOutput, error)
|
||||
|
||||
DescribeSpotPriceHistoryPages(*ec2.DescribeSpotPriceHistoryInput, func(*ec2.DescribeSpotPriceHistoryOutput, bool) bool) error
|
||||
|
||||
DescribeSubnetsRequest(*ec2.DescribeSubnetsInput) (*request.Request, *ec2.DescribeSubnetsOutput)
|
||||
|
||||
DescribeSubnets(*ec2.DescribeSubnetsInput) (*ec2.DescribeSubnetsOutput, error)
|
||||
|
||||
DescribeTagsRequest(*ec2.DescribeTagsInput) (*request.Request, *ec2.DescribeTagsOutput)
|
||||
|
||||
DescribeTags(*ec2.DescribeTagsInput) (*ec2.DescribeTagsOutput, error)
|
||||
|
||||
DescribeTagsPages(*ec2.DescribeTagsInput, func(*ec2.DescribeTagsOutput, bool) bool) error
|
||||
|
||||
DescribeVolumeAttributeRequest(*ec2.DescribeVolumeAttributeInput) (*request.Request, *ec2.DescribeVolumeAttributeOutput)
|
||||
|
||||
DescribeVolumeAttribute(*ec2.DescribeVolumeAttributeInput) (*ec2.DescribeVolumeAttributeOutput, error)
|
||||
|
||||
DescribeVolumeStatusRequest(*ec2.DescribeVolumeStatusInput) (*request.Request, *ec2.DescribeVolumeStatusOutput)
|
||||
|
||||
DescribeVolumeStatus(*ec2.DescribeVolumeStatusInput) (*ec2.DescribeVolumeStatusOutput, error)
|
||||
|
||||
DescribeVolumeStatusPages(*ec2.DescribeVolumeStatusInput, func(*ec2.DescribeVolumeStatusOutput, bool) bool) error
|
||||
|
||||
DescribeVolumesRequest(*ec2.DescribeVolumesInput) (*request.Request, *ec2.DescribeVolumesOutput)
|
||||
|
||||
DescribeVolumes(*ec2.DescribeVolumesInput) (*ec2.DescribeVolumesOutput, error)
|
||||
|
||||
DescribeVolumesPages(*ec2.DescribeVolumesInput, func(*ec2.DescribeVolumesOutput, bool) bool) error
|
||||
|
||||
DescribeVpcAttributeRequest(*ec2.DescribeVpcAttributeInput) (*request.Request, *ec2.DescribeVpcAttributeOutput)
|
||||
|
||||
DescribeVpcAttribute(*ec2.DescribeVpcAttributeInput) (*ec2.DescribeVpcAttributeOutput, error)
|
||||
|
||||
DescribeVpcClassicLinkRequest(*ec2.DescribeVpcClassicLinkInput) (*request.Request, *ec2.DescribeVpcClassicLinkOutput)
|
||||
|
||||
DescribeVpcClassicLink(*ec2.DescribeVpcClassicLinkInput) (*ec2.DescribeVpcClassicLinkOutput, error)
|
||||
|
||||
DescribeVpcEndpointServicesRequest(*ec2.DescribeVpcEndpointServicesInput) (*request.Request, *ec2.DescribeVpcEndpointServicesOutput)
|
||||
|
||||
DescribeVpcEndpointServices(*ec2.DescribeVpcEndpointServicesInput) (*ec2.DescribeVpcEndpointServicesOutput, error)
|
||||
|
||||
DescribeVpcEndpointsRequest(*ec2.DescribeVpcEndpointsInput) (*request.Request, *ec2.DescribeVpcEndpointsOutput)
|
||||
|
||||
DescribeVpcEndpoints(*ec2.DescribeVpcEndpointsInput) (*ec2.DescribeVpcEndpointsOutput, error)
|
||||
|
||||
DescribeVpcPeeringConnectionsRequest(*ec2.DescribeVpcPeeringConnectionsInput) (*request.Request, *ec2.DescribeVpcPeeringConnectionsOutput)
|
||||
|
||||
DescribeVpcPeeringConnections(*ec2.DescribeVpcPeeringConnectionsInput) (*ec2.DescribeVpcPeeringConnectionsOutput, error)
|
||||
|
||||
DescribeVpcsRequest(*ec2.DescribeVpcsInput) (*request.Request, *ec2.DescribeVpcsOutput)
|
||||
|
||||
DescribeVpcs(*ec2.DescribeVpcsInput) (*ec2.DescribeVpcsOutput, error)
|
||||
|
||||
DescribeVpnConnectionsRequest(*ec2.DescribeVpnConnectionsInput) (*request.Request, *ec2.DescribeVpnConnectionsOutput)
|
||||
|
||||
DescribeVpnConnections(*ec2.DescribeVpnConnectionsInput) (*ec2.DescribeVpnConnectionsOutput, error)
|
||||
|
||||
DescribeVpnGatewaysRequest(*ec2.DescribeVpnGatewaysInput) (*request.Request, *ec2.DescribeVpnGatewaysOutput)
|
||||
|
||||
DescribeVpnGateways(*ec2.DescribeVpnGatewaysInput) (*ec2.DescribeVpnGatewaysOutput, error)
|
||||
|
||||
DetachClassicLinkVpcRequest(*ec2.DetachClassicLinkVpcInput) (*request.Request, *ec2.DetachClassicLinkVpcOutput)
|
||||
|
||||
DetachClassicLinkVpc(*ec2.DetachClassicLinkVpcInput) (*ec2.DetachClassicLinkVpcOutput, error)
|
||||
|
||||
DetachInternetGatewayRequest(*ec2.DetachInternetGatewayInput) (*request.Request, *ec2.DetachInternetGatewayOutput)
|
||||
|
||||
DetachInternetGateway(*ec2.DetachInternetGatewayInput) (*ec2.DetachInternetGatewayOutput, error)
|
||||
|
||||
DetachNetworkInterfaceRequest(*ec2.DetachNetworkInterfaceInput) (*request.Request, *ec2.DetachNetworkInterfaceOutput)
|
||||
|
||||
DetachNetworkInterface(*ec2.DetachNetworkInterfaceInput) (*ec2.DetachNetworkInterfaceOutput, error)
|
||||
|
||||
DetachVolumeRequest(*ec2.DetachVolumeInput) (*request.Request, *ec2.VolumeAttachment)
|
||||
|
||||
DetachVolume(*ec2.DetachVolumeInput) (*ec2.VolumeAttachment, error)
|
||||
|
||||
DetachVpnGatewayRequest(*ec2.DetachVpnGatewayInput) (*request.Request, *ec2.DetachVpnGatewayOutput)
|
||||
|
||||
DetachVpnGateway(*ec2.DetachVpnGatewayInput) (*ec2.DetachVpnGatewayOutput, error)
|
||||
|
||||
DisableVgwRoutePropagationRequest(*ec2.DisableVgwRoutePropagationInput) (*request.Request, *ec2.DisableVgwRoutePropagationOutput)
|
||||
|
||||
DisableVgwRoutePropagation(*ec2.DisableVgwRoutePropagationInput) (*ec2.DisableVgwRoutePropagationOutput, error)
|
||||
|
||||
DisableVpcClassicLinkRequest(*ec2.DisableVpcClassicLinkInput) (*request.Request, *ec2.DisableVpcClassicLinkOutput)
|
||||
|
||||
DisableVpcClassicLink(*ec2.DisableVpcClassicLinkInput) (*ec2.DisableVpcClassicLinkOutput, error)
|
||||
|
||||
DisassociateAddressRequest(*ec2.DisassociateAddressInput) (*request.Request, *ec2.DisassociateAddressOutput)
|
||||
|
||||
DisassociateAddress(*ec2.DisassociateAddressInput) (*ec2.DisassociateAddressOutput, error)
|
||||
|
||||
DisassociateRouteTableRequest(*ec2.DisassociateRouteTableInput) (*request.Request, *ec2.DisassociateRouteTableOutput)
|
||||
|
||||
DisassociateRouteTable(*ec2.DisassociateRouteTableInput) (*ec2.DisassociateRouteTableOutput, error)
|
||||
|
||||
EnableVgwRoutePropagationRequest(*ec2.EnableVgwRoutePropagationInput) (*request.Request, *ec2.EnableVgwRoutePropagationOutput)
|
||||
|
||||
EnableVgwRoutePropagation(*ec2.EnableVgwRoutePropagationInput) (*ec2.EnableVgwRoutePropagationOutput, error)
|
||||
|
||||
EnableVolumeIORequest(*ec2.EnableVolumeIOInput) (*request.Request, *ec2.EnableVolumeIOOutput)
|
||||
|
||||
EnableVolumeIO(*ec2.EnableVolumeIOInput) (*ec2.EnableVolumeIOOutput, error)
|
||||
|
||||
EnableVpcClassicLinkRequest(*ec2.EnableVpcClassicLinkInput) (*request.Request, *ec2.EnableVpcClassicLinkOutput)
|
||||
|
||||
EnableVpcClassicLink(*ec2.EnableVpcClassicLinkInput) (*ec2.EnableVpcClassicLinkOutput, error)
|
||||
|
||||
GetConsoleOutputRequest(*ec2.GetConsoleOutputInput) (*request.Request, *ec2.GetConsoleOutputOutput)
|
||||
|
||||
GetConsoleOutput(*ec2.GetConsoleOutputInput) (*ec2.GetConsoleOutputOutput, error)
|
||||
|
||||
GetPasswordDataRequest(*ec2.GetPasswordDataInput) (*request.Request, *ec2.GetPasswordDataOutput)
|
||||
|
||||
GetPasswordData(*ec2.GetPasswordDataInput) (*ec2.GetPasswordDataOutput, error)
|
||||
|
||||
ImportImageRequest(*ec2.ImportImageInput) (*request.Request, *ec2.ImportImageOutput)
|
||||
|
||||
ImportImage(*ec2.ImportImageInput) (*ec2.ImportImageOutput, error)
|
||||
|
||||
ImportInstanceRequest(*ec2.ImportInstanceInput) (*request.Request, *ec2.ImportInstanceOutput)
|
||||
|
||||
ImportInstance(*ec2.ImportInstanceInput) (*ec2.ImportInstanceOutput, error)
|
||||
|
||||
ImportKeyPairRequest(*ec2.ImportKeyPairInput) (*request.Request, *ec2.ImportKeyPairOutput)
|
||||
|
||||
ImportKeyPair(*ec2.ImportKeyPairInput) (*ec2.ImportKeyPairOutput, error)
|
||||
|
||||
ImportSnapshotRequest(*ec2.ImportSnapshotInput) (*request.Request, *ec2.ImportSnapshotOutput)
|
||||
|
||||
ImportSnapshot(*ec2.ImportSnapshotInput) (*ec2.ImportSnapshotOutput, error)
|
||||
|
||||
ImportVolumeRequest(*ec2.ImportVolumeInput) (*request.Request, *ec2.ImportVolumeOutput)
|
||||
|
||||
ImportVolume(*ec2.ImportVolumeInput) (*ec2.ImportVolumeOutput, error)
|
||||
|
||||
ModifyHostsRequest(*ec2.ModifyHostsInput) (*request.Request, *ec2.ModifyHostsOutput)
|
||||
|
||||
ModifyHosts(*ec2.ModifyHostsInput) (*ec2.ModifyHostsOutput, error)
|
||||
|
||||
ModifyIdFormatRequest(*ec2.ModifyIdFormatInput) (*request.Request, *ec2.ModifyIdFormatOutput)
|
||||
|
||||
ModifyIdFormat(*ec2.ModifyIdFormatInput) (*ec2.ModifyIdFormatOutput, error)
|
||||
|
||||
ModifyImageAttributeRequest(*ec2.ModifyImageAttributeInput) (*request.Request, *ec2.ModifyImageAttributeOutput)
|
||||
|
||||
ModifyImageAttribute(*ec2.ModifyImageAttributeInput) (*ec2.ModifyImageAttributeOutput, error)
|
||||
|
||||
ModifyInstanceAttributeRequest(*ec2.ModifyInstanceAttributeInput) (*request.Request, *ec2.ModifyInstanceAttributeOutput)
|
||||
|
||||
ModifyInstanceAttribute(*ec2.ModifyInstanceAttributeInput) (*ec2.ModifyInstanceAttributeOutput, error)
|
||||
|
||||
ModifyInstancePlacementRequest(*ec2.ModifyInstancePlacementInput) (*request.Request, *ec2.ModifyInstancePlacementOutput)
|
||||
|
||||
ModifyInstancePlacement(*ec2.ModifyInstancePlacementInput) (*ec2.ModifyInstancePlacementOutput, error)
|
||||
|
||||
ModifyNetworkInterfaceAttributeRequest(*ec2.ModifyNetworkInterfaceAttributeInput) (*request.Request, *ec2.ModifyNetworkInterfaceAttributeOutput)
|
||||
|
||||
ModifyNetworkInterfaceAttribute(*ec2.ModifyNetworkInterfaceAttributeInput) (*ec2.ModifyNetworkInterfaceAttributeOutput, error)
|
||||
|
||||
ModifyReservedInstancesRequest(*ec2.ModifyReservedInstancesInput) (*request.Request, *ec2.ModifyReservedInstancesOutput)
|
||||
|
||||
ModifyReservedInstances(*ec2.ModifyReservedInstancesInput) (*ec2.ModifyReservedInstancesOutput, error)
|
||||
|
||||
ModifySnapshotAttributeRequest(*ec2.ModifySnapshotAttributeInput) (*request.Request, *ec2.ModifySnapshotAttributeOutput)
|
||||
|
||||
ModifySnapshotAttribute(*ec2.ModifySnapshotAttributeInput) (*ec2.ModifySnapshotAttributeOutput, error)
|
||||
|
||||
ModifySpotFleetRequestRequest(*ec2.ModifySpotFleetRequestInput) (*request.Request, *ec2.ModifySpotFleetRequestOutput)
|
||||
|
||||
ModifySpotFleetRequest(*ec2.ModifySpotFleetRequestInput) (*ec2.ModifySpotFleetRequestOutput, error)
|
||||
|
||||
ModifySubnetAttributeRequest(*ec2.ModifySubnetAttributeInput) (*request.Request, *ec2.ModifySubnetAttributeOutput)
|
||||
|
||||
ModifySubnetAttribute(*ec2.ModifySubnetAttributeInput) (*ec2.ModifySubnetAttributeOutput, error)
|
||||
|
||||
ModifyVolumeAttributeRequest(*ec2.ModifyVolumeAttributeInput) (*request.Request, *ec2.ModifyVolumeAttributeOutput)
|
||||
|
||||
ModifyVolumeAttribute(*ec2.ModifyVolumeAttributeInput) (*ec2.ModifyVolumeAttributeOutput, error)
|
||||
|
||||
ModifyVpcAttributeRequest(*ec2.ModifyVpcAttributeInput) (*request.Request, *ec2.ModifyVpcAttributeOutput)
|
||||
|
||||
ModifyVpcAttribute(*ec2.ModifyVpcAttributeInput) (*ec2.ModifyVpcAttributeOutput, error)
|
||||
|
||||
ModifyVpcEndpointRequest(*ec2.ModifyVpcEndpointInput) (*request.Request, *ec2.ModifyVpcEndpointOutput)
|
||||
|
||||
ModifyVpcEndpoint(*ec2.ModifyVpcEndpointInput) (*ec2.ModifyVpcEndpointOutput, error)
|
||||
|
||||
MonitorInstancesRequest(*ec2.MonitorInstancesInput) (*request.Request, *ec2.MonitorInstancesOutput)
|
||||
|
||||
MonitorInstances(*ec2.MonitorInstancesInput) (*ec2.MonitorInstancesOutput, error)
|
||||
|
||||
MoveAddressToVpcRequest(*ec2.MoveAddressToVpcInput) (*request.Request, *ec2.MoveAddressToVpcOutput)
|
||||
|
||||
MoveAddressToVpc(*ec2.MoveAddressToVpcInput) (*ec2.MoveAddressToVpcOutput, error)
|
||||
|
||||
PurchaseReservedInstancesOfferingRequest(*ec2.PurchaseReservedInstancesOfferingInput) (*request.Request, *ec2.PurchaseReservedInstancesOfferingOutput)
|
||||
|
||||
PurchaseReservedInstancesOffering(*ec2.PurchaseReservedInstancesOfferingInput) (*ec2.PurchaseReservedInstancesOfferingOutput, error)
|
||||
|
||||
RebootInstancesRequest(*ec2.RebootInstancesInput) (*request.Request, *ec2.RebootInstancesOutput)
|
||||
|
||||
RebootInstances(*ec2.RebootInstancesInput) (*ec2.RebootInstancesOutput, error)
|
||||
|
||||
RegisterImageRequest(*ec2.RegisterImageInput) (*request.Request, *ec2.RegisterImageOutput)
|
||||
|
||||
RegisterImage(*ec2.RegisterImageInput) (*ec2.RegisterImageOutput, error)
|
||||
|
||||
RejectVpcPeeringConnectionRequest(*ec2.RejectVpcPeeringConnectionInput) (*request.Request, *ec2.RejectVpcPeeringConnectionOutput)
|
||||
|
||||
RejectVpcPeeringConnection(*ec2.RejectVpcPeeringConnectionInput) (*ec2.RejectVpcPeeringConnectionOutput, error)
|
||||
|
||||
ReleaseAddressRequest(*ec2.ReleaseAddressInput) (*request.Request, *ec2.ReleaseAddressOutput)
|
||||
|
||||
ReleaseAddress(*ec2.ReleaseAddressInput) (*ec2.ReleaseAddressOutput, error)
|
||||
|
||||
ReleaseHostsRequest(*ec2.ReleaseHostsInput) (*request.Request, *ec2.ReleaseHostsOutput)
|
||||
|
||||
ReleaseHosts(*ec2.ReleaseHostsInput) (*ec2.ReleaseHostsOutput, error)
|
||||
|
||||
ReplaceNetworkAclAssociationRequest(*ec2.ReplaceNetworkAclAssociationInput) (*request.Request, *ec2.ReplaceNetworkAclAssociationOutput)
|
||||
|
||||
ReplaceNetworkAclAssociation(*ec2.ReplaceNetworkAclAssociationInput) (*ec2.ReplaceNetworkAclAssociationOutput, error)
|
||||
|
||||
ReplaceNetworkAclEntryRequest(*ec2.ReplaceNetworkAclEntryInput) (*request.Request, *ec2.ReplaceNetworkAclEntryOutput)
|
||||
|
||||
ReplaceNetworkAclEntry(*ec2.ReplaceNetworkAclEntryInput) (*ec2.ReplaceNetworkAclEntryOutput, error)
|
||||
|
||||
ReplaceRouteRequest(*ec2.ReplaceRouteInput) (*request.Request, *ec2.ReplaceRouteOutput)
|
||||
|
||||
ReplaceRoute(*ec2.ReplaceRouteInput) (*ec2.ReplaceRouteOutput, error)
|
||||
|
||||
ReplaceRouteTableAssociationRequest(*ec2.ReplaceRouteTableAssociationInput) (*request.Request, *ec2.ReplaceRouteTableAssociationOutput)
|
||||
|
||||
ReplaceRouteTableAssociation(*ec2.ReplaceRouteTableAssociationInput) (*ec2.ReplaceRouteTableAssociationOutput, error)
|
||||
|
||||
ReportInstanceStatusRequest(*ec2.ReportInstanceStatusInput) (*request.Request, *ec2.ReportInstanceStatusOutput)
|
||||
|
||||
ReportInstanceStatus(*ec2.ReportInstanceStatusInput) (*ec2.ReportInstanceStatusOutput, error)
|
||||
|
||||
RequestSpotFleetRequest(*ec2.RequestSpotFleetInput) (*request.Request, *ec2.RequestSpotFleetOutput)
|
||||
|
||||
RequestSpotFleet(*ec2.RequestSpotFleetInput) (*ec2.RequestSpotFleetOutput, error)
|
||||
|
||||
RequestSpotInstancesRequest(*ec2.RequestSpotInstancesInput) (*request.Request, *ec2.RequestSpotInstancesOutput)
|
||||
|
||||
RequestSpotInstances(*ec2.RequestSpotInstancesInput) (*ec2.RequestSpotInstancesOutput, error)
|
||||
|
||||
ResetImageAttributeRequest(*ec2.ResetImageAttributeInput) (*request.Request, *ec2.ResetImageAttributeOutput)
|
||||
|
||||
ResetImageAttribute(*ec2.ResetImageAttributeInput) (*ec2.ResetImageAttributeOutput, error)
|
||||
|
||||
ResetInstanceAttributeRequest(*ec2.ResetInstanceAttributeInput) (*request.Request, *ec2.ResetInstanceAttributeOutput)
|
||||
|
||||
ResetInstanceAttribute(*ec2.ResetInstanceAttributeInput) (*ec2.ResetInstanceAttributeOutput, error)
|
||||
|
||||
ResetNetworkInterfaceAttributeRequest(*ec2.ResetNetworkInterfaceAttributeInput) (*request.Request, *ec2.ResetNetworkInterfaceAttributeOutput)
|
||||
|
||||
ResetNetworkInterfaceAttribute(*ec2.ResetNetworkInterfaceAttributeInput) (*ec2.ResetNetworkInterfaceAttributeOutput, error)
|
||||
|
||||
ResetSnapshotAttributeRequest(*ec2.ResetSnapshotAttributeInput) (*request.Request, *ec2.ResetSnapshotAttributeOutput)
|
||||
|
||||
ResetSnapshotAttribute(*ec2.ResetSnapshotAttributeInput) (*ec2.ResetSnapshotAttributeOutput, error)
|
||||
|
||||
RestoreAddressToClassicRequest(*ec2.RestoreAddressToClassicInput) (*request.Request, *ec2.RestoreAddressToClassicOutput)
|
||||
|
||||
RestoreAddressToClassic(*ec2.RestoreAddressToClassicInput) (*ec2.RestoreAddressToClassicOutput, error)
|
||||
|
||||
RevokeSecurityGroupEgressRequest(*ec2.RevokeSecurityGroupEgressInput) (*request.Request, *ec2.RevokeSecurityGroupEgressOutput)
|
||||
|
||||
RevokeSecurityGroupEgress(*ec2.RevokeSecurityGroupEgressInput) (*ec2.RevokeSecurityGroupEgressOutput, error)
|
||||
|
||||
RevokeSecurityGroupIngressRequest(*ec2.RevokeSecurityGroupIngressInput) (*request.Request, *ec2.RevokeSecurityGroupIngressOutput)
|
||||
|
||||
RevokeSecurityGroupIngress(*ec2.RevokeSecurityGroupIngressInput) (*ec2.RevokeSecurityGroupIngressOutput, error)
|
||||
|
||||
RunInstancesRequest(*ec2.RunInstancesInput) (*request.Request, *ec2.Reservation)
|
||||
|
||||
RunInstances(*ec2.RunInstancesInput) (*ec2.Reservation, error)
|
||||
|
||||
StartInstancesRequest(*ec2.StartInstancesInput) (*request.Request, *ec2.StartInstancesOutput)
|
||||
|
||||
StartInstances(*ec2.StartInstancesInput) (*ec2.StartInstancesOutput, error)
|
||||
|
||||
StopInstancesRequest(*ec2.StopInstancesInput) (*request.Request, *ec2.StopInstancesOutput)
|
||||
|
||||
StopInstances(*ec2.StopInstancesInput) (*ec2.StopInstancesOutput, error)
|
||||
|
||||
TerminateInstancesRequest(*ec2.TerminateInstancesInput) (*request.Request, *ec2.TerminateInstancesOutput)
|
||||
|
||||
TerminateInstances(*ec2.TerminateInstancesInput) (*ec2.TerminateInstancesOutput, error)
|
||||
|
||||
UnassignPrivateIpAddressesRequest(*ec2.UnassignPrivateIpAddressesInput) (*request.Request, *ec2.UnassignPrivateIpAddressesOutput)
|
||||
|
||||
UnassignPrivateIpAddresses(*ec2.UnassignPrivateIpAddressesInput) (*ec2.UnassignPrivateIpAddressesOutput, error)
|
||||
|
||||
UnmonitorInstancesRequest(*ec2.UnmonitorInstancesInput) (*request.Request, *ec2.UnmonitorInstancesOutput)
|
||||
|
||||
UnmonitorInstances(*ec2.UnmonitorInstancesInput) (*ec2.UnmonitorInstancesOutput, error)
|
||||
}
|
||||
|
||||
var _ EC2API = (*ec2.EC2)(nil)
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
This is an example google app-engine app.
|
||||
|
||||
To use it you will need to install the [App Engine
|
||||
SDK](https://cloud.google.com/appengine/downloads) for Go.
|
||||
|
||||
Then run:
|
||||
|
||||
goapp deploy
|
||||
|
||||
Then open: https://bugsnag-test.appspot.com/ in your web-browser.
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
application: bugsnag-test
|
||||
version: 1
|
||||
runtime: go
|
||||
api_version: go1
|
||||
|
||||
handlers:
|
||||
- url: /.*
|
||||
script: _go_app
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
package mellow
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/bugsnag/bugsnag-go"
|
||||
)
|
||||
|
||||
func init() {
|
||||
bugsnag.OnBeforeNotify(func(event *bugsnag.Event, config *bugsnag.Configuration) error {
|
||||
event.MetaData.AddStruct("original", event.Error.StackFrames())
|
||||
return nil
|
||||
})
|
||||
bugsnag.Configure(bugsnag.Configuration{
|
||||
APIKey: "066f5ad3590596f9aa8d601ea89af845",
|
||||
})
|
||||
|
||||
http.HandleFunc("/", bugsnag.HandlerFunc(handler))
|
||||
}
|
||||
|
||||
func handler(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Fprint(w, "welcome")
|
||||
notifier := bugsnag.New(r)
|
||||
notifier.Notify(fmt.Errorf("oh hia"), bugsnag.MetaData{"env": {"values": os.Environ()}})
|
||||
fmt.Fprint(w, "welcome\n")
|
||||
|
||||
panic("zoomg")
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
2601:9:8480:11d2:7909:b2e5:3722:ef57 - - [08/Jul/2014:01:16:25 -0700] "GET / HTTP/1.1" 500 0 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36"
|
||||
2601:9:8480:11d2:7909:b2e5:3722:ef57 - - [08/Jul/2014:01:16:25 -0700] "GET /favicon.ico HTTP/1.1" 500 0 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36"
|
||||
2601:9:8480:11d2:7909:b2e5:3722:ef57 - - [08/Jul/2014:01:18:20 -0700] "GET / HTTP/1.1" 500 0 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36"
|
||||
2601:9:8480:11d2:7909:b2e5:3722:ef57 - - [08/Jul/2014:01:18:20 -0700] "GET /favicon.ico HTTP/1.1" 500 0 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36"
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/bugsnag/bugsnag-go"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
http.HandleFunc("/", Get)
|
||||
|
||||
bugsnag.Configure(bugsnag.Configuration{
|
||||
APIKey: "066f5ad3590596f9aa8d601ea89af845",
|
||||
})
|
||||
|
||||
log.Println("Serving on 9001")
|
||||
http.ListenAndServe(":9001", bugsnag.Handler(nil))
|
||||
}
|
||||
|
||||
func Get(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(200)
|
||||
w.Write([]byte("OK\n"))
|
||||
|
||||
var a struct{}
|
||||
crash(a)
|
||||
}
|
||||
|
||||
func crash(a interface{}) string {
|
||||
return a.(string)
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
test-results/
|
||||
tmp/
|
||||
routes/
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
package controllers
|
||||
|
||||
import "github.com/revel/revel"
|
||||
import "time"
|
||||
|
||||
type App struct {
|
||||
*revel.Controller
|
||||
}
|
||||
|
||||
func (c App) Index() revel.Result {
|
||||
go func() {
|
||||
time.Sleep(5 * time.Second)
|
||||
panic("hello!")
|
||||
}()
|
||||
|
||||
s := make([]string, 0)
|
||||
revel.INFO.Print(s[0])
|
||||
return c.Render()
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
package app
|
||||
|
||||
import "github.com/revel/revel"
|
||||
import "github.com/bugsnag/bugsnag-go/revel"
|
||||
|
||||
func init() {
|
||||
// Filters is the default set of global filters.
|
||||
revel.Filters = []revel.Filter{
|
||||
revel.PanicFilter, // Recover from panics and display an error page instead.
|
||||
bugsnagrevel.Filter, // Send panics to Bugsnag
|
||||
revel.RouterFilter, // Use the routing table to select the right Action
|
||||
revel.FilterConfiguringFilter, // A hook for adding or removing per-Action filters.
|
||||
revel.ParamsFilter, // Parse parameters into Controller.Params.
|
||||
revel.SessionFilter, // Restore and write the session cookie.
|
||||
revel.FlashFilter, // Restore and write the flash cookie.
|
||||
revel.ValidationFilter, // Restore kept validation errors and save new ones from cookie.
|
||||
revel.I18nFilter, // Resolve the requested language
|
||||
HeaderFilter, // Add some security based headers
|
||||
revel.InterceptorFilter, // Run interceptors around the action.
|
||||
revel.CompressFilter, // Compress the result.
|
||||
revel.ActionInvoker, // Invoke the action.
|
||||
}
|
||||
|
||||
// register startup functions with OnAppStart
|
||||
// ( order dependent )
|
||||
// revel.OnAppStart(InitDB())
|
||||
// revel.OnAppStart(FillCache())
|
||||
}
|
||||
|
||||
// TODO turn this into revel.HeaderFilter
|
||||
// should probably also have a filter for CSRF
|
||||
// not sure if it can go in the same filter or not
|
||||
var HeaderFilter = func(c *revel.Controller, fc []revel.Filter) {
|
||||
// Add some common security headers
|
||||
c.Response.Out.Header().Add("X-Frame-Options", "SAMEORIGIN")
|
||||
c.Response.Out.Header().Add("X-XSS-Protection", "1; mode=block")
|
||||
c.Response.Out.Header().Add("X-Content-Type-Options", "nosniff")
|
||||
|
||||
fc[0](c, fc[1:]) // Execute the next filter stage.
|
||||
}
|
||||
23
vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/app/views/App/Index.html
generated
vendored
23
vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/app/views/App/Index.html
generated
vendored
|
|
@ -1,23 +0,0 @@
|
|||
{{set . "title" "Home"}}
|
||||
{{template "header.html" .}}
|
||||
|
||||
<header class="hero-unit" style="background-color:#A9F16C">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="hero-text">
|
||||
<h1>It works!</h1>
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="span6">
|
||||
{{template "flash.html" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{template "footer.html" .}}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
<style type="text/css">
|
||||
#sidebar {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top:69px;
|
||||
max-width: 75%;
|
||||
z-index: 1000;
|
||||
background-color: #fee;
|
||||
border: thin solid grey;
|
||||
padding: 10px;
|
||||
}
|
||||
#toggleSidebar {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 50px;
|
||||
background-color: #fee;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="sidebar" style="display:none;">
|
||||
<h4>Available pipelines</h4>
|
||||
<dl>
|
||||
{{ range $index, $value := .}}
|
||||
<dt>{{$index}}</dt>
|
||||
<dd>{{$value}}</dd>
|
||||
{{end}}
|
||||
</dl>
|
||||
<h4>Flash</h4>
|
||||
<dl>
|
||||
{{ range $index, $value := .flash}}
|
||||
<dt>{{$index}}</dt>
|
||||
<dd>{{$value}}</dd>
|
||||
{{end}}
|
||||
</dl>
|
||||
|
||||
<h4>Errors</h4>
|
||||
<dl>
|
||||
{{ range $index, $value := .errors}}
|
||||
<dt>{{$index}}</dt>
|
||||
<dd>{{$value}}</dd>
|
||||
{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
<a id="toggleSidebar" href="#" class="toggles"><i class="icon-chevron-left"></i></a>
|
||||
|
||||
<script>
|
||||
$sidebar = 0;
|
||||
$('#toggleSidebar').click(function() {
|
||||
if ($sidebar === 1) {
|
||||
$('#sidebar').hide();
|
||||
$('#toggleSidebar i').addClass('icon-chevron-left');
|
||||
$('#toggleSidebar i').removeClass('icon-chevron-right');
|
||||
$sidebar = 0;
|
||||
}
|
||||
else {
|
||||
$('#sidebar').show();
|
||||
$('#toggleSidebar i').addClass('icon-chevron-right');
|
||||
$('#toggleSidebar i').removeClass('icon-chevron-left');
|
||||
$sidebar = 1;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
20
vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/app/views/errors/404.html
generated
vendored
20
vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/app/views/errors/404.html
generated
vendored
|
|
@ -1,20 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Not found</title>
|
||||
</head>
|
||||
<body>
|
||||
{{if eq .RunMode "dev"}}
|
||||
{{template "errors/404-dev.html" .}}
|
||||
{{else}}
|
||||
{{with .Error}}
|
||||
<h1>
|
||||
{{.Title}}
|
||||
</h1>
|
||||
<p>
|
||||
{{.Description}}
|
||||
</p>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</body>
|
||||
</html>
|
||||
16
vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/app/views/errors/500.html
generated
vendored
16
vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/app/views/errors/500.html
generated
vendored
|
|
@ -1,16 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Application error</title>
|
||||
</head>
|
||||
<body>
|
||||
{{if eq .RunMode "dev"}}
|
||||
{{template "errors/500-dev.html" .}}
|
||||
{{else}}
|
||||
<h1>Oops, an error occured</h1>
|
||||
<p>
|
||||
This exception has been logged.
|
||||
</p>
|
||||
{{end}}
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{{if .flash.success}}
|
||||
<div class="alert alert-success">
|
||||
{{.flash.success}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if or .errors .flash.error}}
|
||||
<div class="alert alert-error">
|
||||
{{if .flash.error}}
|
||||
{{.flash.error}}
|
||||
{{end}}
|
||||
<ul style="margin-top:10px;">
|
||||
{{range .errors}}
|
||||
<li>{{.}}</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{{if eq .RunMode "dev"}}
|
||||
{{template "debug.html" .}}
|
||||
{{end}}
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>{{.title}}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" type="text/css" href="/public/css/bootstrap.css">
|
||||
<link rel="shortcut icon" type="image/png" href="/public/img/favicon.png">
|
||||
<script src="/public/js/jquery-1.9.1.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
{{range .moreStyles}}
|
||||
<link rel="stylesheet" type="text/css" href="/public/{{.}}">
|
||||
{{end}}
|
||||
{{range .moreScripts}}
|
||||
<script src="/public/{{.}}" type="text/javascript" charset="utf-8"></script>
|
||||
{{end}}
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
app.name=revelapp
|
||||
app.secret=80ytgNbBeB0X4mfEYybT4QRXKEoYHoaGAIgZkIB7Z8cEVJjZJOPZupIoluJBMorr
|
||||
http.addr=
|
||||
http.port=9000
|
||||
http.ssl=false
|
||||
http.sslcert=
|
||||
http.sslkey=
|
||||
cookie.httponly=false
|
||||
cookie.prefix=REVEL
|
||||
cookie.secure=false
|
||||
format.date=01/02/2006
|
||||
format.datetime=01/02/2006 15:04
|
||||
results.chunked=false
|
||||
|
||||
log.trace.prefix = "TRACE "
|
||||
log.info.prefix = "INFO "
|
||||
log.warn.prefix = "WARN "
|
||||
log.error.prefix = "ERROR "
|
||||
|
||||
# The default language of this application.
|
||||
i18n.default_language=en
|
||||
|
||||
module.static=github.com/revel/revel/modules/static
|
||||
|
||||
bugsnag.apikey=066f5ad3590596f9aa8d601ea89af845
|
||||
|
||||
[dev]
|
||||
mode.dev=true
|
||||
results.pretty=true
|
||||
watch=true
|
||||
|
||||
module.testrunner = github.com/revel/revel/modules/testrunner
|
||||
|
||||
log.trace.output = off
|
||||
log.info.output = stderr
|
||||
log.warn.output = stderr
|
||||
log.error.output = stderr
|
||||
|
||||
[prod]
|
||||
mode.dev=false
|
||||
results.pretty=false
|
||||
watch=false
|
||||
|
||||
module.testrunner =
|
||||
|
||||
log.trace.output = off
|
||||
log.info.output = off
|
||||
log.warn.output = %(app.name)s.log
|
||||
log.error.output = %(app.name)s.log
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
# Routes
|
||||
# This file defines all application routes (Higher priority routes first)
|
||||
# ~~~~
|
||||
|
||||
module:testrunner
|
||||
|
||||
GET / App.Index
|
||||
|
||||
# Ignore favicon requests
|
||||
GET /favicon.ico 404
|
||||
|
||||
# Map static resources from the /app/public folder to the /public path
|
||||
GET /public/*filepath Static.Serve("public")
|
||||
|
||||
# Catch all
|
||||
* /:controller/:action :controller.:action
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
# Sample messages file for the English language (en)
|
||||
# Message file extensions should be ISO 639-1 codes (http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
|
||||
# Sections within each message file can optionally override the defaults using ISO 3166-1 alpha-2 codes (http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
|
||||
# See also:
|
||||
# - http://www.rfc-editor.org/rfc/bcp/bcp47.txt
|
||||
# - http://www.w3.org/International/questions/qa-accept-lang-locales
|
||||
|
||||
5774
vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/public/css/bootstrap.css
generated
vendored
5774
vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/public/css/bootstrap.css
generated
vendored
File diff suppressed because it is too large
Load Diff
BIN
vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/public/img/favicon.png
generated
vendored
BIN
vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/public/img/favicon.png
generated
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 5.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 8.6 KiB |
BIN
vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/public/img/glyphicons-halflings.png
generated
vendored
BIN
vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/public/img/glyphicons-halflings.png
generated
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
5
vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/public/js/jquery-1.9.1.min.js
generated
vendored
5
vendor/github.com/bugsnag/bugsnag-go/examples/revelapp/public/js/jquery-1.9.1.min.js
generated
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,21 +0,0 @@
|
|||
package tests
|
||||
|
||||
import "github.com/revel/revel"
|
||||
|
||||
type AppTest struct {
|
||||
revel.TestSuite
|
||||
}
|
||||
|
||||
func (t *AppTest) Before() {
|
||||
println("Set up")
|
||||
}
|
||||
|
||||
func (t AppTest) TestThatIndexPageWorks() {
|
||||
t.Get("/")
|
||||
t.AssertOk()
|
||||
t.AssertContentType("text/html; charset=utf-8")
|
||||
}
|
||||
|
||||
func (t *AppTest) After() {
|
||||
println("Tear down")
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
/*
|
||||
Package bugsnagmartini provides a martini middleware that sends
|
||||
panics to Bugsnag. You should use this middleware in combination
|
||||
with martini.Recover() if you want to send error messages to your
|
||||
clients:
|
||||
|
||||
func main() {
|
||||
m := martini.New()
|
||||
// used to stop panics bubbling and return a 500 error.
|
||||
m.Use(martini.Recovery())
|
||||
|
||||
// used to send panics to Bugsnag.
|
||||
m.Use(bugsnagmartini.AutoNotify(bugsnag.Configuration{
|
||||
APIKey: "YOUR_API_KEY_HERE",
|
||||
})
|
||||
|
||||
// ...
|
||||
}
|
||||
|
||||
This middleware also makes bugsnag available to martini handlers via
|
||||
the context.
|
||||
|
||||
func myHandler(w http.ResponseWriter, r *http.Request, bugsnag *bugsnag.Notifier) {
|
||||
// ...
|
||||
bugsnag.Notify(err)
|
||||
// ...
|
||||
}
|
||||
|
||||
*/
|
||||
package bugsnagmartini
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/bugsnag/bugsnag-go"
|
||||
"github.com/go-martini/martini"
|
||||
)
|
||||
|
||||
// AutoNotify sends any panics to bugsnag, and then re-raises them.
|
||||
// You should use this after another middleware that
|
||||
// returns an error page to the client, for example martini.Recover().
|
||||
// The arguments can be any RawData to pass to Bugsnag, most usually
|
||||
// you'll pass a bugsnag.Configuration object.
|
||||
func AutoNotify(rawData ...interface{}) martini.Handler {
|
||||
|
||||
// set the release stage based on the martini environment.
|
||||
rawData = append([]interface{}{bugsnag.Configuration{ReleaseStage: martini.Env}},
|
||||
rawData...)
|
||||
|
||||
return func(r *http.Request, c martini.Context) {
|
||||
|
||||
// create a notifier that has the current request bound to it
|
||||
notifier := bugsnag.New(append(rawData, r)...)
|
||||
defer notifier.AutoNotify(r)
|
||||
c.Map(notifier)
|
||||
c.Next()
|
||||
}
|
||||
}
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
// Package bugsnagrevel adds Bugsnag to revel.
|
||||
// It lets you pass *revel.Controller into bugsnag.Notify(),
|
||||
// and provides a Filter to catch errors.
|
||||
package bugsnagrevel
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/bugsnag/bugsnag-go"
|
||||
"github.com/revel/revel"
|
||||
)
|
||||
|
||||
var once sync.Once
|
||||
|
||||
// Filter should be added to the filter chain just after the PanicFilter.
|
||||
// It sends errors to Bugsnag automatically. Configuration is read out of
|
||||
// conf/app.conf, you should set bugsnag.apikey, and can also set
|
||||
// bugsnag.endpoint, bugsnag.releasestage, bugsnag.appversion,
|
||||
// bugsnag.projectroot, bugsnag.projectpackages if needed.
|
||||
func Filter(c *revel.Controller, fc []revel.Filter) {
|
||||
defer bugsnag.AutoNotify(c)
|
||||
fc[0](c, fc[1:])
|
||||
}
|
||||
|
||||
// Add support to bugsnag for reading data out of *revel.Controllers
|
||||
func middleware(event *bugsnag.Event, config *bugsnag.Configuration) error {
|
||||
for _, datum := range event.RawData {
|
||||
if controller, ok := datum.(*revel.Controller); ok {
|
||||
// make the request visible to the builtin HttpMIddleware
|
||||
event.RawData = append(event.RawData, controller.Request.Request)
|
||||
event.Context = controller.Action
|
||||
event.MetaData.AddStruct("Session", controller.Session)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
revel.OnAppStart(func() {
|
||||
bugsnag.OnBeforeNotify(middleware)
|
||||
|
||||
var projectPackages []string
|
||||
if packages, ok := revel.Config.String("bugsnag.projectpackages"); ok {
|
||||
projectPackages = strings.Split(packages, ",")
|
||||
} else {
|
||||
projectPackages = []string{revel.ImportPath + "/app/*", revel.ImportPath + "/app"}
|
||||
}
|
||||
|
||||
bugsnag.Configure(bugsnag.Configuration{
|
||||
APIKey: revel.Config.StringDefault("bugsnag.apikey", ""),
|
||||
Endpoint: revel.Config.StringDefault("bugsnag.endpoint", ""),
|
||||
AppVersion: revel.Config.StringDefault("bugsnag.appversion", ""),
|
||||
ReleaseStage: revel.Config.StringDefault("bugsnag.releasestage", revel.RunMode),
|
||||
ProjectPackages: projectPackages,
|
||||
Logger: revel.ERROR,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
#! /bin/bash
|
||||
|
||||
: ${PROG:=$(basename ${BASH_SOURCE})}
|
||||
|
||||
_cli_bash_autocomplete() {
|
||||
local cur opts base
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion )
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
}
|
||||
|
||||
complete -F _cli_bash_autocomplete $PROG
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
autoload -U compinit && compinit
|
||||
autoload -U bashcompinit && bashcompinit
|
||||
|
||||
script_dir=$(dirname $0)
|
||||
source ${script_dir}/bash_autocomplete
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
package util
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/digitalocean/godo"
|
||||
)
|
||||
|
||||
const (
|
||||
// activeFailure is the amount of times we can fail before deciding
|
||||
// the check for active is a total failure. This can help account
|
||||
// for servers randomly not answering.
|
||||
activeFailure = 3
|
||||
)
|
||||
|
||||
// WaitForActive waits for a droplet to become active
|
||||
func WaitForActive(client *godo.Client, monitorURI string) error {
|
||||
if len(monitorURI) == 0 {
|
||||
return fmt.Errorf("create had no monitor uri")
|
||||
}
|
||||
|
||||
completed := false
|
||||
failCount := 0
|
||||
for !completed {
|
||||
action, _, err := client.DropletActions.GetByURI(monitorURI)
|
||||
|
||||
if err != nil {
|
||||
if failCount <= activeFailure {
|
||||
failCount++
|
||||
continue
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
switch action.Status {
|
||||
case godo.ActionInProgress:
|
||||
time.Sleep(5 * time.Second)
|
||||
case godo.ActionCompleted:
|
||||
completed = true
|
||||
default:
|
||||
return fmt.Errorf("unknown status: [%s]", action.Status)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
[{
|
||||
"given":
|
||||
{"foo": {"bar": {"baz": "correct"}}},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo",
|
||||
"result": {"bar": {"baz": "correct"}}
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar",
|
||||
"result": {"baz": "correct"}
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar.baz",
|
||||
"result": "correct"
|
||||
},
|
||||
{
|
||||
"expression": "foo\n.\nbar\n.baz",
|
||||
"result": "correct"
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar.baz.bad",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar.bad",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo.bad",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "bad",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "bad.morebad.morebad",
|
||||
"result": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given":
|
||||
{"foo": {"bar": ["one", "two", "three"]}},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo",
|
||||
"result": {"bar": ["one", "two", "three"]}
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar",
|
||||
"result": ["one", "two", "three"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": ["one", "two", "three"],
|
||||
"cases": [
|
||||
{
|
||||
"expression": "one",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "two",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "three",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "one.two",
|
||||
"result": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given":
|
||||
{"foo": {"1": ["one", "two", "three"], "-1": "bar"}},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo.\"1\"",
|
||||
"result": ["one", "two", "three"]
|
||||
},
|
||||
{
|
||||
"expression": "foo.\"1\"[0]",
|
||||
"result": "one"
|
||||
},
|
||||
{
|
||||
"expression": "foo.\"-1\"",
|
||||
"result": "bar"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -1,257 +0,0 @@
|
|||
[
|
||||
{
|
||||
"given": {
|
||||
"outer": {
|
||||
"foo": "foo",
|
||||
"bar": "bar",
|
||||
"baz": "baz"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "outer.foo || outer.bar",
|
||||
"result": "foo"
|
||||
},
|
||||
{
|
||||
"expression": "outer.foo||outer.bar",
|
||||
"result": "foo"
|
||||
},
|
||||
{
|
||||
"expression": "outer.bar || outer.baz",
|
||||
"result": "bar"
|
||||
},
|
||||
{
|
||||
"expression": "outer.bar||outer.baz",
|
||||
"result": "bar"
|
||||
},
|
||||
{
|
||||
"expression": "outer.bad || outer.foo",
|
||||
"result": "foo"
|
||||
},
|
||||
{
|
||||
"expression": "outer.bad||outer.foo",
|
||||
"result": "foo"
|
||||
},
|
||||
{
|
||||
"expression": "outer.foo || outer.bad",
|
||||
"result": "foo"
|
||||
},
|
||||
{
|
||||
"expression": "outer.foo||outer.bad",
|
||||
"result": "foo"
|
||||
},
|
||||
{
|
||||
"expression": "outer.bad || outer.alsobad",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "outer.bad||outer.alsobad",
|
||||
"result": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"outer": {
|
||||
"foo": "foo",
|
||||
"bool": false,
|
||||
"empty_list": [],
|
||||
"empty_string": ""
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "outer.empty_string || outer.foo",
|
||||
"result": "foo"
|
||||
},
|
||||
{
|
||||
"expression": "outer.nokey || outer.bool || outer.empty_list || outer.empty_string || outer.foo",
|
||||
"result": "foo"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"True": true,
|
||||
"False": false,
|
||||
"Number": 5,
|
||||
"EmptyList": [],
|
||||
"Zero": 0
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "True && False",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "False && True",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "True && True",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "False && False",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "True && Number",
|
||||
"result": 5
|
||||
},
|
||||
{
|
||||
"expression": "Number && True",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "Number && False",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "Number && EmptyList",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "Number && True",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "EmptyList && True",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "EmptyList && False",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "True || False",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "True || True",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "False || True",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "False || False",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "Number || EmptyList",
|
||||
"result": 5
|
||||
},
|
||||
{
|
||||
"expression": "Number || True",
|
||||
"result": 5
|
||||
},
|
||||
{
|
||||
"expression": "Number || True && False",
|
||||
"result": 5
|
||||
},
|
||||
{
|
||||
"expression": "(Number || True) && False",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "Number || (True && False)",
|
||||
"result": 5
|
||||
},
|
||||
{
|
||||
"expression": "!True",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "!False",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "!Number",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "!EmptyList",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "True && !False",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "True && !EmptyList",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "!False && !EmptyList",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "!(True && False)",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "!Zero",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "!!Zero",
|
||||
"result": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"one": 1,
|
||||
"two": 2,
|
||||
"three": 3
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "one < two",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "one <= two",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "one == one",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "one == two",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "one > two",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "one >= two",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "one != two",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "one < two && three > one",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "one < two || three > one",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "one < two || three < one",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "two < one || three < one",
|
||||
"result": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
[
|
||||
{
|
||||
"given": {
|
||||
"foo": [{"name": "a"}, {"name": "b"}],
|
||||
"bar": {"baz": "qux"}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "@",
|
||||
"result": {
|
||||
"foo": [{"name": "a"}, {"name": "b"}],
|
||||
"bar": {"baz": "qux"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"expression": "@.bar",
|
||||
"result": {"baz": "qux"}
|
||||
},
|
||||
{
|
||||
"expression": "@.foo[0]",
|
||||
"result": {"name": "a"}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
[{
|
||||
"given": {
|
||||
"foo.bar": "dot",
|
||||
"foo bar": "space",
|
||||
"foo\nbar": "newline",
|
||||
"foo\"bar": "doublequote",
|
||||
"c:\\\\windows\\path": "windows",
|
||||
"/unix/path": "unix",
|
||||
"\"\"\"": "threequotes",
|
||||
"bar": {"baz": "qux"}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "\"foo.bar\"",
|
||||
"result": "dot"
|
||||
},
|
||||
{
|
||||
"expression": "\"foo bar\"",
|
||||
"result": "space"
|
||||
},
|
||||
{
|
||||
"expression": "\"foo\\nbar\"",
|
||||
"result": "newline"
|
||||
},
|
||||
{
|
||||
"expression": "\"foo\\\"bar\"",
|
||||
"result": "doublequote"
|
||||
},
|
||||
{
|
||||
"expression": "\"c:\\\\\\\\windows\\\\path\"",
|
||||
"result": "windows"
|
||||
},
|
||||
{
|
||||
"expression": "\"/unix/path\"",
|
||||
"result": "unix"
|
||||
},
|
||||
{
|
||||
"expression": "\"\\\"\\\"\\\"\"",
|
||||
"result": "threequotes"
|
||||
},
|
||||
{
|
||||
"expression": "\"bar\".\"baz\"",
|
||||
"result": "qux"
|
||||
}
|
||||
]
|
||||
}]
|
||||
|
|
@ -1,468 +0,0 @@
|
|||
[
|
||||
{
|
||||
"given": {"foo": [{"name": "a"}, {"name": "b"}]},
|
||||
"cases": [
|
||||
{
|
||||
"comment": "Matching a literal",
|
||||
"expression": "foo[?name == 'a']",
|
||||
"result": [{"name": "a"}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {"foo": [0, 1], "bar": [2, 3]},
|
||||
"cases": [
|
||||
{
|
||||
"comment": "Matching a literal",
|
||||
"expression": "*[?[0] == `0`]",
|
||||
"result": [[], []]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {"foo": [{"first": "foo", "last": "bar"},
|
||||
{"first": "foo", "last": "foo"},
|
||||
{"first": "foo", "last": "baz"}]},
|
||||
"cases": [
|
||||
{
|
||||
"comment": "Matching an expression",
|
||||
"expression": "foo[?first == last]",
|
||||
"result": [{"first": "foo", "last": "foo"}]
|
||||
},
|
||||
{
|
||||
"comment": "Verify projection created from filter",
|
||||
"expression": "foo[?first == last].first",
|
||||
"result": ["foo"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {"foo": [{"age": 20},
|
||||
{"age": 25},
|
||||
{"age": 30}]},
|
||||
"cases": [
|
||||
{
|
||||
"comment": "Greater than with a number",
|
||||
"expression": "foo[?age > `25`]",
|
||||
"result": [{"age": 30}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?age >= `25`]",
|
||||
"result": [{"age": 25}, {"age": 30}]
|
||||
},
|
||||
{
|
||||
"comment": "Greater than with a number",
|
||||
"expression": "foo[?age > `30`]",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"comment": "Greater than with a number",
|
||||
"expression": "foo[?age < `25`]",
|
||||
"result": [{"age": 20}]
|
||||
},
|
||||
{
|
||||
"comment": "Greater than with a number",
|
||||
"expression": "foo[?age <= `25`]",
|
||||
"result": [{"age": 20}, {"age": 25}]
|
||||
},
|
||||
{
|
||||
"comment": "Greater than with a number",
|
||||
"expression": "foo[?age < `20`]",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "foo[?age == `20`]",
|
||||
"result": [{"age": 20}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?age != `20`]",
|
||||
"result": [{"age": 25}, {"age": 30}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {"foo": [{"top": {"name": "a"}},
|
||||
{"top": {"name": "b"}}]},
|
||||
"cases": [
|
||||
{
|
||||
"comment": "Filter with subexpression",
|
||||
"expression": "foo[?top.name == 'a']",
|
||||
"result": [{"top": {"name": "a"}}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {"foo": [{"top": {"first": "foo", "last": "bar"}},
|
||||
{"top": {"first": "foo", "last": "foo"}},
|
||||
{"top": {"first": "foo", "last": "baz"}}]},
|
||||
"cases": [
|
||||
{
|
||||
"comment": "Matching an expression",
|
||||
"expression": "foo[?top.first == top.last]",
|
||||
"result": [{"top": {"first": "foo", "last": "foo"}}]
|
||||
},
|
||||
{
|
||||
"comment": "Matching a JSON array",
|
||||
"expression": "foo[?top == `{\"first\": \"foo\", \"last\": \"bar\"}`]",
|
||||
"result": [{"top": {"first": "foo", "last": "bar"}}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {"foo": [
|
||||
{"key": true},
|
||||
{"key": false},
|
||||
{"key": 0},
|
||||
{"key": 1},
|
||||
{"key": [0]},
|
||||
{"key": {"bar": [0]}},
|
||||
{"key": null},
|
||||
{"key": [1]},
|
||||
{"key": {"a":2}}
|
||||
]},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo[?key == `true`]",
|
||||
"result": [{"key": true}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?key == `false`]",
|
||||
"result": [{"key": false}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?key == `0`]",
|
||||
"result": [{"key": 0}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?key == `1`]",
|
||||
"result": [{"key": 1}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?key == `[0]`]",
|
||||
"result": [{"key": [0]}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?key == `{\"bar\": [0]}`]",
|
||||
"result": [{"key": {"bar": [0]}}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?key == `null`]",
|
||||
"result": [{"key": null}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?key == `[1]`]",
|
||||
"result": [{"key": [1]}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?key == `{\"a\":2}`]",
|
||||
"result": [{"key": {"a":2}}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?`true` == key]",
|
||||
"result": [{"key": true}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?`false` == key]",
|
||||
"result": [{"key": false}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?`0` == key]",
|
||||
"result": [{"key": 0}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?`1` == key]",
|
||||
"result": [{"key": 1}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?`[0]` == key]",
|
||||
"result": [{"key": [0]}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?`{\"bar\": [0]}` == key]",
|
||||
"result": [{"key": {"bar": [0]}}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?`null` == key]",
|
||||
"result": [{"key": null}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?`[1]` == key]",
|
||||
"result": [{"key": [1]}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?`{\"a\":2}` == key]",
|
||||
"result": [{"key": {"a":2}}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?key != `true`]",
|
||||
"result": [{"key": false}, {"key": 0}, {"key": 1}, {"key": [0]},
|
||||
{"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?key != `false`]",
|
||||
"result": [{"key": true}, {"key": 0}, {"key": 1}, {"key": [0]},
|
||||
{"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?key != `0`]",
|
||||
"result": [{"key": true}, {"key": false}, {"key": 1}, {"key": [0]},
|
||||
{"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?key != `1`]",
|
||||
"result": [{"key": true}, {"key": false}, {"key": 0}, {"key": [0]},
|
||||
{"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?key != `null`]",
|
||||
"result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]},
|
||||
{"key": {"bar": [0]}}, {"key": [1]}, {"key": {"a":2}}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?key != `[1]`]",
|
||||
"result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]},
|
||||
{"key": {"bar": [0]}}, {"key": null}, {"key": {"a":2}}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?key != `{\"a\":2}`]",
|
||||
"result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]},
|
||||
{"key": {"bar": [0]}}, {"key": null}, {"key": [1]}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?`true` != key]",
|
||||
"result": [{"key": false}, {"key": 0}, {"key": 1}, {"key": [0]},
|
||||
{"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?`false` != key]",
|
||||
"result": [{"key": true}, {"key": 0}, {"key": 1}, {"key": [0]},
|
||||
{"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?`0` != key]",
|
||||
"result": [{"key": true}, {"key": false}, {"key": 1}, {"key": [0]},
|
||||
{"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?`1` != key]",
|
||||
"result": [{"key": true}, {"key": false}, {"key": 0}, {"key": [0]},
|
||||
{"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?`null` != key]",
|
||||
"result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]},
|
||||
{"key": {"bar": [0]}}, {"key": [1]}, {"key": {"a":2}}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?`[1]` != key]",
|
||||
"result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]},
|
||||
{"key": {"bar": [0]}}, {"key": null}, {"key": {"a":2}}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?`{\"a\":2}` != key]",
|
||||
"result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]},
|
||||
{"key": {"bar": [0]}}, {"key": null}, {"key": [1]}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {"reservations": [
|
||||
{"instances": [
|
||||
{"foo": 1, "bar": 2}, {"foo": 1, "bar": 3},
|
||||
{"foo": 1, "bar": 2}, {"foo": 2, "bar": 1}]}]},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "reservations[].instances[?bar==`1`]",
|
||||
"result": [[{"foo": 2, "bar": 1}]]
|
||||
},
|
||||
{
|
||||
"expression": "reservations[*].instances[?bar==`1`]",
|
||||
"result": [[{"foo": 2, "bar": 1}]]
|
||||
},
|
||||
{
|
||||
"expression": "reservations[].instances[?bar==`1`][]",
|
||||
"result": [{"foo": 2, "bar": 1}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"baz": "other",
|
||||
"foo": [
|
||||
{"bar": 1}, {"bar": 2}, {"bar": 3}, {"bar": 4}, {"bar": 1, "baz": 2}
|
||||
]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo[?bar==`1`].bar[0]",
|
||||
"result": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"foo": [
|
||||
{"a": 1, "b": {"c": "x"}},
|
||||
{"a": 1, "b": {"c": "y"}},
|
||||
{"a": 1, "b": {"c": "z"}},
|
||||
{"a": 2, "b": {"c": "z"}},
|
||||
{"a": 1, "baz": 2}
|
||||
]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo[?a==`1`].b.c",
|
||||
"result": ["x", "y", "z"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {"foo": [{"name": "a"}, {"name": "b"}, {"name": "c"}]},
|
||||
"cases": [
|
||||
{
|
||||
"comment": "Filter with or expression",
|
||||
"expression": "foo[?name == 'a' || name == 'b']",
|
||||
"result": [{"name": "a"}, {"name": "b"}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?name == 'a' || name == 'e']",
|
||||
"result": [{"name": "a"}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?name == 'a' || name == 'b' || name == 'c']",
|
||||
"result": [{"name": "a"}, {"name": "b"}, {"name": "c"}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {"foo": [{"a": 1, "b": 2}, {"a": 1, "b": 3}]},
|
||||
"cases": [
|
||||
{
|
||||
"comment": "Filter with and expression",
|
||||
"expression": "foo[?a == `1` && b == `2`]",
|
||||
"result": [{"a": 1, "b": 2}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?a == `1` && b == `4`]",
|
||||
"result": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {"foo": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]},
|
||||
"cases": [
|
||||
{
|
||||
"comment": "Filter with Or and And expressions",
|
||||
"expression": "foo[?c == `3` || a == `1` && b == `4`]",
|
||||
"result": [{"a": 1, "b": 2, "c": 3}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?b == `2` || a == `3` && b == `4`]",
|
||||
"result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?a == `3` && b == `4` || b == `2`]",
|
||||
"result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?(a == `3` && b == `4`) || b == `2`]",
|
||||
"result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?((a == `3` && b == `4`)) || b == `2`]",
|
||||
"result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?a == `3` && (b == `4` || b == `2`)]",
|
||||
"result": [{"a": 3, "b": 4}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[?a == `3` && ((b == `4` || b == `2`))]",
|
||||
"result": [{"a": 3, "b": 4}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {"foo": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]},
|
||||
"cases": [
|
||||
{
|
||||
"comment": "Verify precedence of or/and expressions",
|
||||
"expression": "foo[?a == `1` || b ==`2` && c == `5`]",
|
||||
"result": [{"a": 1, "b": 2, "c": 3}]
|
||||
},
|
||||
{
|
||||
"comment": "Parentheses can alter precedence",
|
||||
"expression": "foo[?(a == `1` || b ==`2`) && c == `5`]",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"comment": "Not expressions combined with and/or",
|
||||
"expression": "foo[?!(a == `1` || b ==`2`)]",
|
||||
"result": [{"a": 3, "b": 4}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"foo": [
|
||||
{"key": true},
|
||||
{"key": false},
|
||||
{"key": []},
|
||||
{"key": {}},
|
||||
{"key": [0]},
|
||||
{"key": {"a": "b"}},
|
||||
{"key": 0},
|
||||
{"key": 1},
|
||||
{"key": null},
|
||||
{"notkey": true}
|
||||
]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"comment": "Unary filter expression",
|
||||
"expression": "foo[?key]",
|
||||
"result": [
|
||||
{"key": true}, {"key": [0]}, {"key": {"a": "b"}},
|
||||
{"key": 0}, {"key": 1}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "Unary not filter expression",
|
||||
"expression": "foo[?!key]",
|
||||
"result": [
|
||||
{"key": false}, {"key": []}, {"key": {}},
|
||||
{"key": null}, {"notkey": true}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "Equality with null RHS",
|
||||
"expression": "foo[?key == `null`]",
|
||||
"result": [
|
||||
{"key": null}, {"notkey": true}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"foo": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"comment": "Using @ in a filter expression",
|
||||
"expression": "foo[?@ < `5`]",
|
||||
"result": [0, 1, 2, 3, 4]
|
||||
},
|
||||
{
|
||||
"comment": "Using @ in a filter expression",
|
||||
"expression": "foo[?`5` > @]",
|
||||
"result": [0, 1, 2, 3, 4]
|
||||
},
|
||||
{
|
||||
"comment": "Using @ in a filter expression",
|
||||
"expression": "foo[?@ == @]",
|
||||
"result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -1,825 +0,0 @@
|
|||
[{
|
||||
"given":
|
||||
{
|
||||
"foo": -1,
|
||||
"zero": 0,
|
||||
"numbers": [-1, 3, 4, 5],
|
||||
"array": [-1, 3, 4, 5, "a", "100"],
|
||||
"strings": ["a", "b", "c"],
|
||||
"decimals": [1.01, 1.2, -1.5],
|
||||
"str": "Str",
|
||||
"false": false,
|
||||
"empty_list": [],
|
||||
"empty_hash": {},
|
||||
"objects": {"foo": "bar", "bar": "baz"},
|
||||
"null_key": null
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "abs(foo)",
|
||||
"result": 1
|
||||
},
|
||||
{
|
||||
"expression": "abs(foo)",
|
||||
"result": 1
|
||||
},
|
||||
{
|
||||
"expression": "abs(str)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "abs(array[1])",
|
||||
"result": 3
|
||||
},
|
||||
{
|
||||
"expression": "abs(array[1])",
|
||||
"result": 3
|
||||
},
|
||||
{
|
||||
"expression": "abs(`false`)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "abs(`-24`)",
|
||||
"result": 24
|
||||
},
|
||||
{
|
||||
"expression": "abs(`-24`)",
|
||||
"result": 24
|
||||
},
|
||||
{
|
||||
"expression": "abs(`1`, `2`)",
|
||||
"error": "invalid-arity"
|
||||
},
|
||||
{
|
||||
"expression": "abs()",
|
||||
"error": "invalid-arity"
|
||||
},
|
||||
{
|
||||
"expression": "unknown_function(`1`, `2`)",
|
||||
"error": "unknown-function"
|
||||
},
|
||||
{
|
||||
"expression": "avg(numbers)",
|
||||
"result": 2.75
|
||||
},
|
||||
{
|
||||
"expression": "avg(array)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "avg('abc')",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "avg(foo)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "avg(@)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "avg(strings)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "ceil(`1.2`)",
|
||||
"result": 2
|
||||
},
|
||||
{
|
||||
"expression": "ceil(decimals[0])",
|
||||
"result": 2
|
||||
},
|
||||
{
|
||||
"expression": "ceil(decimals[1])",
|
||||
"result": 2
|
||||
},
|
||||
{
|
||||
"expression": "ceil(decimals[2])",
|
||||
"result": -1
|
||||
},
|
||||
{
|
||||
"expression": "ceil('string')",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "contains('abc', 'a')",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "contains('abc', 'd')",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "contains(`false`, 'd')",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "contains(strings, 'a')",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "contains(decimals, `1.2`)",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "contains(decimals, `false`)",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "ends_with(str, 'r')",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "ends_with(str, 'tr')",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "ends_with(str, 'Str')",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "ends_with(str, 'SStr')",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "ends_with(str, 'foo')",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "ends_with(str, `0`)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "floor(`1.2`)",
|
||||
"result": 1
|
||||
},
|
||||
{
|
||||
"expression": "floor('string')",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "floor(decimals[0])",
|
||||
"result": 1
|
||||
},
|
||||
{
|
||||
"expression": "floor(foo)",
|
||||
"result": -1
|
||||
},
|
||||
{
|
||||
"expression": "floor(str)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "length('abc')",
|
||||
"result": 3
|
||||
},
|
||||
{
|
||||
"expression": "length('✓foo')",
|
||||
"result": 4
|
||||
},
|
||||
{
|
||||
"expression": "length('')",
|
||||
"result": 0
|
||||
},
|
||||
{
|
||||
"expression": "length(@)",
|
||||
"result": 12
|
||||
},
|
||||
{
|
||||
"expression": "length(strings[0])",
|
||||
"result": 1
|
||||
},
|
||||
{
|
||||
"expression": "length(str)",
|
||||
"result": 3
|
||||
},
|
||||
{
|
||||
"expression": "length(array)",
|
||||
"result": 6
|
||||
},
|
||||
{
|
||||
"expression": "length(objects)",
|
||||
"result": 2
|
||||
},
|
||||
{
|
||||
"expression": "length(`false`)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "length(foo)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "length(strings[0])",
|
||||
"result": 1
|
||||
},
|
||||
{
|
||||
"expression": "max(numbers)",
|
||||
"result": 5
|
||||
},
|
||||
{
|
||||
"expression": "max(decimals)",
|
||||
"result": 1.2
|
||||
},
|
||||
{
|
||||
"expression": "max(strings)",
|
||||
"result": "c"
|
||||
},
|
||||
{
|
||||
"expression": "max(abc)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "max(array)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "max(decimals)",
|
||||
"result": 1.2
|
||||
},
|
||||
{
|
||||
"expression": "max(empty_list)",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "merge(`{}`)",
|
||||
"result": {}
|
||||
},
|
||||
{
|
||||
"expression": "merge(`{}`, `{}`)",
|
||||
"result": {}
|
||||
},
|
||||
{
|
||||
"expression": "merge(`{\"a\": 1}`, `{\"b\": 2}`)",
|
||||
"result": {"a": 1, "b": 2}
|
||||
},
|
||||
{
|
||||
"expression": "merge(`{\"a\": 1}`, `{\"a\": 2}`)",
|
||||
"result": {"a": 2}
|
||||
},
|
||||
{
|
||||
"expression": "merge(`{\"a\": 1, \"b\": 2}`, `{\"a\": 2, \"c\": 3}`, `{\"d\": 4}`)",
|
||||
"result": {"a": 2, "b": 2, "c": 3, "d": 4}
|
||||
},
|
||||
{
|
||||
"expression": "min(numbers)",
|
||||
"result": -1
|
||||
},
|
||||
{
|
||||
"expression": "min(decimals)",
|
||||
"result": -1.5
|
||||
},
|
||||
{
|
||||
"expression": "min(abc)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "min(array)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "min(empty_list)",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "min(decimals)",
|
||||
"result": -1.5
|
||||
},
|
||||
{
|
||||
"expression": "min(strings)",
|
||||
"result": "a"
|
||||
},
|
||||
{
|
||||
"expression": "type('abc')",
|
||||
"result": "string"
|
||||
},
|
||||
{
|
||||
"expression": "type(`1.0`)",
|
||||
"result": "number"
|
||||
},
|
||||
{
|
||||
"expression": "type(`2`)",
|
||||
"result": "number"
|
||||
},
|
||||
{
|
||||
"expression": "type(`true`)",
|
||||
"result": "boolean"
|
||||
},
|
||||
{
|
||||
"expression": "type(`false`)",
|
||||
"result": "boolean"
|
||||
},
|
||||
{
|
||||
"expression": "type(`null`)",
|
||||
"result": "null"
|
||||
},
|
||||
{
|
||||
"expression": "type(`[0]`)",
|
||||
"result": "array"
|
||||
},
|
||||
{
|
||||
"expression": "type(`{\"a\": \"b\"}`)",
|
||||
"result": "object"
|
||||
},
|
||||
{
|
||||
"expression": "type(@)",
|
||||
"result": "object"
|
||||
},
|
||||
{
|
||||
"expression": "sort(keys(objects))",
|
||||
"result": ["bar", "foo"]
|
||||
},
|
||||
{
|
||||
"expression": "keys(foo)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "keys(strings)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "keys(`false`)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "sort(values(objects))",
|
||||
"result": ["bar", "baz"]
|
||||
},
|
||||
{
|
||||
"expression": "keys(empty_hash)",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "values(foo)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "join(', ', strings)",
|
||||
"result": "a, b, c"
|
||||
},
|
||||
{
|
||||
"expression": "join(', ', strings)",
|
||||
"result": "a, b, c"
|
||||
},
|
||||
{
|
||||
"expression": "join(',', `[\"a\", \"b\"]`)",
|
||||
"result": "a,b"
|
||||
},
|
||||
{
|
||||
"expression": "join(',', `[\"a\", 0]`)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "join(', ', str)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "join('|', strings)",
|
||||
"result": "a|b|c"
|
||||
},
|
||||
{
|
||||
"expression": "join(`2`, strings)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "join('|', decimals)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "join('|', decimals[].to_string(@))",
|
||||
"result": "1.01|1.2|-1.5"
|
||||
},
|
||||
{
|
||||
"expression": "join('|', empty_list)",
|
||||
"result": ""
|
||||
},
|
||||
{
|
||||
"expression": "reverse(numbers)",
|
||||
"result": [5, 4, 3, -1]
|
||||
},
|
||||
{
|
||||
"expression": "reverse(array)",
|
||||
"result": ["100", "a", 5, 4, 3, -1]
|
||||
},
|
||||
{
|
||||
"expression": "reverse(`[]`)",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "reverse('')",
|
||||
"result": ""
|
||||
},
|
||||
{
|
||||
"expression": "reverse('hello world')",
|
||||
"result": "dlrow olleh"
|
||||
},
|
||||
{
|
||||
"expression": "starts_with(str, 'S')",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "starts_with(str, 'St')",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "starts_with(str, 'Str')",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "starts_with(str, 'String')",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "starts_with(str, `0`)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "sum(numbers)",
|
||||
"result": 11
|
||||
},
|
||||
{
|
||||
"expression": "sum(decimals)",
|
||||
"result": 0.71
|
||||
},
|
||||
{
|
||||
"expression": "sum(array)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "sum(array[].to_number(@))",
|
||||
"result": 111
|
||||
},
|
||||
{
|
||||
"expression": "sum(`[]`)",
|
||||
"result": 0
|
||||
},
|
||||
{
|
||||
"expression": "to_array('foo')",
|
||||
"result": ["foo"]
|
||||
},
|
||||
{
|
||||
"expression": "to_array(`0`)",
|
||||
"result": [0]
|
||||
},
|
||||
{
|
||||
"expression": "to_array(objects)",
|
||||
"result": [{"foo": "bar", "bar": "baz"}]
|
||||
},
|
||||
{
|
||||
"expression": "to_array(`[1, 2, 3]`)",
|
||||
"result": [1, 2, 3]
|
||||
},
|
||||
{
|
||||
"expression": "to_array(false)",
|
||||
"result": [false]
|
||||
},
|
||||
{
|
||||
"expression": "to_string('foo')",
|
||||
"result": "foo"
|
||||
},
|
||||
{
|
||||
"expression": "to_string(`1.2`)",
|
||||
"result": "1.2"
|
||||
},
|
||||
{
|
||||
"expression": "to_string(`[0, 1]`)",
|
||||
"result": "[0,1]"
|
||||
},
|
||||
{
|
||||
"expression": "to_number('1.0')",
|
||||
"result": 1.0
|
||||
},
|
||||
{
|
||||
"expression": "to_number('1.1')",
|
||||
"result": 1.1
|
||||
},
|
||||
{
|
||||
"expression": "to_number('4')",
|
||||
"result": 4
|
||||
},
|
||||
{
|
||||
"expression": "to_number('notanumber')",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "to_number(`false`)",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "to_number(`null`)",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "to_number(`[0]`)",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "to_number(`{\"foo\": 0}`)",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "\"to_string\"(`1.0`)",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "sort(numbers)",
|
||||
"result": [-1, 3, 4, 5]
|
||||
},
|
||||
{
|
||||
"expression": "sort(strings)",
|
||||
"result": ["a", "b", "c"]
|
||||
},
|
||||
{
|
||||
"expression": "sort(decimals)",
|
||||
"result": [-1.5, 1.01, 1.2]
|
||||
},
|
||||
{
|
||||
"expression": "sort(array)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "sort(abc)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "sort(empty_list)",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "sort(@)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "not_null(unknown_key, str)",
|
||||
"result": "Str"
|
||||
},
|
||||
{
|
||||
"expression": "not_null(unknown_key, foo.bar, empty_list, str)",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "not_null(unknown_key, null_key, empty_list, str)",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "not_null(all, expressions, are_null)",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "not_null()",
|
||||
"error": "invalid-arity"
|
||||
},
|
||||
{
|
||||
"description": "function projection on single arg function",
|
||||
"expression": "numbers[].to_string(@)",
|
||||
"result": ["-1", "3", "4", "5"]
|
||||
},
|
||||
{
|
||||
"description": "function projection on single arg function",
|
||||
"expression": "array[].to_number(@)",
|
||||
"result": [-1, 3, 4, 5, 100]
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given":
|
||||
{
|
||||
"foo": [
|
||||
{"b": "b", "a": "a"},
|
||||
{"c": "c", "b": "b"},
|
||||
{"d": "d", "c": "c"},
|
||||
{"e": "e", "d": "d"},
|
||||
{"f": "f", "e": "e"}
|
||||
]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"description": "function projection on variadic function",
|
||||
"expression": "foo[].not_null(f, e, d, c, b, a)",
|
||||
"result": ["b", "c", "d", "e", "f"]
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given":
|
||||
{
|
||||
"people": [
|
||||
{"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"},
|
||||
{"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"},
|
||||
{"age": 30, "age_str": "30", "bool": true, "name": "c"},
|
||||
{"age": 50, "age_str": "50", "bool": false, "name": "d"},
|
||||
{"age": 10, "age_str": "10", "bool": true, "name": 3}
|
||||
]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"description": "sort by field expression",
|
||||
"expression": "sort_by(people, &age)",
|
||||
"result": [
|
||||
{"age": 10, "age_str": "10", "bool": true, "name": 3},
|
||||
{"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"},
|
||||
{"age": 30, "age_str": "30", "bool": true, "name": "c"},
|
||||
{"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"},
|
||||
{"age": 50, "age_str": "50", "bool": false, "name": "d"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"expression": "sort_by(people, &age_str)",
|
||||
"result": [
|
||||
{"age": 10, "age_str": "10", "bool": true, "name": 3},
|
||||
{"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"},
|
||||
{"age": 30, "age_str": "30", "bool": true, "name": "c"},
|
||||
{"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"},
|
||||
{"age": 50, "age_str": "50", "bool": false, "name": "d"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "sort by function expression",
|
||||
"expression": "sort_by(people, &to_number(age_str))",
|
||||
"result": [
|
||||
{"age": 10, "age_str": "10", "bool": true, "name": 3},
|
||||
{"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"},
|
||||
{"age": 30, "age_str": "30", "bool": true, "name": "c"},
|
||||
{"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"},
|
||||
{"age": 50, "age_str": "50", "bool": false, "name": "d"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "function projection on sort_by function",
|
||||
"expression": "sort_by(people, &age)[].name",
|
||||
"result": [3, "a", "c", "b", "d"]
|
||||
},
|
||||
{
|
||||
"expression": "sort_by(people, &extra)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "sort_by(people, &bool)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "sort_by(people, &name)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "sort_by(people, name)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "sort_by(people, &age)[].extra",
|
||||
"result": ["foo", "bar"]
|
||||
},
|
||||
{
|
||||
"expression": "sort_by(`[]`, &age)",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "max_by(people, &age)",
|
||||
"result": {"age": 50, "age_str": "50", "bool": false, "name": "d"}
|
||||
},
|
||||
{
|
||||
"expression": "max_by(people, &age_str)",
|
||||
"result": {"age": 50, "age_str": "50", "bool": false, "name": "d"}
|
||||
},
|
||||
{
|
||||
"expression": "max_by(people, &bool)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "max_by(people, &extra)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "max_by(people, &to_number(age_str))",
|
||||
"result": {"age": 50, "age_str": "50", "bool": false, "name": "d"}
|
||||
},
|
||||
{
|
||||
"expression": "min_by(people, &age)",
|
||||
"result": {"age": 10, "age_str": "10", "bool": true, "name": 3}
|
||||
},
|
||||
{
|
||||
"expression": "min_by(people, &age_str)",
|
||||
"result": {"age": 10, "age_str": "10", "bool": true, "name": 3}
|
||||
},
|
||||
{
|
||||
"expression": "min_by(people, &bool)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "min_by(people, &extra)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "min_by(people, &to_number(age_str))",
|
||||
"result": {"age": 10, "age_str": "10", "bool": true, "name": 3}
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given":
|
||||
{
|
||||
"people": [
|
||||
{"age": 10, "order": "1"},
|
||||
{"age": 10, "order": "2"},
|
||||
{"age": 10, "order": "3"},
|
||||
{"age": 10, "order": "4"},
|
||||
{"age": 10, "order": "5"},
|
||||
{"age": 10, "order": "6"},
|
||||
{"age": 10, "order": "7"},
|
||||
{"age": 10, "order": "8"},
|
||||
{"age": 10, "order": "9"},
|
||||
{"age": 10, "order": "10"},
|
||||
{"age": 10, "order": "11"}
|
||||
]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"description": "stable sort order",
|
||||
"expression": "sort_by(people, &age)",
|
||||
"result": [
|
||||
{"age": 10, "order": "1"},
|
||||
{"age": 10, "order": "2"},
|
||||
{"age": 10, "order": "3"},
|
||||
{"age": 10, "order": "4"},
|
||||
{"age": 10, "order": "5"},
|
||||
{"age": 10, "order": "6"},
|
||||
{"age": 10, "order": "7"},
|
||||
{"age": 10, "order": "8"},
|
||||
{"age": 10, "order": "9"},
|
||||
{"age": 10, "order": "10"},
|
||||
{"age": 10, "order": "11"}
|
||||
]
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given":
|
||||
{
|
||||
"people": [
|
||||
{"a": 10, "b": 1, "c": "z"},
|
||||
{"a": 10, "b": 2, "c": null},
|
||||
{"a": 10, "b": 3},
|
||||
{"a": 10, "b": 4, "c": "z"},
|
||||
{"a": 10, "b": 5, "c": null},
|
||||
{"a": 10, "b": 6},
|
||||
{"a": 10, "b": 7, "c": "z"},
|
||||
{"a": 10, "b": 8, "c": null},
|
||||
{"a": 10, "b": 9}
|
||||
],
|
||||
"empty": []
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "map(&a, people)",
|
||||
"result": [10, 10, 10, 10, 10, 10, 10, 10, 10]
|
||||
},
|
||||
{
|
||||
"expression": "map(&c, people)",
|
||||
"result": ["z", null, null, "z", null, null, "z", null, null]
|
||||
},
|
||||
{
|
||||
"expression": "map(&a, badkey)",
|
||||
"error": "invalid-type"
|
||||
},
|
||||
{
|
||||
"expression": "map(&foo, empty)",
|
||||
"result": []
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given": {
|
||||
"array": [
|
||||
{
|
||||
"foo": {"bar": "yes1"}
|
||||
},
|
||||
{
|
||||
"foo": {"bar": "yes2"}
|
||||
},
|
||||
{
|
||||
"foo1": {"bar": "no"}
|
||||
}
|
||||
]},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "map(&foo.bar, array)",
|
||||
"result": ["yes1", "yes2", null]
|
||||
},
|
||||
{
|
||||
"expression": "map(&foo1.bar, array)",
|
||||
"result": [null, null, "no"]
|
||||
},
|
||||
{
|
||||
"expression": "map(&foo.bar.baz, array)",
|
||||
"result": [null, null, null]
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given": {
|
||||
"array": [[1, 2, 3, [4]], [5, 6, 7, [8, 9]]]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "map(&[], array)",
|
||||
"result": [[1, 2, 3, 4], [5, 6, 7, 8, 9]]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,346 +0,0 @@
|
|||
[{
|
||||
"given":
|
||||
{"foo": {"bar": ["zero", "one", "two"]}},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo.bar[0]",
|
||||
"result": "zero"
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar[1]",
|
||||
"result": "one"
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar[2]",
|
||||
"result": "two"
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar[3]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar[-1]",
|
||||
"result": "two"
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar[-2]",
|
||||
"result": "one"
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar[-3]",
|
||||
"result": "zero"
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar[-4]",
|
||||
"result": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given":
|
||||
{"foo": [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}]},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo.bar",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo[0].bar",
|
||||
"result": "one"
|
||||
},
|
||||
{
|
||||
"expression": "foo[1].bar",
|
||||
"result": "two"
|
||||
},
|
||||
{
|
||||
"expression": "foo[2].bar",
|
||||
"result": "three"
|
||||
},
|
||||
{
|
||||
"expression": "foo[3].notbar",
|
||||
"result": "four"
|
||||
},
|
||||
{
|
||||
"expression": "foo[3].bar",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo[0]",
|
||||
"result": {"bar": "one"}
|
||||
},
|
||||
{
|
||||
"expression": "foo[1]",
|
||||
"result": {"bar": "two"}
|
||||
},
|
||||
{
|
||||
"expression": "foo[2]",
|
||||
"result": {"bar": "three"}
|
||||
},
|
||||
{
|
||||
"expression": "foo[3]",
|
||||
"result": {"notbar": "four"}
|
||||
},
|
||||
{
|
||||
"expression": "foo[4]",
|
||||
"result": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": [
|
||||
"one", "two", "three"
|
||||
],
|
||||
"cases": [
|
||||
{
|
||||
"expression": "[0]",
|
||||
"result": "one"
|
||||
},
|
||||
{
|
||||
"expression": "[1]",
|
||||
"result": "two"
|
||||
},
|
||||
{
|
||||
"expression": "[2]",
|
||||
"result": "three"
|
||||
},
|
||||
{
|
||||
"expression": "[-1]",
|
||||
"result": "three"
|
||||
},
|
||||
{
|
||||
"expression": "[-2]",
|
||||
"result": "two"
|
||||
},
|
||||
{
|
||||
"expression": "[-3]",
|
||||
"result": "one"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {"reservations": [
|
||||
{"instances": [{"foo": 1}, {"foo": 2}]}
|
||||
]},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "reservations[].instances[].foo",
|
||||
"result": [1, 2]
|
||||
},
|
||||
{
|
||||
"expression": "reservations[].instances[].bar",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "reservations[].notinstances[].foo",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "reservations[].notinstances[].foo",
|
||||
"result": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {"reservations": [{
|
||||
"instances": [
|
||||
{"foo": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]},
|
||||
{"foo": [{"bar": 5}, {"bar": 6}, {"notbar": [7]}, {"bar": 8}]},
|
||||
{"foo": "bar"},
|
||||
{"notfoo": [{"bar": 20}, {"bar": 21}, {"notbar": [7]}, {"bar": 22}]},
|
||||
{"bar": [{"baz": [1]}, {"baz": [2]}, {"baz": [3]}, {"baz": [4]}]},
|
||||
{"baz": [{"baz": [1, 2]}, {"baz": []}, {"baz": []}, {"baz": [3, 4]}]},
|
||||
{"qux": [{"baz": []}, {"baz": [1, 2, 3]}, {"baz": [4]}, {"baz": []}]}
|
||||
],
|
||||
"otherkey": {"foo": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]}
|
||||
}, {
|
||||
"instances": [
|
||||
{"a": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]},
|
||||
{"b": [{"bar": 5}, {"bar": 6}, {"notbar": [7]}, {"bar": 8}]},
|
||||
{"c": "bar"},
|
||||
{"notfoo": [{"bar": 23}, {"bar": 24}, {"notbar": [7]}, {"bar": 25}]},
|
||||
{"qux": [{"baz": []}, {"baz": [1, 2, 3]}, {"baz": [4]}, {"baz": []}]}
|
||||
],
|
||||
"otherkey": {"foo": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]}
|
||||
}
|
||||
]},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "reservations[].instances[].foo[].bar",
|
||||
"result": [1, 2, 4, 5, 6, 8]
|
||||
},
|
||||
{
|
||||
"expression": "reservations[].instances[].foo[].baz",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "reservations[].instances[].notfoo[].bar",
|
||||
"result": [20, 21, 22, 23, 24, 25]
|
||||
},
|
||||
{
|
||||
"expression": "reservations[].instances[].notfoo[].notbar",
|
||||
"result": [[7], [7]]
|
||||
},
|
||||
{
|
||||
"expression": "reservations[].notinstances[].foo",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "reservations[].instances[].foo[].notbar",
|
||||
"result": [3, [7]]
|
||||
},
|
||||
{
|
||||
"expression": "reservations[].instances[].bar[].baz",
|
||||
"result": [[1], [2], [3], [4]]
|
||||
},
|
||||
{
|
||||
"expression": "reservations[].instances[].baz[].baz",
|
||||
"result": [[1, 2], [], [], [3, 4]]
|
||||
},
|
||||
{
|
||||
"expression": "reservations[].instances[].qux[].baz",
|
||||
"result": [[], [1, 2, 3], [4], [], [], [1, 2, 3], [4], []]
|
||||
},
|
||||
{
|
||||
"expression": "reservations[].instances[].qux[].baz[]",
|
||||
"result": [1, 2, 3, 4, 1, 2, 3, 4]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"foo": [
|
||||
[["one", "two"], ["three", "four"]],
|
||||
[["five", "six"], ["seven", "eight"]],
|
||||
[["nine"], ["ten"]]
|
||||
]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo[]",
|
||||
"result": [["one", "two"], ["three", "four"], ["five", "six"],
|
||||
["seven", "eight"], ["nine"], ["ten"]]
|
||||
},
|
||||
{
|
||||
"expression": "foo[][0]",
|
||||
"result": ["one", "three", "five", "seven", "nine", "ten"]
|
||||
},
|
||||
{
|
||||
"expression": "foo[][1]",
|
||||
"result": ["two", "four", "six", "eight"]
|
||||
},
|
||||
{
|
||||
"expression": "foo[][0][0]",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "foo[][2][2]",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "foo[][0][0][100]",
|
||||
"result": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"foo": [{
|
||||
"bar": [
|
||||
{
|
||||
"qux": 2,
|
||||
"baz": 1
|
||||
},
|
||||
{
|
||||
"qux": 4,
|
||||
"baz": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"bar": [
|
||||
{
|
||||
"qux": 6,
|
||||
"baz": 5
|
||||
},
|
||||
{
|
||||
"qux": 8,
|
||||
"baz": 7
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo",
|
||||
"result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]},
|
||||
{"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[]",
|
||||
"result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]},
|
||||
{"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[].bar",
|
||||
"result": [[{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}],
|
||||
[{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]]
|
||||
},
|
||||
{
|
||||
"expression": "foo[].bar[]",
|
||||
"result": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3},
|
||||
{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[].bar[].baz",
|
||||
"result": [1, 3, 5, 7]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"string": "string",
|
||||
"hash": {"foo": "bar", "bar": "baz"},
|
||||
"number": 23,
|
||||
"nullvalue": null
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "string[]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "hash[]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "number[]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "nullvalue[]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "string[].foo",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "hash[].foo",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "number[].foo",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "nullvalue[].foo",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "nullvalue[].foo[].bar",
|
||||
"result": null
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -1,185 +0,0 @@
|
|||
[
|
||||
{
|
||||
"given": {
|
||||
"foo": [{"name": "a"}, {"name": "b"}],
|
||||
"bar": {"baz": "qux"}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "`\"foo\"`",
|
||||
"result": "foo"
|
||||
},
|
||||
{
|
||||
"comment": "Interpret escaped unicode.",
|
||||
"expression": "`\"\\u03a6\"`",
|
||||
"result": "Φ"
|
||||
},
|
||||
{
|
||||
"expression": "`\"✓\"`",
|
||||
"result": "✓"
|
||||
},
|
||||
{
|
||||
"expression": "`[1, 2, 3]`",
|
||||
"result": [1, 2, 3]
|
||||
},
|
||||
{
|
||||
"expression": "`{\"a\": \"b\"}`",
|
||||
"result": {"a": "b"}
|
||||
},
|
||||
{
|
||||
"expression": "`true`",
|
||||
"result": true
|
||||
},
|
||||
{
|
||||
"expression": "`false`",
|
||||
"result": false
|
||||
},
|
||||
{
|
||||
"expression": "`null`",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "`0`",
|
||||
"result": 0
|
||||
},
|
||||
{
|
||||
"expression": "`1`",
|
||||
"result": 1
|
||||
},
|
||||
{
|
||||
"expression": "`2`",
|
||||
"result": 2
|
||||
},
|
||||
{
|
||||
"expression": "`3`",
|
||||
"result": 3
|
||||
},
|
||||
{
|
||||
"expression": "`4`",
|
||||
"result": 4
|
||||
},
|
||||
{
|
||||
"expression": "`5`",
|
||||
"result": 5
|
||||
},
|
||||
{
|
||||
"expression": "`6`",
|
||||
"result": 6
|
||||
},
|
||||
{
|
||||
"expression": "`7`",
|
||||
"result": 7
|
||||
},
|
||||
{
|
||||
"expression": "`8`",
|
||||
"result": 8
|
||||
},
|
||||
{
|
||||
"expression": "`9`",
|
||||
"result": 9
|
||||
},
|
||||
{
|
||||
"comment": "Escaping a backtick in quotes",
|
||||
"expression": "`\"foo\\`bar\"`",
|
||||
"result": "foo`bar"
|
||||
},
|
||||
{
|
||||
"comment": "Double quote in literal",
|
||||
"expression": "`\"foo\\\"bar\"`",
|
||||
"result": "foo\"bar"
|
||||
},
|
||||
{
|
||||
"expression": "`\"1\\`\"`",
|
||||
"result": "1`"
|
||||
},
|
||||
{
|
||||
"comment": "Multiple literal expressions with escapes",
|
||||
"expression": "`\"\\\\\"`.{a:`\"b\"`}",
|
||||
"result": {"a": "b"}
|
||||
},
|
||||
{
|
||||
"comment": "literal . identifier",
|
||||
"expression": "`{\"a\": \"b\"}`.a",
|
||||
"result": "b"
|
||||
},
|
||||
{
|
||||
"comment": "literal . identifier . identifier",
|
||||
"expression": "`{\"a\": {\"b\": \"c\"}}`.a.b",
|
||||
"result": "c"
|
||||
},
|
||||
{
|
||||
"comment": "literal . identifier bracket-expr",
|
||||
"expression": "`[0, 1, 2]`[1]",
|
||||
"result": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "Literals",
|
||||
"given": {"type": "object"},
|
||||
"cases": [
|
||||
{
|
||||
"comment": "Literal with leading whitespace",
|
||||
"expression": "` {\"foo\": true}`",
|
||||
"result": {"foo": true}
|
||||
},
|
||||
{
|
||||
"comment": "Literal with trailing whitespace",
|
||||
"expression": "`{\"foo\": true} `",
|
||||
"result": {"foo": true}
|
||||
},
|
||||
{
|
||||
"comment": "Literal on RHS of subexpr not allowed",
|
||||
"expression": "foo.`\"bar\"`",
|
||||
"error": "syntax"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "Raw String Literals",
|
||||
"given": {},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "'foo'",
|
||||
"result": "foo"
|
||||
},
|
||||
{
|
||||
"expression": "' foo '",
|
||||
"result": " foo "
|
||||
},
|
||||
{
|
||||
"expression": "'0'",
|
||||
"result": "0"
|
||||
},
|
||||
{
|
||||
"expression": "'newline\n'",
|
||||
"result": "newline\n"
|
||||
},
|
||||
{
|
||||
"expression": "'\n'",
|
||||
"result": "\n"
|
||||
},
|
||||
{
|
||||
"expression": "'✓'",
|
||||
"result": "✓"
|
||||
},
|
||||
{
|
||||
"expression": "'𝄞'",
|
||||
"result": "𝄞"
|
||||
},
|
||||
{
|
||||
"expression": "' [foo] '",
|
||||
"result": " [foo] "
|
||||
},
|
||||
{
|
||||
"expression": "'[foo]'",
|
||||
"result": "[foo]"
|
||||
},
|
||||
{
|
||||
"comment": "Do not interpret escaped unicode.",
|
||||
"expression": "'\\u03a6'",
|
||||
"result": "\\u03a6"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -1,393 +0,0 @@
|
|||
[{
|
||||
"given": {
|
||||
"foo": {
|
||||
"bar": "bar",
|
||||
"baz": "baz",
|
||||
"qux": "qux",
|
||||
"nested": {
|
||||
"one": {
|
||||
"a": "first",
|
||||
"b": "second",
|
||||
"c": "third"
|
||||
},
|
||||
"two": {
|
||||
"a": "first",
|
||||
"b": "second",
|
||||
"c": "third"
|
||||
},
|
||||
"three": {
|
||||
"a": "first",
|
||||
"b": "second",
|
||||
"c": {"inner": "third"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"bar": 1,
|
||||
"baz": 2,
|
||||
"qux\"": 3
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo.{bar: bar}",
|
||||
"result": {"bar": "bar"}
|
||||
},
|
||||
{
|
||||
"expression": "foo.{\"bar\": bar}",
|
||||
"result": {"bar": "bar"}
|
||||
},
|
||||
{
|
||||
"expression": "foo.{\"foo.bar\": bar}",
|
||||
"result": {"foo.bar": "bar"}
|
||||
},
|
||||
{
|
||||
"expression": "foo.{bar: bar, baz: baz}",
|
||||
"result": {"bar": "bar", "baz": "baz"}
|
||||
},
|
||||
{
|
||||
"expression": "foo.{\"bar\": bar, \"baz\": baz}",
|
||||
"result": {"bar": "bar", "baz": "baz"}
|
||||
},
|
||||
{
|
||||
"expression": "{\"baz\": baz, \"qux\\\"\": \"qux\\\"\"}",
|
||||
"result": {"baz": 2, "qux\"": 3}
|
||||
},
|
||||
{
|
||||
"expression": "foo.{bar:bar,baz:baz}",
|
||||
"result": {"bar": "bar", "baz": "baz"}
|
||||
},
|
||||
{
|
||||
"expression": "foo.{bar: bar,qux: qux}",
|
||||
"result": {"bar": "bar", "qux": "qux"}
|
||||
},
|
||||
{
|
||||
"expression": "foo.{bar: bar, noexist: noexist}",
|
||||
"result": {"bar": "bar", "noexist": null}
|
||||
},
|
||||
{
|
||||
"expression": "foo.{noexist: noexist, alsonoexist: alsonoexist}",
|
||||
"result": {"noexist": null, "alsonoexist": null}
|
||||
},
|
||||
{
|
||||
"expression": "foo.badkey.{nokey: nokey, alsonokey: alsonokey}",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo.nested.*.{a: a,b: b}",
|
||||
"result": [{"a": "first", "b": "second"},
|
||||
{"a": "first", "b": "second"},
|
||||
{"a": "first", "b": "second"}]
|
||||
},
|
||||
{
|
||||
"expression": "foo.nested.three.{a: a, cinner: c.inner}",
|
||||
"result": {"a": "first", "cinner": "third"}
|
||||
},
|
||||
{
|
||||
"expression": "foo.nested.three.{a: a, c: c.inner.bad.key}",
|
||||
"result": {"a": "first", "c": null}
|
||||
},
|
||||
{
|
||||
"expression": "foo.{a: nested.one.a, b: nested.two.b}",
|
||||
"result": {"a": "first", "b": "second"}
|
||||
},
|
||||
{
|
||||
"expression": "{bar: bar, baz: baz}",
|
||||
"result": {"bar": 1, "baz": 2}
|
||||
},
|
||||
{
|
||||
"expression": "{bar: bar}",
|
||||
"result": {"bar": 1}
|
||||
},
|
||||
{
|
||||
"expression": "{otherkey: bar}",
|
||||
"result": {"otherkey": 1}
|
||||
},
|
||||
{
|
||||
"expression": "{no: no, exist: exist}",
|
||||
"result": {"no": null, "exist": null}
|
||||
},
|
||||
{
|
||||
"expression": "foo.[bar]",
|
||||
"result": ["bar"]
|
||||
},
|
||||
{
|
||||
"expression": "foo.[bar,baz]",
|
||||
"result": ["bar", "baz"]
|
||||
},
|
||||
{
|
||||
"expression": "foo.[bar,qux]",
|
||||
"result": ["bar", "qux"]
|
||||
},
|
||||
{
|
||||
"expression": "foo.[bar,noexist]",
|
||||
"result": ["bar", null]
|
||||
},
|
||||
{
|
||||
"expression": "foo.[noexist,alsonoexist]",
|
||||
"result": [null, null]
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given": {
|
||||
"foo": {"bar": 1, "baz": [2, 3, 4]}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo.{bar:bar,baz:baz}",
|
||||
"result": {"bar": 1, "baz": [2, 3, 4]}
|
||||
},
|
||||
{
|
||||
"expression": "foo.[bar,baz[0]]",
|
||||
"result": [1, 2]
|
||||
},
|
||||
{
|
||||
"expression": "foo.[bar,baz[1]]",
|
||||
"result": [1, 3]
|
||||
},
|
||||
{
|
||||
"expression": "foo.[bar,baz[2]]",
|
||||
"result": [1, 4]
|
||||
},
|
||||
{
|
||||
"expression": "foo.[bar,baz[3]]",
|
||||
"result": [1, null]
|
||||
},
|
||||
{
|
||||
"expression": "foo.[bar[0],baz[3]]",
|
||||
"result": [null, null]
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given": {
|
||||
"foo": {"bar": 1, "baz": 2}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo.{bar: bar, baz: baz}",
|
||||
"result": {"bar": 1, "baz": 2}
|
||||
},
|
||||
{
|
||||
"expression": "foo.[bar,baz]",
|
||||
"result": [1, 2]
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given": {
|
||||
"foo": {
|
||||
"bar": {"baz": [{"common": "first", "one": 1},
|
||||
{"common": "second", "two": 2}]},
|
||||
"ignoreme": 1,
|
||||
"includeme": true
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo.{bar: bar.baz[1],includeme: includeme}",
|
||||
"result": {"bar": {"common": "second", "two": 2}, "includeme": true}
|
||||
},
|
||||
{
|
||||
"expression": "foo.{\"bar.baz.two\": bar.baz[1].two, includeme: includeme}",
|
||||
"result": {"bar.baz.two": 2, "includeme": true}
|
||||
},
|
||||
{
|
||||
"expression": "foo.[includeme, bar.baz[*].common]",
|
||||
"result": [true, ["first", "second"]]
|
||||
},
|
||||
{
|
||||
"expression": "foo.[includeme, bar.baz[*].none]",
|
||||
"result": [true, []]
|
||||
},
|
||||
{
|
||||
"expression": "foo.[includeme, bar.baz[].common]",
|
||||
"result": [true, ["first", "second"]]
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given": {
|
||||
"reservations": [{
|
||||
"instances": [
|
||||
{"id": "id1",
|
||||
"name": "first"},
|
||||
{"id": "id2",
|
||||
"name": "second"}
|
||||
]}, {
|
||||
"instances": [
|
||||
{"id": "id3",
|
||||
"name": "third"},
|
||||
{"id": "id4",
|
||||
"name": "fourth"}
|
||||
]}
|
||||
]},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "reservations[*].instances[*].{id: id, name: name}",
|
||||
"result": [[{"id": "id1", "name": "first"}, {"id": "id2", "name": "second"}],
|
||||
[{"id": "id3", "name": "third"}, {"id": "id4", "name": "fourth"}]]
|
||||
},
|
||||
{
|
||||
"expression": "reservations[].instances[].{id: id, name: name}",
|
||||
"result": [{"id": "id1", "name": "first"},
|
||||
{"id": "id2", "name": "second"},
|
||||
{"id": "id3", "name": "third"},
|
||||
{"id": "id4", "name": "fourth"}]
|
||||
},
|
||||
{
|
||||
"expression": "reservations[].instances[].[id, name]",
|
||||
"result": [["id1", "first"],
|
||||
["id2", "second"],
|
||||
["id3", "third"],
|
||||
["id4", "fourth"]]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"foo": [{
|
||||
"bar": [
|
||||
{
|
||||
"qux": 2,
|
||||
"baz": 1
|
||||
},
|
||||
{
|
||||
"qux": 4,
|
||||
"baz": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"bar": [
|
||||
{
|
||||
"qux": 6,
|
||||
"baz": 5
|
||||
},
|
||||
{
|
||||
"qux": 8,
|
||||
"baz": 7
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo",
|
||||
"result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]},
|
||||
{"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[]",
|
||||
"result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]},
|
||||
{"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[].bar",
|
||||
"result": [[{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}],
|
||||
[{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]]
|
||||
},
|
||||
{
|
||||
"expression": "foo[].bar[]",
|
||||
"result": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3},
|
||||
{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]
|
||||
},
|
||||
{
|
||||
"expression": "foo[].bar[].[baz, qux]",
|
||||
"result": [[1, 2], [3, 4], [5, 6], [7, 8]]
|
||||
},
|
||||
{
|
||||
"expression": "foo[].bar[].[baz]",
|
||||
"result": [[1], [3], [5], [7]]
|
||||
},
|
||||
{
|
||||
"expression": "foo[].bar[].[baz, qux][]",
|
||||
"result": [1, 2, 3, 4, 5, 6, 7, 8]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"foo": {
|
||||
"baz": [
|
||||
{
|
||||
"bar": "abc"
|
||||
}, {
|
||||
"bar": "def"
|
||||
}
|
||||
],
|
||||
"qux": ["zero"]
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo.[baz[*].bar, qux[0]]",
|
||||
"result": [["abc", "def"], "zero"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"foo": {
|
||||
"baz": [
|
||||
{
|
||||
"bar": "a",
|
||||
"bam": "b",
|
||||
"boo": "c"
|
||||
}, {
|
||||
"bar": "d",
|
||||
"bam": "e",
|
||||
"boo": "f"
|
||||
}
|
||||
],
|
||||
"qux": ["zero"]
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo.[baz[*].[bar, boo], qux[0]]",
|
||||
"result": [[["a", "c" ], ["d", "f" ]], "zero"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"foo": {
|
||||
"baz": [
|
||||
{
|
||||
"bar": "a",
|
||||
"bam": "b",
|
||||
"boo": "c"
|
||||
}, {
|
||||
"bar": "d",
|
||||
"bam": "e",
|
||||
"boo": "f"
|
||||
}
|
||||
],
|
||||
"qux": ["zero"]
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo.[baz[*].not_there || baz[*].bar, qux[0]]",
|
||||
"result": [["a", "d"], "zero"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {"type": "object"},
|
||||
"cases": [
|
||||
{
|
||||
"comment": "Nested multiselect",
|
||||
"expression": "[[*],*]",
|
||||
"result": [null, ["object"]]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": [],
|
||||
"cases": [
|
||||
{
|
||||
"comment": "Nested multiselect",
|
||||
"expression": "[[*]]",
|
||||
"result": [[]]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
[{
|
||||
"given":
|
||||
{"outer": {"foo": "foo", "bar": "bar", "baz": "baz"}},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "outer.foo || outer.bar",
|
||||
"result": "foo"
|
||||
},
|
||||
{
|
||||
"expression": "outer.foo||outer.bar",
|
||||
"result": "foo"
|
||||
},
|
||||
{
|
||||
"expression": "outer.bar || outer.baz",
|
||||
"result": "bar"
|
||||
},
|
||||
{
|
||||
"expression": "outer.bar||outer.baz",
|
||||
"result": "bar"
|
||||
},
|
||||
{
|
||||
"expression": "outer.bad || outer.foo",
|
||||
"result": "foo"
|
||||
},
|
||||
{
|
||||
"expression": "outer.bad||outer.foo",
|
||||
"result": "foo"
|
||||
},
|
||||
{
|
||||
"expression": "outer.foo || outer.bad",
|
||||
"result": "foo"
|
||||
},
|
||||
{
|
||||
"expression": "outer.foo||outer.bad",
|
||||
"result": "foo"
|
||||
},
|
||||
{
|
||||
"expression": "outer.bad || outer.alsobad",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "outer.bad||outer.alsobad",
|
||||
"result": null
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given":
|
||||
{"outer": {"foo": "foo", "bool": false, "empty_list": [], "empty_string": ""}},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "outer.empty_string || outer.foo",
|
||||
"result": "foo"
|
||||
},
|
||||
{
|
||||
"expression": "outer.nokey || outer.bool || outer.empty_list || outer.empty_string || outer.foo",
|
||||
"result": "foo"
|
||||
}
|
||||
]
|
||||
}]
|
||||
|
|
@ -1,131 +0,0 @@
|
|||
[{
|
||||
"given": {
|
||||
"foo": {
|
||||
"bar": {
|
||||
"baz": "subkey"
|
||||
},
|
||||
"other": {
|
||||
"baz": "subkey"
|
||||
},
|
||||
"other2": {
|
||||
"baz": "subkey"
|
||||
},
|
||||
"other3": {
|
||||
"notbaz": ["a", "b", "c"]
|
||||
},
|
||||
"other4": {
|
||||
"notbaz": ["a", "b", "c"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo.*.baz | [0]",
|
||||
"result": "subkey"
|
||||
},
|
||||
{
|
||||
"expression": "foo.*.baz | [1]",
|
||||
"result": "subkey"
|
||||
},
|
||||
{
|
||||
"expression": "foo.*.baz | [2]",
|
||||
"result": "subkey"
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar.* | [0]",
|
||||
"result": "subkey"
|
||||
},
|
||||
{
|
||||
"expression": "foo.*.notbaz | [*]",
|
||||
"result": [["a", "b", "c"], ["a", "b", "c"]]
|
||||
},
|
||||
{
|
||||
"expression": "{\"a\": foo.bar, \"b\": foo.other} | *.baz",
|
||||
"result": ["subkey", "subkey"]
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given": {
|
||||
"foo": {
|
||||
"bar": {
|
||||
"baz": "one"
|
||||
},
|
||||
"other": {
|
||||
"baz": "two"
|
||||
},
|
||||
"other2": {
|
||||
"baz": "three"
|
||||
},
|
||||
"other3": {
|
||||
"notbaz": ["a", "b", "c"]
|
||||
},
|
||||
"other4": {
|
||||
"notbaz": ["d", "e", "f"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo | bar",
|
||||
"result": {"baz": "one"}
|
||||
},
|
||||
{
|
||||
"expression": "foo | bar | baz",
|
||||
"result": "one"
|
||||
},
|
||||
{
|
||||
"expression": "foo|bar| baz",
|
||||
"result": "one"
|
||||
},
|
||||
{
|
||||
"expression": "not_there | [0]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "not_there | [0]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "[foo.bar, foo.other] | [0]",
|
||||
"result": {"baz": "one"}
|
||||
},
|
||||
{
|
||||
"expression": "{\"a\": foo.bar, \"b\": foo.other} | a",
|
||||
"result": {"baz": "one"}
|
||||
},
|
||||
{
|
||||
"expression": "{\"a\": foo.bar, \"b\": foo.other} | b",
|
||||
"result": {"baz": "two"}
|
||||
},
|
||||
{
|
||||
"expression": "foo.bam || foo.bar | baz",
|
||||
"result": "one"
|
||||
},
|
||||
{
|
||||
"expression": "foo | not_there || bar",
|
||||
"result": {"baz": "one"}
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given": {
|
||||
"foo": [{
|
||||
"bar": [{
|
||||
"baz": "one"
|
||||
}, {
|
||||
"baz": "two"
|
||||
}]
|
||||
}, {
|
||||
"bar": [{
|
||||
"baz": "three"
|
||||
}, {
|
||||
"baz": "four"
|
||||
}]
|
||||
}]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo[*].bar[*] | [0][0]",
|
||||
"result": {"baz": "one"}
|
||||
}
|
||||
]
|
||||
}]
|
||||
|
|
@ -1,187 +0,0 @@
|
|||
[{
|
||||
"given": {
|
||||
"foo": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
|
||||
"bar": {
|
||||
"baz": 1
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "bar[0:10]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo[0:10:1]",
|
||||
"result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
},
|
||||
{
|
||||
"expression": "foo[0:10]",
|
||||
"result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
},
|
||||
{
|
||||
"expression": "foo[0:10:]",
|
||||
"result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
},
|
||||
{
|
||||
"expression": "foo[0::1]",
|
||||
"result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
},
|
||||
{
|
||||
"expression": "foo[0::]",
|
||||
"result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
},
|
||||
{
|
||||
"expression": "foo[0:]",
|
||||
"result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
},
|
||||
{
|
||||
"expression": "foo[:10:1]",
|
||||
"result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
},
|
||||
{
|
||||
"expression": "foo[::1]",
|
||||
"result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
},
|
||||
{
|
||||
"expression": "foo[:10:]",
|
||||
"result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
},
|
||||
{
|
||||
"expression": "foo[::]",
|
||||
"result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
},
|
||||
{
|
||||
"expression": "foo[:]",
|
||||
"result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
},
|
||||
{
|
||||
"expression": "foo[1:9]",
|
||||
"result": [1, 2, 3, 4, 5, 6, 7, 8]
|
||||
},
|
||||
{
|
||||
"expression": "foo[0:10:2]",
|
||||
"result": [0, 2, 4, 6, 8]
|
||||
},
|
||||
{
|
||||
"expression": "foo[5:]",
|
||||
"result": [5, 6, 7, 8, 9]
|
||||
},
|
||||
{
|
||||
"expression": "foo[5::2]",
|
||||
"result": [5, 7, 9]
|
||||
},
|
||||
{
|
||||
"expression": "foo[::2]",
|
||||
"result": [0, 2, 4, 6, 8]
|
||||
},
|
||||
{
|
||||
"expression": "foo[::-1]",
|
||||
"result": [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
|
||||
},
|
||||
{
|
||||
"expression": "foo[1::2]",
|
||||
"result": [1, 3, 5, 7, 9]
|
||||
},
|
||||
{
|
||||
"expression": "foo[10:0:-1]",
|
||||
"result": [9, 8, 7, 6, 5, 4, 3, 2, 1]
|
||||
},
|
||||
{
|
||||
"expression": "foo[10:5:-1]",
|
||||
"result": [9, 8, 7, 6]
|
||||
},
|
||||
{
|
||||
"expression": "foo[8:2:-2]",
|
||||
"result": [8, 6, 4]
|
||||
},
|
||||
{
|
||||
"expression": "foo[0:20]",
|
||||
"result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
},
|
||||
{
|
||||
"expression": "foo[10:-20:-1]",
|
||||
"result": [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
|
||||
},
|
||||
{
|
||||
"expression": "foo[10:-20]",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "foo[-4:-1]",
|
||||
"result": [6, 7, 8]
|
||||
},
|
||||
{
|
||||
"expression": "foo[:-5:-1]",
|
||||
"result": [9, 8, 7, 6]
|
||||
},
|
||||
{
|
||||
"expression": "foo[8:2:0]",
|
||||
"error": "invalid-value"
|
||||
},
|
||||
{
|
||||
"expression": "foo[8:2:0:1]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo[8:2&]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo[2:a:3]",
|
||||
"error": "syntax"
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given": {
|
||||
"foo": [{"a": 1}, {"a": 2}, {"a": 3}],
|
||||
"bar": [{"a": {"b": 1}}, {"a": {"b": 2}},
|
||||
{"a": {"b": 3}}],
|
||||
"baz": 50
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo[:2].a",
|
||||
"result": [1, 2]
|
||||
},
|
||||
{
|
||||
"expression": "foo[:2].b",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "foo[:2].a.b",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "bar[::-1].a.b",
|
||||
"result": [3, 2, 1]
|
||||
},
|
||||
{
|
||||
"expression": "bar[:2].a.b",
|
||||
"result": [1, 2]
|
||||
},
|
||||
{
|
||||
"expression": "baz[:2].a",
|
||||
"result": null
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given": [{"a": 1}, {"a": 2}, {"a": 3}],
|
||||
"cases": [
|
||||
{
|
||||
"expression": "[:]",
|
||||
"result": [{"a": 1}, {"a": 2}, {"a": 3}]
|
||||
},
|
||||
{
|
||||
"expression": "[:2].a",
|
||||
"result": [1, 2]
|
||||
},
|
||||
{
|
||||
"expression": "[::-1].a",
|
||||
"result": [3, 2, 1]
|
||||
},
|
||||
{
|
||||
"expression": "[:2].b",
|
||||
"result": []
|
||||
}
|
||||
]
|
||||
}]
|
||||
|
|
@ -1,616 +0,0 @@
|
|||
[{
|
||||
"comment": "Dot syntax",
|
||||
"given": {"type": "object"},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo.bar",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo.1",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo.-11",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo.",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo.",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": ".foo",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo..bar",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar.",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo[.]",
|
||||
"error": "syntax"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "Simple token errors",
|
||||
"given": {"type": "object"},
|
||||
"cases": [
|
||||
{
|
||||
"expression": ".",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": ":",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": ",",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "[",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "}",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "{",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": ")",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "(",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "((&",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "a[",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "a]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "a][",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "!",
|
||||
"error": "syntax"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "Boolean syntax errors",
|
||||
"given": {"type": "object"},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "![!(!",
|
||||
"error": "syntax"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "Wildcard syntax",
|
||||
"given": {"type": "object"},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "*",
|
||||
"result": ["object"]
|
||||
},
|
||||
{
|
||||
"expression": "*.*",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "*.foo",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "*[0]",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": ".*",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "*foo",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "*0",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo[*]bar",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo[*]*",
|
||||
"error": "syntax"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "Flatten syntax",
|
||||
"given": {"type": "object"},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "[]",
|
||||
"result": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "Simple bracket syntax",
|
||||
"given": {"type": "object"},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "[0]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "[*]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "*.[0]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "*.[\"0\"]",
|
||||
"result": [[null]]
|
||||
},
|
||||
{
|
||||
"expression": "[*].bar",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "[*][0]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo[#]",
|
||||
"error": "syntax"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "Multi-select list syntax",
|
||||
"given": {"type": "object"},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo[0]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"comment": "Valid multi-select of a list",
|
||||
"expression": "foo[0, 1]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo.[0]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo.[*]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"comment": "Multi-select of a list with trailing comma",
|
||||
"expression": "foo[0, ]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Multi-select of a list with trailing comma and no close",
|
||||
"expression": "foo[0,",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Multi-select of a list with trailing comma and no close",
|
||||
"expression": "foo.[a",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Multi-select of a list with extra comma",
|
||||
"expression": "foo[0,, 1]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Multi-select of a list using an identifier index",
|
||||
"expression": "foo[abc]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Multi-select of a list using identifier indices",
|
||||
"expression": "foo[abc, def]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Multi-select of a list using an identifier index",
|
||||
"expression": "foo[abc, 1]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Multi-select of a list using an identifier index with trailing comma",
|
||||
"expression": "foo[abc, ]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Valid multi-select of a hash using an identifier index",
|
||||
"expression": "foo.[abc]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"comment": "Valid multi-select of a hash",
|
||||
"expression": "foo.[abc, def]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"comment": "Multi-select of a hash using a numeric index",
|
||||
"expression": "foo.[abc, 1]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Multi-select of a hash with a trailing comma",
|
||||
"expression": "foo.[abc, ]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Multi-select of a hash with extra commas",
|
||||
"expression": "foo.[abc,, def]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Multi-select of a hash using number indices",
|
||||
"expression": "foo.[0, 1]",
|
||||
"error": "syntax"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "Multi-select hash syntax",
|
||||
"given": {"type": "object"},
|
||||
"cases": [
|
||||
{
|
||||
"comment": "No key or value",
|
||||
"expression": "a{}",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "No closing token",
|
||||
"expression": "a{",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Not a key value pair",
|
||||
"expression": "a{foo}",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Missing value and closing character",
|
||||
"expression": "a{foo:",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Missing closing character",
|
||||
"expression": "a{foo: 0",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Missing value",
|
||||
"expression": "a{foo:}",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Trailing comma and no closing character",
|
||||
"expression": "a{foo: 0, ",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Missing value with trailing comma",
|
||||
"expression": "a{foo: ,}",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Accessing Array using an identifier",
|
||||
"expression": "a{foo: bar}",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "a{foo: 0}",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Missing key-value pair",
|
||||
"expression": "a.{}",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Not a key-value pair",
|
||||
"expression": "a.{foo}",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Missing value",
|
||||
"expression": "a.{foo:}",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Missing value with trailing comma",
|
||||
"expression": "a.{foo: ,}",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Valid multi-select hash extraction",
|
||||
"expression": "a.{foo: bar}",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"comment": "Valid multi-select hash extraction",
|
||||
"expression": "a.{foo: bar, baz: bam}",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"comment": "Trailing comma",
|
||||
"expression": "a.{foo: bar, }",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Missing key in second key-value pair",
|
||||
"expression": "a.{foo: bar, baz}",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Missing value in second key-value pair",
|
||||
"expression": "a.{foo: bar, baz:}",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Trailing comma",
|
||||
"expression": "a.{foo: bar, baz: bam, }",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Nested multi select",
|
||||
"expression": "{\"\\\\\":{\" \":*}}",
|
||||
"result": {"\\": {" ": ["object"]}}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "Or expressions",
|
||||
"given": {"type": "object"},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo || bar",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo ||",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo.|| bar",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": " || foo",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo || || foo",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo.[a || b]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo.[a ||]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "\"foo",
|
||||
"error": "syntax"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "Filter expressions",
|
||||
"given": {"type": "object"},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo[?bar==`\"baz\"`]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo[? bar == `\"baz\"` ]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo[ ?bar==`\"baz\"`]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo[?bar==]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo[?==]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo[?==bar]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo[?bar==baz?]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo[?a.b.c==d.e.f]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo[?bar==`[0, 1, 2]`]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo[?bar==`[\"a\", \"b\", \"c\"]`]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"comment": "Literal char not escaped",
|
||||
"expression": "foo[?bar==`[\"foo`bar\"]`]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Literal char escaped",
|
||||
"expression": "foo[?bar==`[\"foo\\`bar\"]`]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"comment": "Unknown comparator",
|
||||
"expression": "foo[?bar<>baz]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Unknown comparator",
|
||||
"expression": "foo[?bar^baz]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo[bar==baz]",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Quoted identifier in filter expression no spaces",
|
||||
"expression": "[?\"\\\\\">`\"foo\"`]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"comment": "Quoted identifier in filter expression with spaces",
|
||||
"expression": "[?\"\\\\\" > `\"foo\"`]",
|
||||
"result": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "Filter expression errors",
|
||||
"given": {"type": "object"},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "bar.`\"anything\"`",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "bar.baz.noexists.`\"literal\"`",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Literal wildcard projection",
|
||||
"expression": "foo[*].`\"literal\"`",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo[*].name.`\"literal\"`",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo[].name.`\"literal\"`",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo[].name.`\"literal\"`.`\"subliteral\"`",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Projecting a literal onto an empty list",
|
||||
"expression": "foo[*].name.noexist.`\"literal\"`",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "foo[].name.noexist.`\"literal\"`",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"expression": "twolen[*].`\"foo\"`",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Two level projection of a literal",
|
||||
"expression": "twolen[*].threelen[*].`\"bar\"`",
|
||||
"error": "syntax"
|
||||
},
|
||||
{
|
||||
"comment": "Two level flattened projection of a literal",
|
||||
"expression": "twolen[].threelen[].`\"bar\"`",
|
||||
"error": "syntax"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "Identifiers",
|
||||
"given": {"type": "object"},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "\"foo\"",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "\"\\\\\"",
|
||||
"result": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "Combined syntax",
|
||||
"given": [],
|
||||
"cases": [
|
||||
{
|
||||
"expression": "*||*|*|*",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "*[]||[*]",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "[*.*]",
|
||||
"result": [null]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
[
|
||||
{
|
||||
"given": {"foo": [{"✓": "✓"}, {"✓": "✗"}]},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo[].\"✓\"",
|
||||
"result": ["✓", "✗"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {"☯": true},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "\"☯\"",
|
||||
"result": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {"♪♫•*¨*•.¸¸❤¸¸.•*¨*•♫♪": true},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "\"♪♫•*¨*•.¸¸❤¸¸.•*¨*•♫♪\"",
|
||||
"result": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {"☃": true},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "\"☃\"",
|
||||
"result": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -1,460 +0,0 @@
|
|||
[{
|
||||
"given": {
|
||||
"foo": {
|
||||
"bar": {
|
||||
"baz": "val"
|
||||
},
|
||||
"other": {
|
||||
"baz": "val"
|
||||
},
|
||||
"other2": {
|
||||
"baz": "val"
|
||||
},
|
||||
"other3": {
|
||||
"notbaz": ["a", "b", "c"]
|
||||
},
|
||||
"other4": {
|
||||
"notbaz": ["a", "b", "c"]
|
||||
},
|
||||
"other5": {
|
||||
"other": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"c": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo.*.baz",
|
||||
"result": ["val", "val", "val"]
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar.*",
|
||||
"result": ["val"]
|
||||
},
|
||||
{
|
||||
"expression": "foo.*.notbaz",
|
||||
"result": [["a", "b", "c"], ["a", "b", "c"]]
|
||||
},
|
||||
{
|
||||
"expression": "foo.*.notbaz[0]",
|
||||
"result": ["a", "a"]
|
||||
},
|
||||
{
|
||||
"expression": "foo.*.notbaz[-1]",
|
||||
"result": ["c", "c"]
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given": {
|
||||
"foo": {
|
||||
"first-1": {
|
||||
"second-1": "val"
|
||||
},
|
||||
"first-2": {
|
||||
"second-1": "val"
|
||||
},
|
||||
"first-3": {
|
||||
"second-1": "val"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo.*",
|
||||
"result": [{"second-1": "val"}, {"second-1": "val"},
|
||||
{"second-1": "val"}]
|
||||
},
|
||||
{
|
||||
"expression": "foo.*.*",
|
||||
"result": [["val"], ["val"], ["val"]]
|
||||
},
|
||||
{
|
||||
"expression": "foo.*.*.*",
|
||||
"result": [[], [], []]
|
||||
},
|
||||
{
|
||||
"expression": "foo.*.*.*.*",
|
||||
"result": [[], [], []]
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given": {
|
||||
"foo": {
|
||||
"bar": "one"
|
||||
},
|
||||
"other": {
|
||||
"bar": "one"
|
||||
},
|
||||
"nomatch": {
|
||||
"notbar": "three"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "*.bar",
|
||||
"result": ["one", "one"]
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"given": {
|
||||
"top1": {
|
||||
"sub1": {"foo": "one"}
|
||||
},
|
||||
"top2": {
|
||||
"sub1": {"foo": "one"}
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "*",
|
||||
"result": [{"sub1": {"foo": "one"}},
|
||||
{"sub1": {"foo": "one"}}]
|
||||
},
|
||||
{
|
||||
"expression": "*.sub1",
|
||||
"result": [{"foo": "one"},
|
||||
{"foo": "one"}]
|
||||
},
|
||||
{
|
||||
"expression": "*.*",
|
||||
"result": [[{"foo": "one"}],
|
||||
[{"foo": "one"}]]
|
||||
},
|
||||
{
|
||||
"expression": "*.*.foo[]",
|
||||
"result": ["one", "one"]
|
||||
},
|
||||
{
|
||||
"expression": "*.sub1.foo",
|
||||
"result": ["one", "one"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given":
|
||||
{"foo": [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}]},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo[*].bar",
|
||||
"result": ["one", "two", "three"]
|
||||
},
|
||||
{
|
||||
"expression": "foo[*].notbar",
|
||||
"result": ["four"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given":
|
||||
[{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}],
|
||||
"cases": [
|
||||
{
|
||||
"expression": "[*]",
|
||||
"result": [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}]
|
||||
},
|
||||
{
|
||||
"expression": "[*].bar",
|
||||
"result": ["one", "two", "three"]
|
||||
},
|
||||
{
|
||||
"expression": "[*].notbar",
|
||||
"result": ["four"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"foo": {
|
||||
"bar": [
|
||||
{"baz": ["one", "two", "three"]},
|
||||
{"baz": ["four", "five", "six"]},
|
||||
{"baz": ["seven", "eight", "nine"]}
|
||||
]
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo.bar[*].baz",
|
||||
"result": [["one", "two", "three"], ["four", "five", "six"], ["seven", "eight", "nine"]]
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar[*].baz[0]",
|
||||
"result": ["one", "four", "seven"]
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar[*].baz[1]",
|
||||
"result": ["two", "five", "eight"]
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar[*].baz[2]",
|
||||
"result": ["three", "six", "nine"]
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar[*].baz[3]",
|
||||
"result": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"foo": {
|
||||
"bar": [["one", "two"], ["three", "four"]]
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo.bar[*]",
|
||||
"result": [["one", "two"], ["three", "four"]]
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar[0]",
|
||||
"result": ["one", "two"]
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar[0][0]",
|
||||
"result": "one"
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar[0][0][0]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo.bar[0][0][0][0]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "foo[0][0]",
|
||||
"result": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"foo": [
|
||||
{"bar": [{"kind": "basic"}, {"kind": "intermediate"}]},
|
||||
{"bar": [{"kind": "advanced"}, {"kind": "expert"}]},
|
||||
{"bar": "string"}
|
||||
]
|
||||
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo[*].bar[*].kind",
|
||||
"result": [["basic", "intermediate"], ["advanced", "expert"]]
|
||||
},
|
||||
{
|
||||
"expression": "foo[*].bar[0].kind",
|
||||
"result": ["basic", "advanced"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"foo": [
|
||||
{"bar": {"kind": "basic"}},
|
||||
{"bar": {"kind": "intermediate"}},
|
||||
{"bar": {"kind": "advanced"}},
|
||||
{"bar": {"kind": "expert"}},
|
||||
{"bar": "string"}
|
||||
]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo[*].bar.kind",
|
||||
"result": ["basic", "intermediate", "advanced", "expert"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"foo": [{"bar": ["one", "two"]}, {"bar": ["three", "four"]}, {"bar": ["five"]}]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo[*].bar[0]",
|
||||
"result": ["one", "three", "five"]
|
||||
},
|
||||
{
|
||||
"expression": "foo[*].bar[1]",
|
||||
"result": ["two", "four"]
|
||||
},
|
||||
{
|
||||
"expression": "foo[*].bar[2]",
|
||||
"result": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"foo": [{"bar": []}, {"bar": []}, {"bar": []}]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo[*].bar[0]",
|
||||
"result": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"foo": [["one", "two"], ["three", "four"], ["five"]]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo[*][0]",
|
||||
"result": ["one", "three", "five"]
|
||||
},
|
||||
{
|
||||
"expression": "foo[*][1]",
|
||||
"result": ["two", "four"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"foo": [
|
||||
[
|
||||
["one", "two"], ["three", "four"]
|
||||
], [
|
||||
["five", "six"], ["seven", "eight"]
|
||||
], [
|
||||
["nine"], ["ten"]
|
||||
]
|
||||
]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "foo[*][0]",
|
||||
"result": [["one", "two"], ["five", "six"], ["nine"]]
|
||||
},
|
||||
{
|
||||
"expression": "foo[*][1]",
|
||||
"result": [["three", "four"], ["seven", "eight"], ["ten"]]
|
||||
},
|
||||
{
|
||||
"expression": "foo[*][0][0]",
|
||||
"result": ["one", "five", "nine"]
|
||||
},
|
||||
{
|
||||
"expression": "foo[*][1][0]",
|
||||
"result": ["three", "seven", "ten"]
|
||||
},
|
||||
{
|
||||
"expression": "foo[*][0][1]",
|
||||
"result": ["two", "six"]
|
||||
},
|
||||
{
|
||||
"expression": "foo[*][1][1]",
|
||||
"result": ["four", "eight"]
|
||||
},
|
||||
{
|
||||
"expression": "foo[*][2]",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "foo[*][2][2]",
|
||||
"result": []
|
||||
},
|
||||
{
|
||||
"expression": "bar[*]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "bar[*].baz[*]",
|
||||
"result": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"string": "string",
|
||||
"hash": {"foo": "bar", "bar": "baz"},
|
||||
"number": 23,
|
||||
"nullvalue": null
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "string[*]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "hash[*]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "number[*]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "nullvalue[*]",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "string[*].foo",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "hash[*].foo",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "number[*].foo",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "nullvalue[*].foo",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "nullvalue[*].foo[*].bar",
|
||||
"result": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"string": "string",
|
||||
"hash": {"foo": "val", "bar": "val"},
|
||||
"number": 23,
|
||||
"array": [1, 2, 3],
|
||||
"nullvalue": null
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "string.*",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "hash.*",
|
||||
"result": ["val", "val"]
|
||||
},
|
||||
{
|
||||
"expression": "number.*",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "array.*",
|
||||
"result": null
|
||||
},
|
||||
{
|
||||
"expression": "nullvalue.*",
|
||||
"result": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"a": [0, 1, 2],
|
||||
"b": [0, 1, 2]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"expression": "*[0]",
|
||||
"result": [0, 0]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -1 +0,0 @@
|
|||
foo
|
||||
|
|
@ -1 +0,0 @@
|
|||
foo.bar
|
||||
|
|
@ -1 +0,0 @@
|
|||
ends_with(str, 'SStr')
|
||||
|
|
@ -1 +0,0 @@
|
|||
ends_with(str, 'foo')
|
||||
|
|
@ -1 +0,0 @@
|
|||
floor(`1.2`)
|
||||
|
|
@ -1 +0,0 @@
|
|||
floor(decimals[0])
|
||||
|
|
@ -1 +0,0 @@
|
|||
floor(foo)
|
||||
|
|
@ -1 +0,0 @@
|
|||
length('abc')
|
||||
|
|
@ -1 +0,0 @@
|
|||
length('')
|
||||
|
|
@ -1 +0,0 @@
|
|||
length(@)
|
||||
|
|
@ -1 +0,0 @@
|
|||
length(strings[0])
|
||||
|
|
@ -1 +0,0 @@
|
|||
length(str)
|
||||
|
|
@ -1 +0,0 @@
|
|||
length(array)
|
||||
|
|
@ -1 +0,0 @@
|
|||
length(strings[0])
|
||||
|
|
@ -1 +0,0 @@
|
|||
max(strings)
|
||||
|
|
@ -1 +0,0 @@
|
|||
merge(`{}`)
|
||||
|
|
@ -1 +0,0 @@
|
|||
merge(`{}`, `{}`)
|
||||
|
|
@ -1 +0,0 @@
|
|||
two
|
||||
|
|
@ -1 +0,0 @@
|
|||
merge(`{"a": 1}`, `{"b": 2}`)
|
||||
|
|
@ -1 +0,0 @@
|
|||
merge(`{"a": 1}`, `{"a": 2}`)
|
||||
|
|
@ -1 +0,0 @@
|
|||
merge(`{"a": 1, "b": 2}`, `{"a": 2, "c": 3}`, `{"d": 4}`)
|
||||
|
|
@ -1 +0,0 @@
|
|||
min(numbers)
|
||||
|
|
@ -1 +0,0 @@
|
|||
min(decimals)
|
||||
|
|
@ -1 +0,0 @@
|
|||
type('abc')
|
||||
|
|
@ -1 +0,0 @@
|
|||
type(`1.0`)
|
||||
|
|
@ -1 +0,0 @@
|
|||
three
|
||||
|
|
@ -1 +0,0 @@
|
|||
type(`2`)
|
||||
|
|
@ -1 +0,0 @@
|
|||
type(`true`)
|
||||
|
|
@ -1 +0,0 @@
|
|||
type(`false`)
|
||||
|
|
@ -1 +0,0 @@
|
|||
type(`null`)
|
||||
|
|
@ -1 +0,0 @@
|
|||
type(`[0]`)
|
||||
|
|
@ -1 +0,0 @@
|
|||
type(`{"a": "b"}`)
|
||||
|
|
@ -1 +0,0 @@
|
|||
type(@)
|
||||
|
|
@ -1 +0,0 @@
|
|||
keys(objects)
|
||||
|
|
@ -1 +0,0 @@
|
|||
values(objects)
|
||||
|
|
@ -1 +0,0 @@
|
|||
keys(empty_hash)
|
||||
|
|
@ -1 +0,0 @@
|
|||
one.two
|
||||
|
|
@ -1 +0,0 @@
|
|||
join(', ', strings)
|
||||
|
|
@ -1 +0,0 @@
|
|||
join(', ', strings)
|
||||
|
|
@ -1 +0,0 @@
|
|||
join(',', `["a", "b"]`)
|
||||
|
|
@ -1 +0,0 @@
|
|||
join('|', strings)
|
||||
|
|
@ -1 +0,0 @@
|
|||
join('|', decimals[].to_string(@))
|
||||
|
|
@ -1 +0,0 @@
|
|||
join('|', empty_list)
|
||||
|
|
@ -1 +0,0 @@
|
|||
reverse(numbers)
|
||||
|
|
@ -1 +0,0 @@
|
|||
reverse(array)
|
||||
|
|
@ -1 +0,0 @@
|
|||
reverse(`[]`)
|
||||
|
|
@ -1 +0,0 @@
|
|||
reverse('')
|
||||
|
|
@ -1 +0,0 @@
|
|||
foo."1"
|
||||
|
|
@ -1 +0,0 @@
|
|||
reverse('hello world')
|
||||
|
|
@ -1 +0,0 @@
|
|||
starts_with(str, 'S')
|
||||
|
|
@ -1 +0,0 @@
|
|||
starts_with(str, 'St')
|
||||
|
|
@ -1 +0,0 @@
|
|||
starts_with(str, 'Str')
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue