Documentation
¶
Index ¶
- Variables
- func GetAddress(name string) (string, error)
- func LoadConfig(filePath string) error
- type AddressConfig
- type Contract
- type ContractCaller
- func (_Contract *ContractCaller) GetAllPosts(opts *bind.CallOpts) ([]PostStoragePost, error)
- func (_Contract *ContractCaller) GetAllUsers(opts *bind.CallOpts) ([]common.Address, error)
- func (_Contract *ContractCaller) GetPostByID(opts *bind.CallOpts, id *big.Int) (PostStoragePost, error)
- func (_Contract *ContractCaller) GetPostByIndex(opts *bind.CallOpts, user common.Address, index *big.Int) (PostStoragePost, error)
- func (_Contract *ContractCaller) GetPostsPaginated(opts *bind.CallOpts, page *big.Int, pageSize *big.Int) ([]PostStoragePost, error)
- func (_Contract *ContractCaller) GetUsersPost(opts *bind.CallOpts, user common.Address) ([]PostStoragePost, error)
- func (_Contract *ContractCaller) GetUsersPostPaginated(opts *bind.CallOpts, user common.Address, page *big.Int, pageSize *big.Int) ([]PostStoragePost, error)
- func (_Contract *ContractCaller) PostCounter(opts *bind.CallOpts) (*big.Int, error)
- func (_Contract *ContractCaller) UserPosts(opts *bind.CallOpts, arg0 common.Address, arg1 *big.Int) (struct{ ... }, error)
- func (_Contract *ContractCaller) Users(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error)
- type ContractCallerRaw
- type ContractCallerSession
- func (_Contract *ContractCallerSession) GetAllPosts() ([]PostStoragePost, error)
- func (_Contract *ContractCallerSession) GetAllUsers() ([]common.Address, error)
- func (_Contract *ContractCallerSession) GetPostByID(id *big.Int) (PostStoragePost, error)
- func (_Contract *ContractCallerSession) GetPostByIndex(user common.Address, index *big.Int) (PostStoragePost, error)
- func (_Contract *ContractCallerSession) GetPostsPaginated(page *big.Int, pageSize *big.Int) ([]PostStoragePost, error)
- func (_Contract *ContractCallerSession) GetUsersPost(user common.Address) ([]PostStoragePost, error)
- func (_Contract *ContractCallerSession) GetUsersPostPaginated(user common.Address, page *big.Int, pageSize *big.Int) ([]PostStoragePost, error)
- func (_Contract *ContractCallerSession) PostCounter() (*big.Int, error)
- func (_Contract *ContractCallerSession) UserPosts(arg0 common.Address, arg1 *big.Int) (struct{ ... }, error)
- func (_Contract *ContractCallerSession) Users(arg0 *big.Int) (common.Address, error)
- type ContractFilterer
- func (_Contract *ContractFilterer) FilterPostPublished(opts *bind.FilterOpts, author []common.Address) (*ContractPostPublishedIterator, error)
- func (_Contract *ContractFilterer) ParsePostPublished(log types.Log) (*ContractPostPublished, error)
- func (_Contract *ContractFilterer) WatchPostPublished(opts *bind.WatchOpts, sink chan<- *ContractPostPublished, ...) (event.Subscription, error)
- type ContractPostPublished
- type ContractPostPublishedIterator
- type ContractRaw
- func (_Contract *ContractRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error
- func (_Contract *ContractRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_Contract *ContractRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type ContractSession
- func (_Contract *ContractSession) GetAllPosts() ([]PostStoragePost, error)
- func (_Contract *ContractSession) GetAllUsers() ([]common.Address, error)
- func (_Contract *ContractSession) GetPostByID(id *big.Int) (PostStoragePost, error)
- func (_Contract *ContractSession) GetPostByIndex(user common.Address, index *big.Int) (PostStoragePost, error)
- func (_Contract *ContractSession) GetPostsPaginated(page *big.Int, pageSize *big.Int) ([]PostStoragePost, error)
- func (_Contract *ContractSession) GetUsersPost(user common.Address) ([]PostStoragePost, error)
- func (_Contract *ContractSession) GetUsersPostPaginated(user common.Address, page *big.Int, pageSize *big.Int) ([]PostStoragePost, error)
- func (_Contract *ContractSession) Post(_title string, _content string, _category uint8, _tags []string, ...) (*types.Transaction, error)
- func (_Contract *ContractSession) PostCounter() (*big.Int, error)
- func (_Contract *ContractSession) UserPosts(arg0 common.Address, arg1 *big.Int) (struct{ ... }, error)
- func (_Contract *ContractSession) Users(arg0 *big.Int) (common.Address, error)
- type ContractTransactor
- type ContractTransactorRaw
- type ContractTransactorSession
- type PostContract
- type PostStoragePost
Constants ¶
This section is empty.
Variables ¶
var ContractABI = ContractMetaData.ABI
ContractABI is the input ABI used to generate the binding from. Deprecated: Use ContractMetaData.ABI instead.
var ContractBin = ContractMetaData.Bin
ContractBin is the compiled bytecode used for deploying new contracts. Deprecated: Use ContractMetaData.Bin instead.
var ContractMetaData = &bind.MetaData{
ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"author\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string[]\",\"name\":\"tags\",\"type\":\"string[]\"},{\"indexed\":false,\"internalType\":\"enumPostStorage.Category\",\"name\":\"category\",\"type\":\"uint8\"}],\"name\":\"PostPublished\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getAllPosts\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"author\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"content\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"tags\",\"type\":\"string[]\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"enumPostStorage.Category\",\"name\":\"category\",\"type\":\"uint8\"}],\"internalType\":\"structPostStorage.Post[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllUsers\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getPostByID\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"author\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"content\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"tags\",\"type\":\"string[]\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"enumPostStorage.Category\",\"name\":\"category\",\"type\":\"uint8\"}],\"internalType\":\"structPostStorage.Post\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getPostByIndex\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"author\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"content\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"tags\",\"type\":\"string[]\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"enumPostStorage.Category\",\"name\":\"category\",\"type\":\"uint8\"}],\"internalType\":\"structPostStorage.Post\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"page\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pageSize\",\"type\":\"uint256\"}],\"name\":\"getPostsPaginated\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"author\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"content\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"tags\",\"type\":\"string[]\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"enumPostStorage.Category\",\"name\":\"category\",\"type\":\"uint8\"}],\"internalType\":\"structPostStorage.Post[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getUsersPost\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"author\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"content\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"tags\",\"type\":\"string[]\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"enumPostStorage.Category\",\"name\":\"category\",\"type\":\"uint8\"}],\"internalType\":\"structPostStorage.Post[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"page\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pageSize\",\"type\":\"uint256\"}],\"name\":\"getUsersPostPaginated\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"author\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"content\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"tags\",\"type\":\"string[]\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"enumPostStorage.Category\",\"name\":\"category\",\"type\":\"uint8\"}],\"internalType\":\"structPostStorage.Post[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_content\",\"type\":\"string\"},{\"internalType\":\"enumPostStorage.Category\",\"name\":\"_category\",\"type\":\"uint8\"},{\"internalType\":\"string[]\",\"name\":\"_tags\",\"type\":\"string[]\"},{\"internalType\":\"address\",\"name\":\"author\",\"type\":\"address\"}],\"name\":\"post\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"postCounter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"userPosts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"author\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"content\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"enumPostStorage.Category\",\"name\":\"category\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"users\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
Bin: "0x608060405234801561001057600080fd5b506136d1806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80635645c1e7116100715780635645c1e71461017a5780637c7bf4df146101aa5780638064d149146101da578063a774bd7c1461020f578063e2842d791461022b578063fd78a37514610249576100a9565b806309b3d75e146100ae57806330561100146100cc578063365b98b2146100ea5780633aa5cc941461011a5780633e92733e1461014a575b600080fd5b6100b6610279565b6040516100c39190613127565b60405180910390f35b6100d461027f565b6040516100e19190613083565b60405180910390f35b61010460048036038101906100ff9190612b04565b6108a3565b6040516101119190613046565b60405180910390f35b610134600480360381019061012f9190612991565b6108e2565b6040516101419190613083565b60405180910390f35b610164600480360381019061015f9190612b2d565b610c6d565b6040516101719190613083565b60405180910390f35b610194600480360381019061018f9190612b04565b61134d565b6040516101a19190613105565b60405180910390f35b6101c460048036038101906101bf91906129ba565b6116c2565b6040516101d19190613105565b60405180910390f35b6101f460048036038101906101ef91906129ba565b611ad2565b60405161020696959493929190613142565b60405180910390f35b61022960048036038101906102249190612a45565b611c68565b005b6102336120a8565b6040516102409190613061565b60405180910390f35b610263600480360381019061025e91906129f6565b612136565b6040516102709190613083565b60405180910390f35b60035481565b60606000805b60028054905081101561035857600080600283815481106102cf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905082610343919061337a565b9150808061035090613533565b915050610285565b5060008167ffffffffffffffff81111561039b577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156103d457816020015b6103c1612671565b8152602001906001900390816103b95790505b5090506000805b60028054905081101561089957600080600060028481548110610427577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156107cc57838290600052602060002090600702016040518060e0016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201805461053f90613501565b80601f016020809104026020016040519081016040528092919081815260200182805461056b90613501565b80156105b85780601f1061058d576101008083540402835291602001916105b8565b820191906000526020600020905b81548152906001019060200180831161059b57829003601f168201915b505050505081526020016003820180546105d190613501565b80601f01602080910402602001604051908101604052809291908181526020018280546105fd90613501565b801561064a5780601f1061061f5761010080835404028352916020019161064a565b820191906000526020600020905b81548152906001019060200180831161062d57829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b8282101561072457838290600052602060002001805461069790613501565b80601f01602080910402602001604051908101604052809291908181526020018280546106c390613501565b80156107105780601f106106e557610100808354040283529160200191610710565b820191906000526020600020905b8154815290600101906020018083116106f357829003601f168201915b505050505081526020019060010190610678565b505050508152602001600582015481526020016006820160009054906101000a900460ff166002811115610781577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028111156107b9577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81525050815260200190600101906104ac565b50505050905060005b815181101561088457818181518110610817577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151858581518110610858577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010181905250838061086e90613533565b945050808061087c90613533565b9150506107d5565b5050808061089190613533565b9150506103db565b5081935050505090565b600281815481106108b357600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015610c6257838290600052602060002090600702016040518060e0016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820180546109d590613501565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0190613501565b8015610a4e5780601f10610a2357610100808354040283529160200191610a4e565b820191906000526020600020905b815481529060010190602001808311610a3157829003601f168201915b50505050508152602001600382018054610a6790613501565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9390613501565b8015610ae05780601f10610ab557610100808354040283529160200191610ae0565b820191906000526020600020905b815481529060010190602001808311610ac357829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015610bba578382906000526020600020018054610b2d90613501565b80601f0160208091040260200160405190810160405280929190818152602001828054610b5990613501565b8015610ba65780601f10610b7b57610100808354040283529160200191610ba6565b820191906000526020600020905b815481529060010190602001808311610b8957829003601f168201915b505050505081526020019060010190610b0e565b505050508152602001600582015481526020016006820160009054906101000a900460ff166002811115610c17577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6002811115610c4f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152505081526020019060010190610942565b505050509050919050565b60606000805b600280549050811015610d465760008060028381548110610cbd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905082610d31919061337a565b91508080610d3e90613533565b915050610c73565b50808385610d5491906133d0565b10610d94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8b906130e5565b60405180910390fd5b60008385610da291906133d0565b90506000828583610db3919061337a565b11610dc9578482610dc4919061337a565b610dcb565b825b905060008282610ddb919061342a565b67ffffffffffffffff811115610e1a577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015610e5357816020015b610e40612671565b815260200190600190039081610e385790505b50905060008060005b60028054905081101561133d57600080600060028481548110610ea8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b8282101561124d57838290600052602060002090600702016040518060e0016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282018054610fc090613501565b80601f0160208091040260200160405190810160405280929190818152602001828054610fec90613501565b80156110395780601f1061100e57610100808354040283529160200191611039565b820191906000526020600020905b81548152906001019060200180831161101c57829003601f168201915b5050505050815260200160038201805461105290613501565b80601f016020809104026020016040519081016040528092919081815260200182805461107e90613501565b80156110cb5780601f106110a0576101008083540402835291602001916110cb565b820191906000526020600020905b8154815290600101906020018083116110ae57829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b828210156111a557838290600052602060002001805461111890613501565b80601f016020809104026020016040519081016040528092919081815260200182805461114490613501565b80156111915780601f1061116657610100808354040283529160200191611191565b820191906000526020600020905b81548152906001019060200180831161117457829003601f168201915b5050505050815260200190600101906110f9565b505050508152602001600582015481526020016006820160009054906101000a900460ff166002811115611202577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600281111561123a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152505081526020019060010190610f2d565b50505050905060005b81518110156113285787841015801561126e57508684105b15611307578181815181106112ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101518686815181106112ed577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010181905250848061130390613533565b9550505b838061131290613533565b945050808061132090613533565b915050611256565b5050808061133590613533565b915050610e5c565b5082965050505050505092915050565b611355612671565b6000600160008481526020019081526020016000206000015414156113af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113a6906130a5565b60405180910390fd5b600160008381526020019081526020016000206040518060e0016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201805461143d90613501565b80601f016020809104026020016040519081016040528092919081815260200182805461146990613501565b80156114b65780601f1061148b576101008083540402835291602001916114b6565b820191906000526020600020905b81548152906001019060200180831161149957829003601f168201915b505050505081526020016003820180546114cf90613501565b80601f01602080910402602001604051908101604052809291908181526020018280546114fb90613501565b80156115485780601f1061151d57610100808354040283529160200191611548565b820191906000526020600020905b81548152906001019060200180831161152b57829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b8282101561162257838290600052602060002001805461159590613501565b80601f01602080910402602001604051908101604052809291908181526020018280546115c190613501565b801561160e5780601f106115e35761010080835404028352916020019161160e565b820191906000526020600020905b8154815290600101906020018083116115f157829003601f168201915b505050505081526020019060010190611576565b505050508152602001600582015481526020016006820160009054906101000a900460ff16600281111561167f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028111156116b7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b815250509050919050565b6116ca612671565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050821061174d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611744906130c5565b60405180910390fd5b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002082815481106117c3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600702016040518060e0016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201805461184c90613501565b80601f016020809104026020016040519081016040528092919081815260200182805461187890613501565b80156118c55780601f1061189a576101008083540402835291602001916118c5565b820191906000526020600020905b8154815290600101906020018083116118a857829003601f168201915b505050505081526020016003820180546118de90613501565b80601f016020809104026020016040519081016040528092919081815260200182805461190a90613501565b80156119575780601f1061192c57610100808354040283529160200191611957565b820191906000526020600020905b81548152906001019060200180831161193a57829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015611a315783829060005260206000200180546119a490613501565b80601f01602080910402602001604051908101604052809291908181526020018280546119d090613501565b8015611a1d5780601f106119f257610100808354040283529160200191611a1d565b820191906000526020600020905b815481529060010190602001808311611a0057829003601f168201915b505050505081526020019060010190611985565b505050508152602001600582015481526020016006820160009054906101000a900460ff166002811115611a8e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6002811115611ac6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81525050905092915050565b60006020528160005260406000208181548110611aee57600080fd5b9060005260206000209060070201600091509150508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806002018054611b3e90613501565b80601f0160208091040260200160405190810160405280929190818152602001828054611b6a90613501565b8015611bb75780601f10611b8c57610100808354040283529160200191611bb7565b820191906000526020600020905b815481529060010190602001808311611b9a57829003601f168201915b505050505090806003018054611bcc90613501565b80601f0160208091040260200160405190810160405280929190818152602001828054611bf890613501565b8015611c455780601f10611c1a57610100808354040283529160200191611c45565b820191906000526020600020905b815481529060010190602001808311611c2857829003601f168201915b5050505050908060050154908060060160009054906101000a900460ff16905086565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490501415611d16576002819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60036000815480929190611d2990613533565b91905055506000600354905060006040518060e001604052808381526020018473ffffffffffffffffffffffffffffffffffffffff168152602001888152602001878152602001858152602001428152602001866002811115611db5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81525090506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190806001815401808255809150506001900390600052602060002090600702016000909190919091506000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002019080519060200190611e8f9291906126fc565b506060820151816003019080519060200190611eac9291906126fc565b506080820151816004019080519060200190611ec9929190612782565b5060a0820151816005015560c08201518160060160006101000a81548160ff02191690836002811115611f25577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b0217905550505080600160008481526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002019080519060200190611fad9291906126fc565b506060820151816003019080519060200190611fca9291906126fc565b506080820151816004019080519060200190611fe7929190612782565b5060a0820151816005015560c08201518160060160006101000a81548160ff02191690836002811115612043577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055509050508273ffffffffffffffffffffffffffffffffffffffff167f87b51da9bcc29a9d1a8655f5b4551037df9275c98217a4fba832a0b9e3c07e6d8389878960405161209794939291906131b1565b60405180910390a250505050505050565b6060600280548060200260200160405190810160405280929190818152602001828054801561212c57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116120e2575b5050505050905090565b606060008060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905090506000838561218c91906133d0565b90506000848261219c919061337a565b9050828111156121aa578290505b8282106121ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121e3906130e5565b60405180910390fd5b600082826121fa919061342a565b67ffffffffffffffff811115612239577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405190808252806020026020018201604052801561227257816020015b61225f612671565b8152602001906001900390816122575790505b50905060008390505b82811015612662576000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081815481106122f9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600702016040518060e0016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201805461238290613501565b80601f01602080910402602001604051908101604052809291908181526020018280546123ae90613501565b80156123fb5780601f106123d0576101008083540402835291602001916123fb565b820191906000526020600020905b8154815290600101906020018083116123de57829003601f168201915b5050505050815260200160038201805461241490613501565b80601f016020809104026020016040519081016040528092919081815260200182805461244090613501565b801561248d5780601f106124625761010080835404028352916020019161248d565b820191906000526020600020905b81548152906001019060200180831161247057829003601f168201915b5050505050815260200160048201805480602002602001604051908101604052809291908181526020016000905b828210156125675783829060005260206000200180546124da90613501565b80601f016020809104026020016040519081016040528092919081815260200182805461250690613501565b80156125535780601f1061252857610100808354040283529160200191612553565b820191906000526020600020905b81548152906001019060200180831161253657829003601f168201915b5050505050815260200190600101906124bb565b505050508152602001600582015481526020016006820160009054906101000a900460ff1660028111156125c4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028111156125fc577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152505082858361260d919061342a565b81518110612644577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010181905250808061265a90613533565b91505061227b565b50809450505050509392505050565b6040518060e0016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160608152602001606081526020016060815260200160008152602001600060028111156126f6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81525090565b82805461270890613501565b90600052602060002090601f01602090048101928261272a5760008555612771565b82601f1061274357805160ff1916838001178555612771565b82800160010185558215612771579182015b82811115612770578251825591602001919060010190612755565b5b50905061277e91906127e2565b5090565b8280548282559060005260206000209081019282156127d1579160200282015b828111156127d05782518290805190602001906127c09291906126fc565b50916020019190600101906127a2565b5b5090506127de91906127ff565b5090565b5b808211156127fb5760008160009055506001016127e3565b5090565b5b8082111561281f57600081816128169190612823565b50600101612800565b5090565b50805461282f90613501565b6000825580601f106128415750612860565b601f01602090049060005260206000209081019061285f91906127e2565b5b50565b600061287661287184613235565b613204565b9050808382526020820190508260005b858110156128b6578135850161289c8882612952565b845260208401935060208301925050600181019050612886565b5050509392505050565b60006128d36128ce84613261565b613204565b9050828152602081018484840111156128eb57600080fd5b6128f68482856134bf565b509392505050565b60008135905061290d8161365d565b92915050565b600082601f83011261292457600080fd5b8135612934848260208601612863565b91505092915050565b60008135905061294c81613674565b92915050565b600082601f83011261296357600080fd5b81356129738482602086016128c0565b91505092915050565b60008135905061298b81613684565b92915050565b6000602082840312156129a357600080fd5b60006129b1848285016128fe565b91505092915050565b600080604083850312156129cd57600080fd5b60006129db858286016128fe565b92505060206129ec8582860161297c565b9150509250929050565b600080600060608486031215612a0b57600080fd5b6000612a19868287016128fe565b9350506020612a2a8682870161297c565b9250506040612a3b8682870161297c565b9150509250925092565b600080600080600060a08688031215612a5d57600080fd5b600086013567ffffffffffffffff811115612a7757600080fd5b612a8388828901612952565b955050602086013567ffffffffffffffff811115612aa057600080fd5b612aac88828901612952565b9450506040612abd8882890161293d565b935050606086013567ffffffffffffffff811115612ada57600080fd5b612ae688828901612913565b9250506080612af7888289016128fe565b9150509295509295909350565b600060208284031215612b1657600080fd5b6000612b248482850161297c565b91505092915050565b60008060408385031215612b4057600080fd5b6000612b4e8582860161297c565b9250506020612b5f8582860161297c565b9150509250929050565b6000612b758383612ba9565b60208301905092915050565b6000612b8d8383612da2565b905092915050565b6000612ba18383612ed4565b905092915050565b612bb28161345e565b82525050565b612bc18161345e565b82525050565b6000612bd2826132c1565b612bdc8185613314565b9350612be783613291565b8060005b83811015612c18578151612bff8882612b69565b9750612c0a836132ed565b925050600181019050612beb565b5085935050505092915050565b6000612c30826132cc565b612c3a8185613325565b935083602082028501612c4c856132a1565b8060005b85811015612c885784840389528151612c698582612b81565b9450612c74836132fa565b925060208a01995050600181019050612c50565b50829750879550505050505092915050565b6000612ca5826132cc565b612caf8185613336565b935083602082028501612cc1856132a1565b8060005b85811015612cfd5784840389528151612cde8582612b81565b9450612ce9836132fa565b925060208a01995050600181019050612cc5565b50829750879550505050505092915050565b6000612d1a826132d7565b612d248185613347565b935083602082028501612d36856132b1565b8060005b85811015612d725784840389528151612d538582612b95565b9450612d5e83613307565b925060208a01995050600181019050612d3a565b50829750879550505050505092915050565b612d8d816134ad565b82525050565b612d9c816134ad565b82525050565b6000612dad826132e2565b612db78185613358565b9350612dc78185602086016134ce565b612dd081613638565b840191505092915050565b6000612de6826132e2565b612df08185613369565b9350612e008185602086016134ce565b612e0981613638565b840191505092915050565b6000612e21602083613369565b91507f506f73742077697468207468697320494420646f6573206e6f742065786973746000830152602082019050919050565b6000612e61601383613369565b91507f506f737420646f6573206e6f74206578697374000000000000000000000000006000830152602082019050919050565b6000612ea1601183613369565b91507f50616765206f7574206f662072616e67650000000000000000000000000000006000830152602082019050919050565b600060e083016000830151612eec6000860182613028565b506020830151612eff6020860182612ba9565b5060408301518482036040860152612f178282612da2565b91505060608301518482036060860152612f318282612da2565b91505060808301518482036080860152612f4b8282612c25565b91505060a0830151612f6060a0860182613028565b5060c0830151612f7360c0860182612d84565b508091505092915050565b600060e083016000830151612f966000860182613028565b506020830151612fa96020860182612ba9565b5060408301518482036040860152612fc18282612da2565b91505060608301518482036060860152612fdb8282612da2565b91505060808301518482036080860152612ff58282612c25565b91505060a083015161300a60a0860182613028565b5060c083015161301d60c0860182612d84565b508091505092915050565b613031816134a3565b82525050565b613040816134a3565b82525050565b600060208201905061305b6000830184612bb8565b92915050565b6000602082019050818103600083015261307b8184612bc7565b905092915050565b6000602082019050818103600083015261309d8184612d0f565b905092915050565b600060208201905081810360008301526130be81612e14565b9050919050565b600060208201905081810360008301526130de81612e54565b9050919050565b600060208201905081810360008301526130fe81612e94565b9050919050565b6000602082019050818103600083015261311f8184612f7e565b905092915050565b600060208201905061313c6000830184613037565b92915050565b600060c0820190506131576000830189613037565b6131646020830188612bb8565b81810360408301526131768187612ddb565b9050818103606083015261318a8186612ddb565b90506131996080830185613037565b6131a660a0830184612d93565b979650505050505050565b60006080820190506131c66000830187613037565b81810360208301526131d88186612ddb565b905081810360408301526131ec8185612c9a565b90506131fb6060830184612d93565b95945050505050565b6000604051905081810181811067ffffffffffffffff8211171561322b5761322a613609565b5b8060405250919050565b600067ffffffffffffffff8211156132505761324f613609565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561327c5761327b613609565b5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613385826134a3565b9150613390836134a3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156133c5576133c461357c565b5b828201905092915050565b60006133db826134a3565b91506133e6836134a3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561341f5761341e61357c565b5b828202905092915050565b6000613435826134a3565b9150613440836134a3565b9250828210156134535761345261357c565b5b828203905092915050565b600061346982613483565b9050919050565b600081905061347e82613649565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006134b882613470565b9050919050565b82818337600083830152505050565b60005b838110156134ec5780820151818401526020810190506134d1565b838111156134fb576000848401525b50505050565b6000600282049050600182168061351957607f821691505b6020821081141561352d5761352c6135da565b5b50919050565b600061353e826134a3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156135715761357061357c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6003811061365a576136596135ab565b5b50565b6136668161345e565b811461367157600080fd5b50565b6003811061368157600080fd5b50565b61368d816134a3565b811461369857600080fd5b5056fea26469706673582212204c9201e1745f0b78635ad10847024600e07132dd870371d06e79d6eae179825364736f6c63430008000033",
}
ContractMetaData contains all meta data concerning the Contract contract.
Functions ¶
func GetAddress ¶
GetAddress returns the address for the given name
func LoadConfig ¶
LoadConfig loads the JSON configuration from a file
Types ¶
type AddressConfig ¶
AddressConfig represents a mapping of names to their respective addresses
type Contract ¶
type Contract struct {
ContractCaller // Read-only binding to the contract
ContractTransactor // Write-only binding to the contract
ContractFilterer // Log filterer for contract events
}
Contract is an auto generated Go binding around an Ethereum contract.
func DeployContract ¶
func DeployContract(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Contract, error)
DeployContract deploys a new Ethereum contract, binding an instance of Contract to it.
func NewContract ¶
NewContract creates a new instance of Contract, bound to a specific deployed contract.
type ContractCaller ¶
type ContractCaller struct {
// contains filtered or unexported fields
}
ContractCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewContractCaller ¶
func NewContractCaller(address common.Address, caller bind.ContractCaller) (*ContractCaller, error)
NewContractCaller creates a new read-only instance of Contract, bound to a specific deployed contract.
func (*ContractCaller) GetAllPosts ¶
func (_Contract *ContractCaller) GetAllPosts(opts *bind.CallOpts) ([]PostStoragePost, error)
GetAllPosts is a free data retrieval call binding the contract method 0x30561100.
Solidity: function getAllPosts() view returns((uint256,address,string,string,string[],uint256,uint8)[])
func (*ContractCaller) GetAllUsers ¶
GetAllUsers is a free data retrieval call binding the contract method 0xe2842d79.
Solidity: function getAllUsers() view returns(address[])
func (*ContractCaller) GetPostByID ¶
func (_Contract *ContractCaller) GetPostByID(opts *bind.CallOpts, id *big.Int) (PostStoragePost, error)
GetPostByID is a free data retrieval call binding the contract method 0x5645c1e7.
Solidity: function getPostByID(uint256 id) view returns((uint256,address,string,string,string[],uint256,uint8))
func (*ContractCaller) GetPostByIndex ¶
func (_Contract *ContractCaller) GetPostByIndex(opts *bind.CallOpts, user common.Address, index *big.Int) (PostStoragePost, error)
GetPostByIndex is a free data retrieval call binding the contract method 0x7c7bf4df.
Solidity: function getPostByIndex(address user, uint256 index) view returns((uint256,address,string,string,string[],uint256,uint8))
func (*ContractCaller) GetPostsPaginated ¶
func (_Contract *ContractCaller) GetPostsPaginated(opts *bind.CallOpts, page *big.Int, pageSize *big.Int) ([]PostStoragePost, error)
GetPostsPaginated is a free data retrieval call binding the contract method 0x3e92733e.
Solidity: function getPostsPaginated(uint256 page, uint256 pageSize) view returns((uint256,address,string,string,string[],uint256,uint8)[])
func (*ContractCaller) GetUsersPost ¶
func (_Contract *ContractCaller) GetUsersPost(opts *bind.CallOpts, user common.Address) ([]PostStoragePost, error)
GetUsersPost is a free data retrieval call binding the contract method 0x3aa5cc94.
Solidity: function getUsersPost(address user) view returns((uint256,address,string,string,string[],uint256,uint8)[])
func (*ContractCaller) GetUsersPostPaginated ¶
func (_Contract *ContractCaller) GetUsersPostPaginated(opts *bind.CallOpts, user common.Address, page *big.Int, pageSize *big.Int) ([]PostStoragePost, error)
GetUsersPostPaginated is a free data retrieval call binding the contract method 0xfd78a375.
Solidity: function getUsersPostPaginated(address user, uint256 page, uint256 pageSize) view returns((uint256,address,string,string,string[],uint256,uint8)[])
func (*ContractCaller) PostCounter ¶
PostCounter is a free data retrieval call binding the contract method 0x09b3d75e.
Solidity: function postCounter() view returns(uint256)
func (*ContractCaller) UserPosts ¶
func (_Contract *ContractCaller) UserPosts(opts *bind.CallOpts, arg0 common.Address, arg1 *big.Int) (struct { Id *big.Int Author common.Address Title string Content string Timestamp *big.Int Category uint8 }, error)
UserPosts is a free data retrieval call binding the contract method 0x8064d149.
Solidity: function userPosts(address , uint256 ) view returns(uint256 id, address author, string title, string content, uint256 timestamp, uint8 category)
type ContractCallerRaw ¶
type ContractCallerRaw struct {
Contract *ContractCaller // Generic read-only contract binding to access the raw methods on
}
ContractCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*ContractCallerRaw) Call ¶
func (_Contract *ContractCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
type ContractCallerSession ¶
type ContractCallerSession struct {
Contract *ContractCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
ContractCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
func (*ContractCallerSession) GetAllPosts ¶
func (_Contract *ContractCallerSession) GetAllPosts() ([]PostStoragePost, error)
GetAllPosts is a free data retrieval call binding the contract method 0x30561100.
Solidity: function getAllPosts() view returns((uint256,address,string,string,string[],uint256,uint8)[])
func (*ContractCallerSession) GetAllUsers ¶
func (_Contract *ContractCallerSession) GetAllUsers() ([]common.Address, error)
GetAllUsers is a free data retrieval call binding the contract method 0xe2842d79.
Solidity: function getAllUsers() view returns(address[])
func (*ContractCallerSession) GetPostByID ¶
func (_Contract *ContractCallerSession) GetPostByID(id *big.Int) (PostStoragePost, error)
GetPostByID is a free data retrieval call binding the contract method 0x5645c1e7.
Solidity: function getPostByID(uint256 id) view returns((uint256,address,string,string,string[],uint256,uint8))
func (*ContractCallerSession) GetPostByIndex ¶
func (_Contract *ContractCallerSession) GetPostByIndex(user common.Address, index *big.Int) (PostStoragePost, error)
GetPostByIndex is a free data retrieval call binding the contract method 0x7c7bf4df.
Solidity: function getPostByIndex(address user, uint256 index) view returns((uint256,address,string,string,string[],uint256,uint8))
func (*ContractCallerSession) GetPostsPaginated ¶
func (_Contract *ContractCallerSession) GetPostsPaginated(page *big.Int, pageSize *big.Int) ([]PostStoragePost, error)
GetPostsPaginated is a free data retrieval call binding the contract method 0x3e92733e.
Solidity: function getPostsPaginated(uint256 page, uint256 pageSize) view returns((uint256,address,string,string,string[],uint256,uint8)[])
func (*ContractCallerSession) GetUsersPost ¶
func (_Contract *ContractCallerSession) GetUsersPost(user common.Address) ([]PostStoragePost, error)
GetUsersPost is a free data retrieval call binding the contract method 0x3aa5cc94.
Solidity: function getUsersPost(address user) view returns((uint256,address,string,string,string[],uint256,uint8)[])
func (*ContractCallerSession) GetUsersPostPaginated ¶
func (_Contract *ContractCallerSession) GetUsersPostPaginated(user common.Address, page *big.Int, pageSize *big.Int) ([]PostStoragePost, error)
GetUsersPostPaginated is a free data retrieval call binding the contract method 0xfd78a375.
Solidity: function getUsersPostPaginated(address user, uint256 page, uint256 pageSize) view returns((uint256,address,string,string,string[],uint256,uint8)[])
func (*ContractCallerSession) PostCounter ¶
func (_Contract *ContractCallerSession) PostCounter() (*big.Int, error)
PostCounter is a free data retrieval call binding the contract method 0x09b3d75e.
Solidity: function postCounter() view returns(uint256)
func (*ContractCallerSession) UserPosts ¶
func (_Contract *ContractCallerSession) UserPosts(arg0 common.Address, arg1 *big.Int) (struct { Id *big.Int Author common.Address Title string Content string Timestamp *big.Int Category uint8 }, error)
UserPosts is a free data retrieval call binding the contract method 0x8064d149.
Solidity: function userPosts(address , uint256 ) view returns(uint256 id, address author, string title, string content, uint256 timestamp, uint8 category)
type ContractFilterer ¶
type ContractFilterer struct {
// contains filtered or unexported fields
}
ContractFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewContractFilterer ¶
func NewContractFilterer(address common.Address, filterer bind.ContractFilterer) (*ContractFilterer, error)
NewContractFilterer creates a new log filterer instance of Contract, bound to a specific deployed contract.
func (*ContractFilterer) FilterPostPublished ¶
func (_Contract *ContractFilterer) FilterPostPublished(opts *bind.FilterOpts, author []common.Address) (*ContractPostPublishedIterator, error)
FilterPostPublished is a free log retrieval operation binding the contract event 0x87b51da9bcc29a9d1a8655f5b4551037df9275c98217a4fba832a0b9e3c07e6d.
Solidity: event PostPublished(uint256 id, address indexed author, string title, string[] tags, uint8 category)
func (*ContractFilterer) ParsePostPublished ¶
func (_Contract *ContractFilterer) ParsePostPublished(log types.Log) (*ContractPostPublished, error)
ParsePostPublished is a log parse operation binding the contract event 0x87b51da9bcc29a9d1a8655f5b4551037df9275c98217a4fba832a0b9e3c07e6d.
Solidity: event PostPublished(uint256 id, address indexed author, string title, string[] tags, uint8 category)
func (*ContractFilterer) WatchPostPublished ¶
func (_Contract *ContractFilterer) WatchPostPublished(opts *bind.WatchOpts, sink chan<- *ContractPostPublished, author []common.Address) (event.Subscription, error)
WatchPostPublished is a free log subscription operation binding the contract event 0x87b51da9bcc29a9d1a8655f5b4551037df9275c98217a4fba832a0b9e3c07e6d.
Solidity: event PostPublished(uint256 id, address indexed author, string title, string[] tags, uint8 category)
type ContractPostPublished ¶
type ContractPostPublished struct {
Id *big.Int
Author common.Address
Title string
Tags []string
Category uint8
Raw types.Log // Blockchain specific contextual infos
}
ContractPostPublished represents a PostPublished event raised by the Contract contract.
type ContractPostPublishedIterator ¶
type ContractPostPublishedIterator struct {
Event *ContractPostPublished // Event containing the contract specifics and raw log
// contains filtered or unexported fields
}
ContractPostPublishedIterator is returned from FilterPostPublished and is used to iterate over the raw logs and unpacked data for PostPublished events raised by the Contract contract.
func (*ContractPostPublishedIterator) Close ¶
func (it *ContractPostPublishedIterator) Close() error
Close terminates the iteration process, releasing any pending underlying resources.
func (*ContractPostPublishedIterator) Error ¶
func (it *ContractPostPublishedIterator) Error() error
Error returns any retrieval or parsing error occurred during filtering.
func (*ContractPostPublishedIterator) Next ¶
func (it *ContractPostPublishedIterator) Next() bool
Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.
type ContractRaw ¶
type ContractRaw struct {
Contract *Contract // Generic contract binding to access the raw methods on
}
ContractRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*ContractRaw) Call ¶
func (_Contract *ContractRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
func (*ContractRaw) Transact ¶
func (_Contract *ContractRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*ContractRaw) Transfer ¶
func (_Contract *ContractRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type ContractSession ¶
type ContractSession struct {
Contract *Contract // Generic contract binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
ContractSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*ContractSession) GetAllPosts ¶
func (_Contract *ContractSession) GetAllPosts() ([]PostStoragePost, error)
GetAllPosts is a free data retrieval call binding the contract method 0x30561100.
Solidity: function getAllPosts() view returns((uint256,address,string,string,string[],uint256,uint8)[])
func (*ContractSession) GetAllUsers ¶
func (_Contract *ContractSession) GetAllUsers() ([]common.Address, error)
GetAllUsers is a free data retrieval call binding the contract method 0xe2842d79.
Solidity: function getAllUsers() view returns(address[])
func (*ContractSession) GetPostByID ¶
func (_Contract *ContractSession) GetPostByID(id *big.Int) (PostStoragePost, error)
GetPostByID is a free data retrieval call binding the contract method 0x5645c1e7.
Solidity: function getPostByID(uint256 id) view returns((uint256,address,string,string,string[],uint256,uint8))
func (*ContractSession) GetPostByIndex ¶
func (_Contract *ContractSession) GetPostByIndex(user common.Address, index *big.Int) (PostStoragePost, error)
GetPostByIndex is a free data retrieval call binding the contract method 0x7c7bf4df.
Solidity: function getPostByIndex(address user, uint256 index) view returns((uint256,address,string,string,string[],uint256,uint8))
func (*ContractSession) GetPostsPaginated ¶
func (_Contract *ContractSession) GetPostsPaginated(page *big.Int, pageSize *big.Int) ([]PostStoragePost, error)
GetPostsPaginated is a free data retrieval call binding the contract method 0x3e92733e.
Solidity: function getPostsPaginated(uint256 page, uint256 pageSize) view returns((uint256,address,string,string,string[],uint256,uint8)[])
func (*ContractSession) GetUsersPost ¶
func (_Contract *ContractSession) GetUsersPost(user common.Address) ([]PostStoragePost, error)
GetUsersPost is a free data retrieval call binding the contract method 0x3aa5cc94.
Solidity: function getUsersPost(address user) view returns((uint256,address,string,string,string[],uint256,uint8)[])
func (*ContractSession) GetUsersPostPaginated ¶
func (_Contract *ContractSession) GetUsersPostPaginated(user common.Address, page *big.Int, pageSize *big.Int) ([]PostStoragePost, error)
GetUsersPostPaginated is a free data retrieval call binding the contract method 0xfd78a375.
Solidity: function getUsersPostPaginated(address user, uint256 page, uint256 pageSize) view returns((uint256,address,string,string,string[],uint256,uint8)[])
func (*ContractSession) Post ¶
func (_Contract *ContractSession) Post(_title string, _content string, _category uint8, _tags []string, author common.Address) (*types.Transaction, error)
Post is a paid mutator transaction binding the contract method 0xa774bd7c.
Solidity: function post(string _title, string _content, uint8 _category, string[] _tags, address author) returns()
func (*ContractSession) PostCounter ¶
func (_Contract *ContractSession) PostCounter() (*big.Int, error)
PostCounter is a free data retrieval call binding the contract method 0x09b3d75e.
Solidity: function postCounter() view returns(uint256)
func (*ContractSession) UserPosts ¶
func (_Contract *ContractSession) UserPosts(arg0 common.Address, arg1 *big.Int) (struct { Id *big.Int Author common.Address Title string Content string Timestamp *big.Int Category uint8 }, error)
UserPosts is a free data retrieval call binding the contract method 0x8064d149.
Solidity: function userPosts(address , uint256 ) view returns(uint256 id, address author, string title, string content, uint256 timestamp, uint8 category)
type ContractTransactor ¶
type ContractTransactor struct {
// contains filtered or unexported fields
}
ContractTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewContractTransactor ¶
func NewContractTransactor(address common.Address, transactor bind.ContractTransactor) (*ContractTransactor, error)
NewContractTransactor creates a new write-only instance of Contract, bound to a specific deployed contract.
func (*ContractTransactor) Post ¶
func (_Contract *ContractTransactor) Post(opts *bind.TransactOpts, _title string, _content string, _category uint8, _tags []string, author common.Address) (*types.Transaction, error)
Post is a paid mutator transaction binding the contract method 0xa774bd7c.
Solidity: function post(string _title, string _content, uint8 _category, string[] _tags, address author) returns()
type ContractTransactorRaw ¶
type ContractTransactorRaw struct {
Contract *ContractTransactor // Generic write-only contract binding to access the raw methods on
}
ContractTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*ContractTransactorRaw) Transact ¶
func (_Contract *ContractTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*ContractTransactorRaw) Transfer ¶
func (_Contract *ContractTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type ContractTransactorSession ¶
type ContractTransactorSession struct {
Contract *ContractTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
ContractTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
func (*ContractTransactorSession) Post ¶
func (_Contract *ContractTransactorSession) Post(_title string, _content string, _category uint8, _tags []string, author common.Address) (*types.Transaction, error)
Post is a paid mutator transaction binding the contract method 0xa774bd7c.
Solidity: function post(string _title, string _content, uint8 _category, string[] _tags, address author) returns()
type PostContract ¶
func NewPostContract ¶
func NewPostContract(client *ethclient.Client, instance *Contract) (*PostContract, error)