-
Notifications
You must be signed in to change notification settings - Fork 0
/
archetype.yaml
62 lines (57 loc) · 1.58 KB
/
archetype.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
description: "A Rust Microservice with an Actix RESTful frontend and a Diesel/PostgreSQL backend."
authors: [ "Jimmie Fulton <[email protected]>" ]
languages: [ "Rust" ]
frameworks: [ "Actix Web", "Diesel", "Clap" ]
tags: [ "Service", "Workspace", "REST" ]
script:
- if:
conditions:
- switch-enabled: overwrite
then:
- rules:
- destination:
overwrite: true
- set:
#Prompted Variables
prefix:
prompt: 'Service Name:'
suffix:
prompt: "Suffix:"
default: "Service"
author_full:
prompt: 'Author (Full):'
author:
prompt: 'Author (Short):'
service-port:
prompt: "Service Port:"
type: int
value: "8080"
management-port:
prompt: "Management Port:"
type: int
value: "{{ service-port + 1 }}"
# Derived Variables
prefix-name:
value: "{{ prefix | train_case }}"
prefix_name:
value: "{{ prefix | snake_case }}"
PrefixName:
value: "{{ prefix | pascal_case }}"
prefixName:
value: "{{ prefix | camel_case }}"
suffix-name:
value: "{{ suffix | train_case }}"
suffix_name:
value: "{{ suffix | snake_case }}"
artifact-id:
value: "{{ prefix-name }}-{{ suffix-name }}"
artifact_id:
value: "{{ prefix_name }}_{{ suffix_name }}"
ARTIFACT_ID:
value: "{{ artifact_id | constant_case }}"
ArtifactId:
value: "{{ artifact-id | pascal_case }}"
- render:
directory:
source: "contents"