This repository has been archived by the owner on May 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separate typiobj struct definition to separated file
- Loading branch information
Showing
7 changed files
with
53 additions
and
53 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package typiobj | ||
|
||
// Configurer responsible to create config | ||
type Configurer interface { | ||
Configure() Configuration | ||
} | ||
|
||
// IsConfigurer return true if object implementation of configurer | ||
func IsConfigurer(obj interface{}) (ok bool) { | ||
_, ok = obj.(Configurer) | ||
return | ||
} | ||
|
||
// Configuration represent the configuration | ||
type Configuration struct { | ||
Prefix string | ||
Spec interface{} | ||
} | ||
|
||
// Configure return config itself | ||
func (c Configuration) Configure() Configuration { | ||
return c | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package typiobj | ||
|
||
// Help model | ||
type Help struct { | ||
// WIP: | ||
Name string | ||
Description string | ||
// Configuration string | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package typiobj | ||
|
||
import ( | ||
"go.uber.org/dig" | ||
) | ||
|
||
// Runner responsible to run the application | ||
type Runner interface { | ||
Run(c *dig.Container) error | ||
} |
This file was deleted.
Oops, something went wrong.