kcl-lang.io/kpm@v0.8.7-0.20240520061008-9fc4c5efc8c7/pkg/api/test_data/test_get_mod_deps/kcl_pkg/main.k (about)

     1  import sub
     2  import sub.sub1 as s1
     3  import k8s.api.core.v1 as k8core
     4  
     5  schema SchemaInMainK:
     6      msg: str
     7  
     8  schema SchemaWithSameName:
     9      msg: str
    10  
    11  schema_in_main_k = SchemaInMainK {
    12      msg='I am the instance of SchemaInMainK'
    13  }
    14  
    15  schema_in_sub_k = sub.SchemaInSubK {
    16      msg='I am the instance of SchemaInSubK'
    17  }
    18  
    19  schema_with_same_name = SchemaWithSameName {
    20      msg='I am the instance of SchemaWithSameName in main.k'
    21  }
    22  
    23  schema_with_same_name_in_sub = s1.SchemaWithSameName {
    24      msg='I am the instance of SchemaWithSameName in sub.k'
    25  }
    26  
    27  schema_in_k8s = k8core.Pod {
    28      metadata.name = "web-app"
    29      spec.containers = [{
    30          name = "main-container"
    31          image = "nginx"
    32          ports = [{containerPort: 80}]
    33      }]
    34  }