Well this doesnt work yet, and is likely not the correct way, this needs more thought put into it, probably a complete rewrite is advisable because bringing this into a shape where it could have multiple Providers is hard
This commit is contained in:
18
internal/provider/available_providers.go
Normal file
18
internal/provider/available_providers.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package provider
|
||||
|
||||
type ProviderType int
|
||||
|
||||
const (
|
||||
BatoId ProviderType = iota
|
||||
AsuraId ProviderType = iota
|
||||
)
|
||||
|
||||
func GetProviderByType(typeId ProviderType) Provider {
|
||||
switch typeId {
|
||||
case BatoId:
|
||||
return &Bato{}
|
||||
case AsuraId:
|
||||
return &Asura{}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user