gitlab.com/evatix-go/core@v1.3.55/coretaskinfo/newInfoPlainTextCreator.go (about) 1 package coretaskinfo 2 3 type newInfoPlainTextCreator struct{} 4 5 func (it newInfoPlainTextCreator) Default( 6 name, desc, url string, 7 ) *Info { 8 return &Info{ 9 RootName: name, 10 Description: desc, 11 Url: url, 12 } 13 } 14 15 func (it newInfoPlainTextCreator) NameDescUrl( 16 name, desc, url string, 17 ) *Info { 18 return &Info{ 19 RootName: name, 20 Description: desc, 21 Url: url, 22 } 23 } 24 25 func (it newInfoPlainTextCreator) NameDescUrlExamples( 26 name, desc, url string, 27 examples ...string, 28 ) *Info { 29 return &Info{ 30 RootName: name, 31 Description: desc, 32 Url: url, 33 Examples: examples, 34 } 35 } 36 37 func (it newInfoPlainTextCreator) NewNameDescUrlErrorUrl( 38 name, desc, 39 url, errUrl string, 40 ) *Info { 41 return &Info{ 42 RootName: name, 43 Description: desc, 44 Url: url, 45 ErrorUrl: errUrl, 46 } 47 } 48 49 func (it newInfoPlainTextCreator) NameDescUrlErrUrlExamples( 50 name, desc, 51 url, errUrl string, 52 examples ...string, 53 ) *Info { 54 return &Info{ 55 RootName: name, 56 Description: desc, 57 Url: url, 58 ErrorUrl: errUrl, 59 Examples: examples, 60 } 61 } 62 63 func (it newInfoPlainTextCreator) NameDescExamples( 64 name, desc string, 65 examples ...string, 66 ) *Info { 67 return &Info{ 68 RootName: name, 69 Description: desc, 70 Examples: examples, 71 } 72 } 73 74 func (it newInfoPlainTextCreator) Examples( 75 name, desc string, 76 examples ...string, 77 ) *Info { 78 return &Info{ 79 RootName: name, 80 Description: desc, 81 Examples: examples, 82 } 83 } 84 85 func (it newInfoPlainTextCreator) NameUrlExamples( 86 name, url string, 87 examples ...string, 88 ) *Info { 89 return &Info{ 90 RootName: name, 91 Url: url, 92 Examples: examples, 93 } 94 } 95 96 func (it newInfoPlainTextCreator) UrlExamples( 97 url string, 98 examples ...string, 99 ) *Info { 100 return &Info{ 101 Url: url, 102 Examples: examples, 103 } 104 } 105 106 func (it newInfoPlainTextCreator) ExamplesOnly( 107 examples ...string, 108 ) *Info { 109 return &Info{ 110 Examples: examples, 111 } 112 } 113 114 func (it newInfoPlainTextCreator) UrlOnly( 115 url string, 116 ) *Info { 117 return &Info{ 118 Url: url, 119 } 120 } 121 122 func (it newInfoPlainTextCreator) ErrorUrlOnly( 123 errUrl string, 124 ) *Info { 125 return &Info{ 126 ErrorUrl: errUrl, 127 } 128 } 129 130 func (it newInfoPlainTextCreator) HintUrlOnly( 131 hintUrl string, 132 ) *Info { 133 return &Info{ 134 HintUrl: hintUrl, 135 } 136 } 137 138 func (it newInfoPlainTextCreator) DescHintUrlOnly( 139 desc, hintUrl string, 140 ) *Info { 141 return &Info{ 142 Description: desc, 143 HintUrl: hintUrl, 144 } 145 } 146 147 func (it newInfoPlainTextCreator) NameHintUrlOnly( 148 name, hintUrl string, 149 ) *Info { 150 return &Info{ 151 RootName: name, 152 HintUrl: hintUrl, 153 } 154 } 155 156 func (it newInfoPlainTextCreator) SingleExampleOnly( 157 singleExample string, 158 ) *Info { 159 return &Info{ 160 SingleExample: singleExample, 161 } 162 } 163 164 func (it newInfoPlainTextCreator) AllUrlExamples( 165 name, desc string, 166 url, hintUrl, errUrl string, 167 examples ...string, 168 ) *Info { 169 return &Info{ 170 RootName: name, 171 Description: desc, 172 Url: url, 173 HintUrl: hintUrl, 174 ErrorUrl: errUrl, 175 Examples: examples, 176 } 177 } 178 179 func (it newInfoPlainTextCreator) AllUrl( 180 name, desc string, 181 url, hintUrl, errUrl string, 182 ) *Info { 183 return &Info{ 184 RootName: name, 185 Description: desc, 186 Url: url, 187 HintUrl: hintUrl, 188 ErrorUrl: errUrl, 189 } 190 } 191 192 func (it newInfoPlainTextCreator) UrlSingleExample( 193 name, desc string, 194 url string, 195 chainingExample string, 196 ) *Info { 197 return &Info{ 198 RootName: name, 199 Description: desc, 200 Url: url, 201 SingleExample: chainingExample, 202 } 203 } 204 205 func (it newInfoPlainTextCreator) SingleExample( 206 name, desc string, 207 singleExample string, 208 ) *Info { 209 return &Info{ 210 RootName: name, 211 Description: desc, 212 SingleExample: singleExample, 213 } 214 } 215 216 func (it newInfoPlainTextCreator) ExampleUrl( 217 name, desc string, 218 exampleUrl string, 219 singleExample string, 220 ) *Info { 221 return &Info{ 222 RootName: name, 223 Description: desc, 224 ExampleUrl: exampleUrl, 225 SingleExample: singleExample, 226 } 227 } 228 229 func (it newInfoPlainTextCreator) ExampleUrlSingleExample( 230 name, desc string, 231 exampleUrl string, 232 singleExample string, 233 ) *Info { 234 return &Info{ 235 RootName: name, 236 Description: desc, 237 ExampleUrl: exampleUrl, 238 SingleExample: singleExample, 239 } 240 }