This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.8.4; | |
import '@openzeppelin/contracts/token/ERC721/ERC721.sol'; | |
import '@openzeppelin/contracts/access/Ownable.sol'; | |
contract AwesomeNFTContract is ERC721, Ownable { | |
uint256 public mintPrice = 0.05 ether; | |
uint256 public totalSupply; | |
uint256 public maxSupply; | |
bool public isMintEnabled; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: keda.sh/v1alpha1 | |
kind: TriggerAuthentication | |
metadata: | |
name: keda-aws-credentials | |
namespace: keda-test | |
spec: | |
podIdentity: | |
provider: aws-eks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: keda.sh/v1alpha1 | |
kind: ScaledObject | |
metadata: | |
name: aws-sqs-queue-scaledobject | |
namespace: keda-test | |
spec: | |
scaleTargetRef: | |
name: nginx-deployment | |
minReplicaCount: 0 # If the queue is empty we'll downscale to 0 | |
maxReplicaCount: 5 # If queue size is more bigger than we think, KEDA will scale our pods maximum 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "", | |
"Effect": "Allow", | |
"Principal": { | |
"Federated": "<OIDC_PROVIDER_ARN>" | |
}, | |
"Action": "sts:AssumeRoleWithWebIdentity", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": "sqs:GetQueueAttributes", | |
"Resource": "<SQS_QUEUE_ARN>" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func TestMakeAnOrderExecErr(t *testing.T) { | |
ctx := context.Background() | |
req := &orderRequest{ | |
TableNumber: "B-1", | |
Products: map[string]int{ | |
"Pizza": 5, | |
}, | |
} | |
ctrl := gomock.NewController(t) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package order | |
import ( | |
"context" | |
"eftal/medium/mocks" | |
"errors" | |
"fmt" | |
"testing" | |
"github.com/golang/mock/gomock" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package order | |
import ( | |
"context" | |
"github.com/jackc/pgx/v4" | |
"github.com/jackc/pgx/v4/pgxpool" | |
) | |
type FakePool struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package order | |
import ( | |
"context" | |
"errors" | |
"fmt" | |
"time" | |
"github.com/jackc/pgx/v4" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"table_number": "B-1", | |
"products": { | |
"Italian Pizza": 3, | |
"Chef's Special": 2, | |
"Water": 1, | |
"Beer": 2, | |
"Wine": 3 | |
} | |
} |
NewerOlder