Move accounts into rove-server.internal
This commit is contained in:
		
							parent
							
								
									9ccb7ac019
								
							
						
					
					
						commit
						46f81abbd7
					
				
					 5 changed files with 6 additions and 7 deletions
				
			
		
							
								
								
									
										2
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
										
									
									
									
								
							|  | @ -3,7 +3,7 @@ VERSION := $(shell git describe --always --long --dirty --tags) | ||||||
| build: | build: | ||||||
| 	@echo Running no-output build | 	@echo Running no-output build | ||||||
| 	go mod download | 	go mod download | ||||||
| 	go build -ldflags="-X 'github.com/mdiluz/rove/pkg/version.Version=${VERSION}'" ./... | 	go build -ldflags="-X 'github.com/mdiluz/rove/cmd/version.Version=${VERSION}'" ./... | ||||||
| 
 | 
 | ||||||
| install: | install: | ||||||
| 	@echo Installing to GOPATH | 	@echo Installing to GOPATH | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| package accounts | package internal | ||||||
| 
 | 
 | ||||||
| // Accountant decribes something that stores accounts and account values | // Accountant decribes something that stores accounts and account values | ||||||
| type Accountant interface { | type Accountant interface { | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| package accounts | package internal | ||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
|  | @ -6,7 +6,6 @@ import ( | ||||||
| 	"net" | 	"net" | ||||||
| 	"sync" | 	"sync" | ||||||
| 
 | 
 | ||||||
| 	"github.com/mdiluz/rove/pkg/accounts" |  | ||||||
| 	"github.com/mdiluz/rove/pkg/persistence" | 	"github.com/mdiluz/rove/pkg/persistence" | ||||||
| 	"github.com/mdiluz/rove/pkg/rove" | 	"github.com/mdiluz/rove/pkg/rove" | ||||||
| 	"github.com/mdiluz/rove/pkg/roveapi" | 	"github.com/mdiluz/rove/pkg/roveapi" | ||||||
|  | @ -29,7 +28,7 @@ type Server struct { | ||||||
| 	world *rove.World | 	world *rove.World | ||||||
| 
 | 
 | ||||||
| 	// Accountant | 	// Accountant | ||||||
| 	accountant accounts.Accountant | 	accountant Accountant | ||||||
| 
 | 
 | ||||||
| 	// gRPC server | 	// gRPC server | ||||||
| 	netListener net.Listener | 	netListener net.Listener | ||||||
|  | @ -81,7 +80,7 @@ func NewServer(opts ...ServerOption) *Server { | ||||||
| 		persistence: EphemeralData, | 		persistence: EphemeralData, | ||||||
| 		schedule:    cron.New(), | 		schedule:    cron.New(), | ||||||
| 		world:       rove.NewWorld(32), | 		world:       rove.NewWorld(32), | ||||||
| 		accountant:  accounts.NewSimpleAccountant(), | 		accountant:  NewSimpleAccountant(), | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	// Apply all options | 	// Apply all options | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| package accounts | package internal | ||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
| 	"fmt" | 	"fmt" | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue