Last active
February 6, 2019 03:45
-
-
Save da-moon/c1c3e52ba7e43682aaee982281601ef2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
https://gitlab.com/NebulousLabs/Sia/blob/master/doc/API.md#standard-responses | |
https://support.sia.tech/article/zj76e7tvdq-sia-ui-performing-a-clean-install |
This file contains hidden or 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
https://github.com/wallix/awless | |
https://github.com/aws/aws-sdk-go |
This file contains hidden or 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
https://dgraph.io/ | |
https://github.com/dgraph-io/dgraph/tree/master/contrib/config/docker | |
https://github.com/dgraph-io/dgraph/issues/933 | |
https://www.graph.cool/ | |
https://github.com/qor/auth | |
https://www.hashicorp.com/resources/building-a-privileged-account-management-system-with-vault | |
https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUT.html |
This file contains hidden or 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
http://lackof.org/taggart/hacking/make-example/ |
This file contains hidden or 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
ERROR_STRUCT = structs/error | |
TIER_STRUCT = structs/tier | |
BILL_STRUCT = structs/bill | |
BUCKET_STRUCT = structs/bucket | |
CREDENTIAL_STRUCT = structs/credential | |
FILE_STRUCT = structs/file | |
USER_STRUCT = structs/user | |
USER_WRAPPER_STRUCT = structs/user-wrapper | |
STRUCTS = ${ERROR_STRUCT} ${TIER_STRUCT} ${BILL_STRUCT} ${BUCKET_STRUCT} ${CREDENTIAL_STRUCT} ${FILE_STRUCT} ${USER_STRUCT} ${USER_WRAPPER_STRUCT} | |
AUTHENTICATOR_SERVICE_ROOT = services/authenticator | |
GET_CREDENTIALS_SERVICE=${AUTHENTICATOR_SERVICE_ROOT}/get-credentials | |
LOGIN_WITH_EMAIL_SERVICE=${AUTHENTICATOR_SERVICE_ROOT}/login-with-email | |
LOGIN_WITH_USER_NAME_SERVICE=${AUTHENTICATOR_SERVICE_ROOT}/login-with-user-name | |
NEW_CREDENTIAL_SERVICE=${AUTHENTICATOR_SERVICE_ROOT}/new-credential | |
NEW_USER_SERVICE=${AUTHENTICATOR_SERVICE_ROOT}/new-user | |
AUTHENTICATOR_SERVICE = ${GET_CREDENTIALS_SERVICE} ${LOGIN_WITH_EMAIL_SERVICE} ${LOGIN_WITH_USER_NAME_SERVICE} ${NEW_CREDENTIAL_SERVICE} ${NEW_USER_SERVICE} | |
SERVICES = ${AUTHENTICATOR_SERVICE} | |
DIRS = ${STRUCTS} ${SERVICES} | |
PROTODIRS = $(DIRS:%=proto-%) | |
BUILDDIRS = $(DIRS:%=build-%) | |
CLEANDIRS = $(DIRS:%=clean-%) | |
.PHONY: vendor | |
vendor: | |
go get -v github.com/kardianos/govendor | |
go get -v github.com/fatih/structtag | |
go get -v github.com/lyft/protoc-gen-validate | |
go get -v github.com/lyft/protoc-gen-star | |
go get -v github.com/srikrsna/protoc-gen-gotag | |
go get -v github.com/dkfbasel/protobuf/protoc-go-tags | |
govendor fetch -v -tree github.com/gogo/protobuf | |
govendor fetch -v -tree github.com/lyft/protoc-gen-validate | |
govendor fetch -v github.com/dkfbasel/protobuf/protoc-go-tags | |
all: $(BUILDDIRS) | |
$(DIRS): $(BUILDDIRS) | |
$(BUILDDIRS): | |
$(MAKE) -C $(@:build-%=%) | |
clean: $(CLEANDIRS) | |
$(CLEANDIRS): | |
$(MAKE) -C $(@:clean-%=%) clean | |
proto: $(PROTODIRS) | |
$(PROTODIRS): | |
$(MAKE) -C $(@:proto-%=%) proto | |
.PHONY: subdirs $(DIRS) | |
.PHONY: subdirs $(BUILDDIRS) | |
.PHONY: subdirs $(CLEANDIRS) | |
.PHONY: subdirs $(PROTODIRS) | |
.PHONY: all clean proto |
This file contains hidden or 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
https://github.com/asim/login-service | |
https://courses.csail.mit.edu/6.857/2014/files/15-cheu-jaffe-lin-yang-zkp-authentication.pdf | |
protoc --proto_path=. --go_out=. --micro_out=. ./bridge/bridge.proto |
This file contains hidden or 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
https://docs.minio.io/docs/minio-multi-user-quickstart-guide.html | |
https://github.com/minio/minio/issues/5151 | |
https://github.com/restic/restic | |
https://github.com/Caiyeon/goldfish/ | |
https://github.com/aspectron/sia-cluster |
This file contains hidden or 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
https://github.com/nuxt-community/auth-module/issues/214 |
This file contains hidden or 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
protoc --proto_path=. ` | |
--proto_path=%GOPATH%/src ` | |
--proto_path=%GOPATH%/src/github.com/ ` | |
--proto_path=%GOPATH%/src/github.com/gogo/protobuf/types ` | |
--proto_path=%GOPATH%/src/github.com/gogo/protobuf/protobuf ` | |
--gogofaster_out=Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types:. ` | |
--micro_out=. list-buckets.proto |
This file contains hidden or 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
.PHONY: vendor | |
vendor: | |
go get -v github.com/kardianos/govendor | |
govendor fetch -v -tree github.com/lyft/protoc-gen-validate | |
govendor fetch -v -tree github.com/gogo/protobuf | |
govendor fetch -v -tree github.com/grpc-ecosystem/grpc-gateway | |
govendor fetch -v -tree github.com/gogo/googleapis | |
.PHONY: install | |
install: | |
go build \ | |
./vendor/github.com/lyft/protoc-gen-validate/validate/validate.pb.go | |
go install \ | |
./vendor/github.com/gogo/protobuf/protoc-gen-gogo \ | |
./vendor/github.com/lyft/protoc-gen-validate \ | |
./vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway \ | |
./vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger | |
.PHONY: proto | |
proto: install clean-proto | |
protoc \ | |
-I . \ | |
-I ./proto \ | |
-I ./vendor/ \ | |
-I ./vendor/github.com/gogo/googleapis/ \ | |
-I ./vendor/github.com/grpc-ecosystem/grpc-gateway/ \ | |
--gogofast_out=\ | |
Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\ | |
Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\ | |
Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ | |
Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,\ | |
Mgoogle/api/annotations.proto=github.com/gogo/googleapis/google/api,\ | |
Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types,\ | |
:. \ | |
--micro_out=\ | |
Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\ | |
Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\ | |
Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ | |
Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,\ | |
Mgoogle/api/annotations.proto=github.com/gogo/googleapis/google/api,\ | |
Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types,\ | |
:. \ | |
proto/hello/hello.proto | |
.PHONY: clean-proto | |
clean-proto: | |
del /Q /S .\proto\*.go | |
.PHONY: clean-exe | |
clean-exe: | |
del /Q /S .\*.exe | |
.PHONY: clean | |
clean: clean-proto clean-exe | |
.PHONY: build | |
build: clean proto | |
go build -o gateway.exe .\main.go | |
This file contains hidden or 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
DIRS = server gateway function client | |
PROTODIRS = $(DIRS:%=proto-%) | |
BUILDDIRS = $(DIRS:%=build-%) | |
CLEANDIRS = $(DIRS:%=clean-%) | |
all: $(BUILDDIRS) | |
$(DIRS): $(BUILDDIRS) | |
$(BUILDDIRS): | |
$(MAKE) -C $(@:build-%=%) | |
clean: $(CLEANDIRS) | |
$(CLEANDIRS): | |
$(MAKE) -C $(@:clean-%=%) clean | |
proto: $(PROTODIRS) | |
$(PROTODIRS): | |
$(MAKE) -C $(@:proto-%=%) proto | |
.PHONY: subdirs $(DIRS) | |
.PHONY: subdirs $(BUILDDIRS) | |
.PHONY: subdirs $(CLEANDIRS) | |
.PHONY: subdirs $(PROTODIRS) | |
.PHONY: all clean proto |
This file contains hidden or 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
7990 => bitbucket |
This file contains hidden or 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
netstat -tupln | |
/dev/sda | |
https://github.com/radmen/docker-siad | |
docker run -it --rm -v "${PWD}/siad-data:/siad/data" -p 9980:9980 demo:0.1 -M cghrtw | |
curl -A "Sia-Agent" "http://51.158.76.102:9980/consensus" | |
docker run -it --rm -p 8888:8888 bifrost:0.1 | |
51.158.76.102:8888 | |
aws --endpoint-url http://51.158.76.102:8888 s3 ls | |
$HOME/.sia/apipassword |
This file contains hidden or 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
docker run -it --rm -v "${PWD}/siad-data:/siad/data" -p 9980:9980 -p 8888:8888 demo:0.1 -M cghrtw | |
docker exec -it 0de1cf00e523 bash | |
export SIA_API_PASSWORD=e44f56310a84091374ccaed0660510bd | |
export MINIO_ACCESS_KEY=demo | |
export MINIO_SECRET_KEY=123456789 |
This file contains hidden or 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
func (s *UserRPCService) Register(r *http.Request, args *RegisterArgs, reply *RegisterReply) error { | |
log.Printf("got register request from %s\n", r.RemoteAddr) | |
// return nil | |
// log.Printf("got CreatePerson request from %s\n", r.RemoteAddr) | |
// rsp, err := s.Client.ObjectStorage(context.TODO(), &proto.Request{}) | |
// if err != nil { | |
// // http.Error(w, err.Error(), 500) | |
// return err | |
// } | |
// log.Printf("Recieved Resp \n%v", rsp) | |
// // newPerson, err := NewPerson(args.Name, args.Surname, args.Age) | |
// // if err != nil { | |
// // return err | |
// // } | |
// // s.personList[newPerson.ID] = *newPerson | |
// // *reply = *newPerson | |
return nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment