Compare commits
16 Commits
beta_fixes
...
trunk
Author | SHA1 | Date |
---|---|---|
Dan Ballard | 3964348dd0 | |
Sarah Jamie Lewis | ae16c7c6a5 | |
Sarah Jamie Lewis | 69f14f9bb1 | |
erinn | f1775eb975 | |
erinn | c1b7e4c75d | |
Sarah Jamie Lewis | a460b900b6 | |
Sarah Jamie Lewis | b2d8f3f34a | |
Sarah Jamie Lewis | 6c5b48311d | |
Sarah Jamie Lewis | b33c6c77dd | |
Sarah Jamie Lewis | c864bccbb9 | |
erinn | 5dddb16f2b | |
erinn | 001470257a | |
Sarah Jamie Lewis | b37f283fe3 | |
Dan Ballard | 2f495dfd62 | |
erinn | e09e9c09a7 | |
erinn | ae3aef0518 |
|
@ -0,0 +1,5 @@
|
||||||
|
package constants
|
||||||
|
|
||||||
|
// We offer "un-passworded" profiles but our storage encrypts everything with a password. We need an agreed upon
|
||||||
|
// password to use in that case, that the app case use behind the scenes to password and unlock with
|
||||||
|
const DefactoPasswordForUnencryptedProfiles = "be gay do crime"
|
4
go.mod
4
go.mod
|
@ -3,10 +3,8 @@ module git.openprivacy.ca/flutter/libcwtch-go
|
||||||
go 1.15
|
go 1.15
|
||||||
|
|
||||||
require (
|
require (
|
||||||
cwtch.im/cwtch v0.8.10
|
cwtch.im/cwtch v0.8.11
|
||||||
git.openprivacy.ca/openprivacy/connectivity v1.4.4
|
git.openprivacy.ca/openprivacy/connectivity v1.4.4
|
||||||
git.openprivacy.ca/openprivacy/log v1.0.2
|
git.openprivacy.ca/openprivacy/log v1.0.2
|
||||||
golang.org/x/mobile v0.0.0-20210614202936-7c8f154d1008 // indirect
|
|
||||||
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 // indirect
|
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 // indirect
|
||||||
golang.org/x/tools v0.1.3 // indirect
|
|
||||||
)
|
)
|
||||||
|
|
29
go.sum
29
go.sum
|
@ -1,5 +1,5 @@
|
||||||
cwtch.im/cwtch v0.8.10 h1:y1PAEz9j2wLWahmBLNu7rPAlNpA+9FLwMAzIT/yfXjM=
|
cwtch.im/cwtch v0.8.11 h1:nUrd6srjLxInSJ0q1JdmRBhN4RRlZRL+2vIyE/AXkfY=
|
||||||
cwtch.im/cwtch v0.8.10/go.mod h1:D9dtO+WnKqdmufKSfFeFlUYaxLTfE/RtqVe1OD0kiKc=
|
cwtch.im/cwtch v0.8.11/go.mod h1:D9dtO+WnKqdmufKSfFeFlUYaxLTfE/RtqVe1OD0kiKc=
|
||||||
git.openprivacy.ca/cwtch.im/tapir v0.4.3 h1:sctSfUXHDIqaHfJPDl+5lHtmoEJolQiHTcHZGAe5Qc4=
|
git.openprivacy.ca/cwtch.im/tapir v0.4.3 h1:sctSfUXHDIqaHfJPDl+5lHtmoEJolQiHTcHZGAe5Qc4=
|
||||||
git.openprivacy.ca/cwtch.im/tapir v0.4.3/go.mod h1:10qEaib5x021zgyZ/97JKWsEpedH5+Vfy2CvB2V+08E=
|
git.openprivacy.ca/cwtch.im/tapir v0.4.3/go.mod h1:10qEaib5x021zgyZ/97JKWsEpedH5+Vfy2CvB2V+08E=
|
||||||
git.openprivacy.ca/openprivacy/bine v0.0.4 h1:CO7EkGyz+jegZ4ap8g5NWRuDHA/56KKvGySR6OBPW+c=
|
git.openprivacy.ca/openprivacy/bine v0.0.4 h1:CO7EkGyz+jegZ4ap8g5NWRuDHA/56KKvGySR6OBPW+c=
|
||||||
|
@ -8,7 +8,6 @@ git.openprivacy.ca/openprivacy/connectivity v1.4.4 h1:11M3akVCyy/luuhMpZTM1r9Jay
|
||||||
git.openprivacy.ca/openprivacy/connectivity v1.4.4/go.mod h1:JVRCIdL+lAG6ohBFWiKeC/MN42nnC0sfFszR9XG6vPQ=
|
git.openprivacy.ca/openprivacy/connectivity v1.4.4/go.mod h1:JVRCIdL+lAG6ohBFWiKeC/MN42nnC0sfFszR9XG6vPQ=
|
||||||
git.openprivacy.ca/openprivacy/log v1.0.2 h1:HLP4wsw4ljczFAelYnbObIs821z+jgMPCe8uODPnGQM=
|
git.openprivacy.ca/openprivacy/log v1.0.2 h1:HLP4wsw4ljczFAelYnbObIs821z+jgMPCe8uODPnGQM=
|
||||||
git.openprivacy.ca/openprivacy/log v1.0.2/go.mod h1:gGYK8xHtndRLDymFtmjkG26GaMQNgyhioNS82m812Iw=
|
git.openprivacy.ca/openprivacy/log v1.0.2/go.mod h1:gGYK8xHtndRLDymFtmjkG26GaMQNgyhioNS82m812Iw=
|
||||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
@ -16,9 +15,7 @@ github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is=
|
||||||
github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s=
|
github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s=
|
||||||
github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc=
|
github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc=
|
||||||
github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o=
|
github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o=
|
||||||
github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
|
|
||||||
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||||
github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw=
|
|
||||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||||
|
@ -28,42 +25,27 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWb
|
||||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
|
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
|
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
|
||||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/struCoder/pidusage v0.1.3 h1:pZcSa6asBE38TJtW0Nui6GeCjLTpaT/jAnNP7dUTLSQ=
|
|
||||||
github.com/struCoder/pidusage v0.1.3/go.mod h1:pWBlW3YuSwRl6h7R5KbvA4N8oOqe9LjaKW5CwT1SPjI=
|
github.com/struCoder/pidusage v0.1.3/go.mod h1:pWBlW3YuSwRl6h7R5KbvA4N8oOqe9LjaKW5CwT1SPjI=
|
||||||
github.com/yuin/goldmark v1.3.5 h1:dPmz1Snjq0kmkz159iL7S6WzdahUTHnHB5M56WFVifs=
|
|
||||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||||
go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg=
|
go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg=
|
||||||
go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
|
go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
|
||||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee h1:4yd7jl+vXjalO5ztz6Vc1VADv+S/80LGJmyl1ROJ2AI=
|
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee h1:4yd7jl+vXjalO5ztz6Vc1VADv+S/80LGJmyl1ROJ2AI=
|
||||||
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4=
|
|
||||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
|
||||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
|
||||||
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=
|
|
||||||
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||||
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
|
|
||||||
golang.org/x/mobile v0.0.0-20210614202936-7c8f154d1008 h1:bhUgRXVM4qBWv8em9+JtJwUVvagppJ5Z1JMbJmu97fc=
|
|
||||||
golang.org/x/mobile v0.0.0-20210614202936-7c8f154d1008/go.mod h1:jFTmtFYCV0MFtXBU+J5V/+5AUeVS0ON/0WkE/KSrl6E=
|
|
||||||
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
|
|
||||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||||
golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
|
|
||||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
|
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
|
||||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
|
|
||||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
@ -74,22 +56,15 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 h1:RqytpXGR1iVNX7psjB3ff8y7sNFinVFvkx1c8SjBkio=
|
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 h1:RqytpXGR1iVNX7psjB3ff8y7sNFinVFvkx1c8SjBkio=
|
||||||
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
|
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
|
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||||
golang.org/x/tools v0.1.2 h1:kRBLX7v7Af8W7Gdbbc908OJcdgtK8bOz9Uaj8/F1ACA=
|
|
||||||
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||||
golang.org/x/tools v0.1.3 h1:L69ShwSZEyCsLKoAxDKeMvLDZkumEe8gXUZAjab0tX8=
|
|
||||||
golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
|
55
lib.go
55
lib.go
|
@ -12,6 +12,7 @@ import (
|
||||||
"cwtch.im/cwtch/peer"
|
"cwtch.im/cwtch/peer"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.openprivacy.ca/flutter/libcwtch-go/constants"
|
||||||
contact "git.openprivacy.ca/flutter/libcwtch-go/features/contacts"
|
contact "git.openprivacy.ca/flutter/libcwtch-go/features/contacts"
|
||||||
"git.openprivacy.ca/flutter/libcwtch-go/features/groups"
|
"git.openprivacy.ca/flutter/libcwtch-go/features/groups"
|
||||||
"git.openprivacy.ca/flutter/libcwtch-go/utils"
|
"git.openprivacy.ca/flutter/libcwtch-go/utils"
|
||||||
|
@ -67,9 +68,10 @@ func c_StartCwtch(dir_c *C.char, len C.int, tor_c *C.char, torLen C.int) int8 {
|
||||||
// message: CwtchStarted when start up is complete and app is safe to use
|
// message: CwtchStarted when start up is complete and app is safe to use
|
||||||
// CwtchStartError message when start up fails (includes event.Error data field)
|
// CwtchStartError message when start up fails (includes event.Error data field)
|
||||||
func StartCwtch(appDir string, torPath string) int {
|
func StartCwtch(appDir string, torPath string) int {
|
||||||
eventHandler = utils.NewEventHandler()
|
|
||||||
log.SetLevel(log.LevelInfo)
|
log.SetLevel(log.LevelInfo)
|
||||||
|
|
||||||
|
|
||||||
|
log.Infof("StartCwtch(...)")
|
||||||
// Quick hack check that we're being called with the correct params
|
// Quick hack check that we're being called with the correct params
|
||||||
// On android a stale worker could be calling us with "last apps" directory. Best to abort fast so the app can make a new worker
|
// On android a stale worker could be calling us with "last apps" directory. Best to abort fast so the app can make a new worker
|
||||||
if runtime.GOOS == "android" {
|
if runtime.GOOS == "android" {
|
||||||
|
@ -86,12 +88,21 @@ func StartCwtch(appDir string, torPath string) int {
|
||||||
}
|
}
|
||||||
|
|
||||||
func _startCwtch(appDir string, torPath string) {
|
func _startCwtch(appDir string, torPath string) {
|
||||||
// Exclude Tapir wire Messages (We need a TRACE level)
|
log.Infof("application: %v eventHandler: %v acn: %v", application, eventHandler, globalACN)
|
||||||
|
|
||||||
|
if application != nil {
|
||||||
|
log.Infof("_startCwtch detected existing application; resuming instead of relaunching")
|
||||||
|
ReconnectCwtchForeground()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Exclude Tapir wire Messages
|
||||||
|
//(We need a TRACE level)
|
||||||
log.ExcludeFromPattern("service.go")
|
log.ExcludeFromPattern("service.go")
|
||||||
|
|
||||||
// Ensure that the application directory exists...and then initialize settings..
|
// Ensure that the application directory exists...and then initialize settings..
|
||||||
os.MkdirAll(path.Join(appDir), 0700)
|
os.MkdirAll(path.Join(appDir), 0700)
|
||||||
utils.InitGlobalSettingsFile(appDir, "be gay do crime")
|
utils.InitGlobalSettingsFile(appDir, constants.DefactoPasswordForUnencryptedProfiles)
|
||||||
|
|
||||||
log.Infof("Loading Cwtch Directory %v and tor path: %v", appDir, torPath)
|
log.Infof("Loading Cwtch Directory %v and tor path: %v", appDir, torPath)
|
||||||
|
|
||||||
|
@ -106,6 +117,9 @@ func _startCwtch(appDir string, torPath string) {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Infof("Creating new EventHandler()")
|
||||||
|
eventHandler = utils.NewEventHandler()
|
||||||
|
|
||||||
log.Infof("making directory %v", appDir)
|
log.Infof("making directory %v", appDir)
|
||||||
os.MkdirAll(path.Join(appDir, "/.tor", "tor"), 0700)
|
os.MkdirAll(path.Join(appDir, "/.tor", "tor"), 0700)
|
||||||
tor.NewTorrc().WithSocksPort(port).WithOnionTrafficOnly().WithControlPort(controlPort).WithHashedPassword(base64.StdEncoding.EncodeToString(key)).Build(filepath.Join(appDir, ".tor", "tor", "torrc"))
|
tor.NewTorrc().WithSocksPort(port).WithOnionTrafficOnly().WithControlPort(controlPort).WithHashedPassword(base64.StdEncoding.EncodeToString(key)).Build(filepath.Join(appDir, ".tor", "tor", "torrc"))
|
||||||
|
@ -143,7 +157,7 @@ func _startCwtch(appDir string, torPath string) {
|
||||||
settings := utils.ReadGlobalSettings()
|
settings := utils.ReadGlobalSettings()
|
||||||
settingsJson, _ := json.Marshal(settings)
|
settingsJson, _ := json.Marshal(settings)
|
||||||
|
|
||||||
newApp.LoadProfiles("be gay do crime")
|
newApp.LoadProfiles(constants.DefactoPasswordForUnencryptedProfiles)
|
||||||
application = newApp
|
application = newApp
|
||||||
|
|
||||||
// Send global settings to the UI...
|
// Send global settings to the UI...
|
||||||
|
@ -161,6 +175,7 @@ func c_ReconnectCwtchForeground() {
|
||||||
// Like StartCwtch, but StartCwtch has already been called so we don't need to restart Tor etc (probably)
|
// Like StartCwtch, but StartCwtch has already been called so we don't need to restart Tor etc (probably)
|
||||||
// Do need to re-send initial state tho, eg profiles that are already loaded
|
// Do need to re-send initial state tho, eg profiles that are already loaded
|
||||||
func ReconnectCwtchForeground() {
|
func ReconnectCwtchForeground() {
|
||||||
|
log.Infof("Reconnecting cwtchforeground")
|
||||||
if application == nil {
|
if application == nil {
|
||||||
log.Errorf("ReconnectCwtchForeground: Application is nil, presuming stale thread, EXITING Reconnect\n")
|
log.Errorf("ReconnectCwtchForeground: Application is nil, presuming stale thread, EXITING Reconnect\n")
|
||||||
return
|
return
|
||||||
|
@ -169,7 +184,7 @@ func ReconnectCwtchForeground() {
|
||||||
// populate profile list
|
// populate profile list
|
||||||
peerList := application.ListPeers()
|
peerList := application.ListPeers()
|
||||||
for onion := range peerList {
|
for onion := range peerList {
|
||||||
eventHandler.Push(event.NewEvent(event.NewPeer, map[event.Field]string{event.Identity: onion, event.Created: event.False}))
|
eventHandler.Push(event.NewEvent(event.NewPeer, map[event.Field]string{event.Identity: onion, event.Created: event.False, "Reload": event.True}))
|
||||||
}
|
}
|
||||||
|
|
||||||
for onion := range peerList {
|
for onion := range peerList {
|
||||||
|
@ -332,10 +347,18 @@ func c_GetAppBusEvent() *C.char {
|
||||||
|
|
||||||
// GetAppBusEvent blocks until an event
|
// GetAppBusEvent blocks until an event
|
||||||
func GetAppBusEvent() string {
|
func GetAppBusEvent() string {
|
||||||
|
log.Debugf("appbusevent called")
|
||||||
|
for eventHandler == nil {
|
||||||
|
log.Debugf("waiting for eventHandler != nil")
|
||||||
|
time.Sleep(time.Second)
|
||||||
|
}
|
||||||
|
|
||||||
var json = ""
|
var json = ""
|
||||||
for json == "" {
|
for json == "" {
|
||||||
|
log.Debugf("waiting for json != ''")
|
||||||
json = eventHandler.GetNextEvent()
|
json = eventHandler.GetNextEvent()
|
||||||
}
|
}
|
||||||
|
log.Debugf("appbusevent: %v", json)
|
||||||
return json
|
return json
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,7 +374,11 @@ func c_CreateProfile(nick_ptr *C.char, nick_len C.int, pass_ptr *C.char, pass_le
|
||||||
}
|
}
|
||||||
|
|
||||||
func CreateProfile(nick, pass string) {
|
func CreateProfile(nick, pass string) {
|
||||||
application.CreatePeer(nick, pass)
|
if pass == constants.DefactoPasswordForUnencryptedProfiles {
|
||||||
|
application.CreateTaggedPeer(nick, pass, constants.ProfileTypeV1DefaultPassword)
|
||||||
|
} else {
|
||||||
|
application.CreateTaggedPeer(nick, pass, constants.ProfileTypeV1Password)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//export c_LoadProfiles
|
//export c_LoadProfiles
|
||||||
|
@ -604,6 +631,12 @@ func c_DeleteProfile(profile_ptr *C.char, profile_len C.int, password_ptr *C.cha
|
||||||
|
|
||||||
// DeleteProfile deletes a profile given the right password
|
// DeleteProfile deletes a profile given the right password
|
||||||
func DeleteProfile(profile string, password string) {
|
func DeleteProfile(profile string, password string) {
|
||||||
|
|
||||||
|
// allow a blank password to delete "unencrypted" accounts...
|
||||||
|
if password == "" {
|
||||||
|
password = constants.DefactoPasswordForUnencryptedProfiles
|
||||||
|
}
|
||||||
|
|
||||||
application.DeletePeer(profile, password)
|
application.DeletePeer(profile, password)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -695,11 +728,15 @@ func ShutdownCwtch() {
|
||||||
eventHandler.Push(event.NewEvent(event.Shutdown, map[event.Field]string{}))
|
eventHandler.Push(event.NewEvent(event.Shutdown, map[event.Field]string{}))
|
||||||
|
|
||||||
// Allow for the shutdown events to go through and then purge everything else...
|
// Allow for the shutdown events to go through and then purge everything else...
|
||||||
log.Debugf("Shutting Down Application...")
|
log.Infof("Shutting Down Application...")
|
||||||
application.Shutdown()
|
application.Shutdown()
|
||||||
log.Debugf("Shutting Down ACN...")
|
log.Infof("Shutting Down ACN...")
|
||||||
globalACN.Close()
|
globalACN.Close()
|
||||||
log.Debugf("Library Shutdown Complete!")
|
log.Infof("Library Shutdown Complete!")
|
||||||
|
// do not remove - important for state checks elsewhere
|
||||||
|
application = nil
|
||||||
|
globalACN = nil
|
||||||
|
eventHandler = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,10 @@ type EventHandler struct {
|
||||||
app app.Application
|
app app.Application
|
||||||
appBusQueue event.Queue
|
appBusQueue event.Queue
|
||||||
profileEvents chan EventProfileEnvelope
|
profileEvents chan EventProfileEnvelope
|
||||||
profileQueues map[string]event.Queue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewEventHandler() *EventHandler {
|
func NewEventHandler() *EventHandler {
|
||||||
eh := &EventHandler{app: nil, appBusQueue: event.NewQueue(), profileQueues: make(map[string]event.Queue), profileEvents: make(chan EventProfileEnvelope)}
|
eh := &EventHandler{app: nil, appBusQueue: event.NewQueue(), profileEvents: make(chan EventProfileEnvelope)}
|
||||||
return eh
|
return eh
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,6 +64,7 @@ func (eh *EventHandler) GetNextEvent() string {
|
||||||
// handleAppBusEvent enriches AppBus events so they are usable with out further data fetches
|
// handleAppBusEvent enriches AppBus events so they are usable with out further data fetches
|
||||||
func (eh *EventHandler) handleAppBusEvent(e *event.Event) string {
|
func (eh *EventHandler) handleAppBusEvent(e *event.Event) string {
|
||||||
log.Debugf("New AppBus Event to Handle: %v", e)
|
log.Debugf("New AppBus Event to Handle: %v", e)
|
||||||
|
if eh.app != nil {
|
||||||
switch e.EventType {
|
switch e.EventType {
|
||||||
case event.ACNStatus:
|
case event.ACNStatus:
|
||||||
if e.Data[event.Progress] == "100" {
|
if e.Data[event.Progress] == "100" {
|
||||||
|
@ -78,7 +78,19 @@ func (eh *EventHandler) handleAppBusEvent(e *event.Event) string {
|
||||||
onion := e.Data[event.Identity]
|
onion := e.Data[event.Identity]
|
||||||
profile := eh.app.GetPeer(e.Data[event.Identity])
|
profile := eh.app.GetPeer(e.Data[event.Identity])
|
||||||
log.Debug("New Peer Event: %v", e)
|
log.Debug("New Peer Event: %v", e)
|
||||||
|
|
||||||
|
if e.Data["Reload"] != event.True {
|
||||||
eh.startHandlingPeer(onion)
|
eh.startHandlingPeer(onion)
|
||||||
|
}
|
||||||
|
|
||||||
|
tag,isTagged := profile.GetAttribute(app.AttributeTag)
|
||||||
|
if isTagged {
|
||||||
|
e.Data[app.AttributeTag] = tag
|
||||||
|
} else {
|
||||||
|
// Assume encrypted for non-tagged profiles - this isn't always true, but all post-beta profiles
|
||||||
|
// are tagged on creation.
|
||||||
|
e.Data[app.AttributeTag] = constants.ProfileTypeV1Password
|
||||||
|
}
|
||||||
|
|
||||||
if e.Data[event.Created] == event.True {
|
if e.Data[event.Created] == event.True {
|
||||||
name, _ := profile.GetAttribute(attr.GetLocalScope(constants.Name))
|
name, _ := profile.GetAttribute(attr.GetLocalScope(constants.Name))
|
||||||
|
@ -207,7 +219,8 @@ func (eh *EventHandler) handleAppBusEvent(e *event.Event) string {
|
||||||
serversListBytes, _ := json.Marshal(servers)
|
serversListBytes, _ := json.Marshal(servers)
|
||||||
e.Data[groups.ServerList] = string(serversListBytes)
|
e.Data[groups.ServerList] = string(serversListBytes)
|
||||||
|
|
||||||
log.Infof("contactsJson %v", e.Data["ContactsJson"])
|
log.Debugf("contactsJson %v", e.Data["ContactsJson"])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
json, _ := json.Marshal(e)
|
json, _ := json.Marshal(e)
|
||||||
|
@ -216,7 +229,9 @@ func (eh *EventHandler) handleAppBusEvent(e *event.Event) string {
|
||||||
|
|
||||||
// handleProfileEvent enriches Profile events so they are usable with out further data fetches
|
// handleProfileEvent enriches Profile events so they are usable with out further data fetches
|
||||||
func (eh *EventHandler) handleProfileEvent(ev *EventProfileEnvelope) string {
|
func (eh *EventHandler) handleProfileEvent(ev *EventProfileEnvelope) string {
|
||||||
|
if eh.app == nil {
|
||||||
|
log.Errorf("eh.app == nil in handleProfileEvent... this shouldnt happen?")
|
||||||
|
} else {
|
||||||
peer := eh.app.GetPeer(ev.Profile)
|
peer := eh.app.GetPeer(ev.Profile)
|
||||||
ph := NewPeerHelper(peer)
|
ph := NewPeerHelper(peer)
|
||||||
log.Debugf("New Profile Event to Handle: %v", ev)
|
log.Debugf("New Profile Event to Handle: %v", ev)
|
||||||
|
@ -304,6 +319,7 @@ func (eh *EventHandler) handleProfileEvent(ev *EventProfileEnvelope) string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
json, _ := json.Marshal(unwrap(ev))
|
json, _ := json.Marshal(unwrap(ev))
|
||||||
return string(json)
|
return string(json)
|
||||||
|
@ -340,18 +356,21 @@ func (eh *EventHandler) startHandlingPeer(onion string) {
|
||||||
eventBus.Subscribe(event.ChangePasswordError, q)
|
eventBus.Subscribe(event.ChangePasswordError, q)
|
||||||
eventBus.Subscribe(event.NewRetValMessageFromPeer, q)
|
eventBus.Subscribe(event.NewRetValMessageFromPeer, q)
|
||||||
eventBus.Subscribe(event.SetAttribute, q)
|
eventBus.Subscribe(event.SetAttribute, q)
|
||||||
eh.profileQueues[onion] = q
|
|
||||||
|
|
||||||
go eh.forwardProfileMessages(onion, q)
|
go eh.forwardProfileMessages(onion, q)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (eh *EventHandler) forwardProfileMessages(onion string, q event.Queue) {
|
func (eh *EventHandler) forwardProfileMessages(onion string, q event.Queue) {
|
||||||
|
log.Infof("Launching Forwarding Goroutine for %v", onion)
|
||||||
// TODO: graceful shutdown, via an injected event of special QUIT type exiting loop/go routine
|
// TODO: graceful shutdown, via an injected event of special QUIT type exiting loop/go routine
|
||||||
for {
|
for {
|
||||||
e := q.Next()
|
e := q.Next()
|
||||||
ev := EventProfileEnvelope{Event: e, Profile: onion}
|
ev := EventProfileEnvelope{Event: e, Profile: onion}
|
||||||
eh.profileEvents <- ev
|
eh.profileEvents <- ev
|
||||||
|
if ev.Event.EventType == event.Shutdown {
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -286,7 +286,7 @@ func EnrichNewPeer(handle string, ph *PeerHelper, ev *EventProfileEnvelope) erro
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// could be a server?
|
// could be a server?
|
||||||
log.Infof("sorry, unable to handle AddContact(%v)", handle)
|
log.Debugf("sorry, unable to handle AddContact(%v)", handle)
|
||||||
return errors.New("not a peer or group")
|
return errors.New("not a peer or group")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -31,6 +31,8 @@ type GlobalSettings struct {
|
||||||
BlockUnknownConnections bool
|
BlockUnknownConnections bool
|
||||||
StateRootPane int
|
StateRootPane int
|
||||||
FirstTime bool
|
FirstTime bool
|
||||||
|
UIColumnModePortrait string
|
||||||
|
UIColumnModeLandscape string
|
||||||
}
|
}
|
||||||
|
|
||||||
var DefaultGlobalSettings = GlobalSettings{
|
var DefaultGlobalSettings = GlobalSettings{
|
||||||
|
@ -42,6 +44,8 @@ var DefaultGlobalSettings = GlobalSettings{
|
||||||
StateRootPane: 0,
|
StateRootPane: 0,
|
||||||
FirstTime: true,
|
FirstTime: true,
|
||||||
BlockUnknownConnections: false,
|
BlockUnknownConnections: false,
|
||||||
|
UIColumnModePortrait: "DualpaneMode.Single",
|
||||||
|
UIColumnModeLandscape: "DualpaneMode.CopyPortrait",
|
||||||
}
|
}
|
||||||
|
|
||||||
func InitGlobalSettingsFile(directory string, password string) error {
|
func InitGlobalSettingsFile(directory string, password string) error {
|
||||||
|
|
Loading…
Reference in New Issue