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
// Testing mockup oblige to start new Chaincode in a separate file | |
import shim from 'fabric-shim'; | |
import Chaincode from './chaincode'; | |
shim.start(new Chaincode()); |
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
import { expect } from 'chai'; | |
import { ChaincodeMockStub, Transform} from '@theledger/fabric-mock-stub'; | |
import Chaincode from '../app/chaincode.js'; | |
const MyChaincode = new Chaincode(); | |
describe('Test chaincode', () => { | |
const mockStub = new ChaincodeMockStub('MyMockStub', MyChaincode); |
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
// Simplified version with focusOut validation | |
Obx( | |
() => Focus( | |
onFocusChange: (hasFocus) { | |
if (!hasFocus) { | |
controller.stateTaxIdController.refresh(); | |
GetUtils.isCnpj(stateTaxIdMask.getUnmaskedText()); | |
} | |
}, | |
child: TextFormFieldOnPrimary( |
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
#!/bin/bash | |
PROJECT_ID="<project-id>" | |
rand="$(echo $RANDOM)" | |
gsutil mb -p $PROJECT_ID -l us -b on "gs://tf-state-$rand" | |
gsutil versioning set on "gs://tf-state-$rand" |
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
module "organization_policies_type_boolean" { | |
source = "terraform-google-modules/org-policy/google" | |
version = "5.2.2" | |
for_each = local.boolean_type_organization_policies | |
organization_id = var.org_id | |
policy_for = local.policy_for | |
policy_type = "boolean" | |
enforce = "true" | |
constraint = "constraints/${each.value}" |
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
resource "google_folder" "dev" { | |
display_name = "development" | |
parent = local.organization_folder_id | |
} |
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
module "commons_projects" { | |
source = "terraform-google-modules/project-factory/google" | |
version = "14.4" | |
random_project_id = true | |
random_project_id_length = 4 | |
name = "commons-projects" | |
org_id = var.org_id | |
billing_account = var.billing_id |
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
terraform { | |
required_version = ">= 1.5.7" | |
backend "gcs" { | |
bucket = "<your-bucket-name>" | |
prefix = "terraform/state/folders-and-policies" | |
} | |
required_providers { | |
google = { |
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
terraform { | |
required_version = ">= 1.5.7" | |
backend "gcs" { | |
bucket = "<your-bucket-name>" | |
prefix = "terraform/state/projects/commons/dns" | |
} | |
required_providers { | |
google = { |
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
module "commons_dns_project" { | |
source = "terraform-google-modules/project-factory/google" | |
version = "14.4" | |
random_project_id = true | |
random_project_id_length = 4 | |
name = "commons-dns" | |
org_id = var.org_id | |
billing_account = var.billing_id |