-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstructors.go
More file actions
121 lines (109 loc) · 3.53 KB
/
Copy pathconstructors.go
File metadata and controls
121 lines (109 loc) · 3.53 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
package validation
import "github.com/biyonik/go-fluent-validator/types"
//
// -----------------------------------------------------------------------------
// Veri Tipi Yardımcı Fonksiyonları
// -----------------------------------------------------------------------------
// Bu dosya, Fluent Validator yapısında kullanılacak veri tipi fonksiyonlarını içerir.
// Her fonksiyon, ilgili Type struct'ını oluşturur ve başlatır.
//
// Laravel/Symfony Validator tarzında, okunabilir ve zincirleme doğrulama
// (fluent validation) mantığı sunar.
//
// Metadata:
// @author Ahmet ALTUN
// @github github.com/biyonik
// @linkedin linkedin.com/in/biyonik
// @email ahmet.altun60@gmail.com
// -----------------------------------------------------------------------------
// String
// -----------------------------------------------------------------------------
// Yeni bir StringType nesnesi oluşturur.
//
// Dönüş:
// - *types.StringType → string tipli doğrulama nesnesi
func String() *types.StringType {
return &types.StringType{}
}
// Number
// -----------------------------------------------------------------------------
// Yeni bir NumberType nesnesi oluşturur.
//
// Dönüş:
// - *types.NumberType → sayısal doğrulama nesnesi
func Number() *types.NumberType {
return &types.NumberType{}
}
// Boolean
// -----------------------------------------------------------------------------
// Yeni bir BooleanType nesnesi oluşturur.
//
// Dönüş:
// - *types.BooleanType → boolean doğrulama nesnesi
func Boolean() *types.BooleanType {
return &types.BooleanType{}
}
// Array
// -----------------------------------------------------------------------------
// Yeni bir ArrayType nesnesi oluşturur.
//
// Dönüş:
// - *types.ArrayType → dizi doğrulama nesnesi
func Array() *types.ArrayType {
return &types.ArrayType{}
}
// Object
// -----------------------------------------------------------------------------
// Yeni bir ObjectType nesnesi oluşturur.
//
// Dönüş:
// - *types.ObjectType → nesne doğrulama nesnesi
func Object() *types.ObjectType {
return &types.ObjectType{}
}
// Date
// -----------------------------------------------------------------------------
// Yeni bir DateType nesnesi oluşturur.
//
// Dönüş:
// - *types.DateType → tarih doğrulama nesnesi
func Date() *types.DateType {
return &types.DateType{}
}
// Uuid
// -----------------------------------------------------------------------------
// Yeni bir UuidType nesnesi oluşturur.
//
// Dönüş:
// - *types.UuidType → UUID doğrulama nesnesi
func Uuid() *types.UuidType {
return &types.UuidType{}
}
// Iban
// -----------------------------------------------------------------------------
// Yeni bir IbanType nesnesi oluşturur.
//
// Dönüş:
// - *types.IbanType → IBAN doğrulama nesnesi
func Iban() *types.IbanType {
return &types.IbanType{}
}
// CreditCard
// -----------------------------------------------------------------------------
// Yeni bir CreditCardType nesnesi oluşturur.
//
// Dönüş:
// - *types.CreditCardType → kredi kartı doğrulama nesnesi
func CreditCard() *types.CreditCardType {
return &types.CreditCardType{}
}
// AdvancedString
// -----------------------------------------------------------------------------
// Yeni bir AdvancedStringType nesnesi oluşturur. Daha gelişmiş string doğrulama
// ve manipülasyon özellikleri sunar.
//
// Dönüş:
// - *types.AdvancedStringType → gelişmiş string doğrulama nesnesi
func AdvancedString() *types.AdvancedStringType {
return &types.AdvancedStringType{}
}