-
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add configuration over config file and ENV/ops Signed-off-by: Artur Troian <[email protected]>
- Loading branch information
Showing
26 changed files
with
1,069 additions
and
547 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,4 +42,5 @@ examples/tcp/persist.db | |
coverage.txt | ||
vendor | ||
|
||
persist.db | ||
persist.db | ||
plugins |
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,18 @@ | ||
FROM golang:1.10.0 | ||
|
||
ENV \ | ||
VOLANTMQ_WORK_DIR=/var/lib/volantmq \ | ||
VOLANTMQ_BUILD_FLAGS="" | ||
|
||
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added | ||
RUN groupadd -r volantmq && useradd -r -d ${VOLANTMQ_WORK_DIR} -m -g volantmq volantmq | ||
|
||
# Create environment directory | ||
ENV PATH /usr/lib/rabbitmq/bin:$PATH | ||
|
||
RUN mkdir ${VOLANTMQ_WORK_DIR}/{plugins,logs} | ||
|
||
# default config uses mqtt:1883 | ||
EXPOSE 1883 | ||
|
||
CMD ["volantmq"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,22 @@ | ||
package main | ||
|
||
import vlAuth "github.com/VolantMQ/auth" | ||
|
||
type internalAuth struct { | ||
creds map[string]string | ||
} | ||
|
||
// nolint: golint | ||
func (a internalAuth) Password(user, password string) vlAuth.Status { | ||
if hash, ok := a.creds[user]; ok { | ||
if password == hash { | ||
return vlAuth.StatusAllow | ||
} | ||
} | ||
return vlAuth.StatusDeny | ||
} | ||
|
||
// nolint: golint | ||
func (a internalAuth) ACL(clientID, user, topic string, access vlAuth.AccessType) vlAuth.Status { | ||
return vlAuth.StatusAllow | ||
} |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
package auth | ||
|
||
type Simple interface { | ||
Password(u, p string) Status | ||
} | ||
|
||
type Anonymous interface { | ||
Is() Status | ||
} | ||
//type Simple interface { | ||
// Password(u, p string) Status | ||
//} | ||
// | ||
//type Anonymous interface { | ||
// Is() Status | ||
//} |
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
Oops, something went wrong.